forked from open-telemetry/opentelemetry-php-instrumentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopentelemetry.stub.php
25 lines (21 loc) · 887 Bytes
/
opentelemetry.stub.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
/** @generate-class-entries */
namespace OpenTelemetry\Instrumentation;
use Closure;
/**
* @param string|null $class The (optional) hooked function's class. Null for a global/built-in function.
* @param string $function The hooked function's name.
* @param Closure|null $pre function($class, array $params, string $class, string $function, ?string $filename, ?int $lineno): $params
* You may optionally return modified parameters.
* @param Closure|null $post function($class, array $params, $returnValue, ?Throwable $exception): $returnValue
* You may optionally return modified return value.
* @return bool Whether the observer was successfully added
*
* @see https://github.com/open-telemetry/opentelemetry-php-instrumentation
*/
function hook(
?string $class,
string $function,
?Closure $pre = null,
?Closure $post = null,
): bool {}