Skip to content

Commit

Permalink
Set default value for SchemaURL in cached instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricziel committed Dec 5, 2023
1 parent a568dde commit b4e02e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/API/Instrumentation/CachedInstrumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace OpenTelemetry\API\Instrumentation;

use ArrayAccess;
use OpenTelemetry\SemConv\TraceAttributes;
use function assert;
use function class_exists;
use OpenTelemetry\API\Globals;
Expand Down Expand Up @@ -37,7 +38,7 @@ final class CachedInstrumentation
/** @var ArrayAccess<LoggerProviderInterface, LoggerInterface>|null */
private ?ArrayAccess $loggers;

public function __construct(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = [])
public function __construct(string $name, ?string $version = null, string $schemaUrl = TraceAttributes::SCHEMA_URL, iterable $attributes = [])
{
$this->name = $name;
$this->version = $version;
Expand Down

0 comments on commit b4e02e5

Please sign in to comment.