Skip to content

Commit d853e10

Browse files
authored
feat: Support newer API namespace for open-telemetry/api >= 1.0.0beta10 (#171)
* build(deps): Bump open-telemetry/api to 1.0.0beta10 * fix: Use OpenTelemetry\API instead of OpenTelemetry\API\Common Signed-off-by: Natsuki Ikeguchi <[email protected]>
1 parent e67753d commit d853e10

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ See https://github.com/open-telemetry/opentelemetry-php#sdk-autoloading
2525
require_once 'vendor/autoload.php';
2626

2727
$tracerProvider = /*create tracer provider*/;
28-
$scope = \OpenTelemetry\API\Common\Instrumentation\Configurator::create()
28+
$scope = \OpenTelemetry\API\Instrumentation\Configurator::create()
2929
->withTracerProvider($tracerProvider)
3030
->activate();
3131

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"require": {
1111
"php": "^8.0",
1212
"ext-opentelemetry": "*",
13-
"open-telemetry/api": "^1",
13+
"open-telemetry/api": "^1.0.0beta10",
1414
"open-telemetry/sem-conv": "^1",
1515
"symfony/http-kernel": "*",
1616
"symfony/http-client-contracts": "*"

src/HttpClientInstrumentation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace OpenTelemetry\Contrib\Instrumentation\Symfony;
66

7-
use OpenTelemetry\API\Common\Instrumentation\CachedInstrumentation;
8-
use OpenTelemetry\API\Common\Instrumentation\Globals;
7+
use OpenTelemetry\API\Globals;
8+
use OpenTelemetry\API\Instrumentation\CachedInstrumentation;
99
use OpenTelemetry\API\Trace\Span;
1010
use OpenTelemetry\API\Trace\SpanKind;
1111
use OpenTelemetry\API\Trace\StatusCode;

src/SymfonyInstrumentation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace OpenTelemetry\Contrib\Instrumentation\Symfony;
66

7-
use OpenTelemetry\API\Common\Instrumentation\CachedInstrumentation;
8-
use OpenTelemetry\API\Common\Instrumentation\Globals;
7+
use OpenTelemetry\API\Globals;
8+
use OpenTelemetry\API\Instrumentation\CachedInstrumentation;
99
use OpenTelemetry\API\Trace\Span;
1010
use OpenTelemetry\API\Trace\SpanInterface;
1111
use OpenTelemetry\API\Trace\SpanKind;

tests/Integration/AbstractTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace OpenTelemetry\Tests\Instrumentation\Symfony\tests\Integration;
66

77
use ArrayObject;
8-
use OpenTelemetry\API\Common\Instrumentation\Configurator;
8+
use OpenTelemetry\API\Instrumentation\Configurator;
99
use OpenTelemetry\API\Trace\Propagation\TraceContextPropagator;
1010
use OpenTelemetry\Context\ScopeInterface;
1111
use OpenTelemetry\SDK\Trace\SpanExporter\InMemoryExporter;

0 commit comments

Comments
 (0)