Skip to content

Commit f74cbed

Browse files
authored
fix withspan handler nullable + example (#1377)
- class is nullable for pre hooks - add phpt tests for withspan and its interaction with auto root span
1 parent e67b49b commit f74cbed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Instrumentation/WithSpanHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class WithSpanHandler
1818
/**
1919
* @psalm-suppress ArgumentTypeCoercion
2020
*/
21-
public static function pre(mixed $target, array $params, string $class, string $function, ?string $filename, ?int $lineno, ?array $span_args = [], ?array $attributes = []): void
21+
public static function pre(mixed $target, array $params, ?string $class, string $function, ?string $filename, ?int $lineno, ?array $span_args = [], ?array $attributes = []): void
2222
{
2323
static $instrumentation;
2424
$instrumentation ??= new CachedInstrumentation(name: 'io.opentelemetry.php.with-span', schemaUrl: 'https://opentelemetry.io/schemas/1.25.0');

0 commit comments

Comments
 (0)