Skip to content

Commit 10185ae

Browse files
Fixing tests (#189)
* Fixing Logs/Monolog. * Fixing Aws\Xray. * Fixing PropagatorTest. * Fixing MongoDBInstrumentation import of CachedInstrumentation. * Fixing Instrumentation/Laravel linting. * Fixing Instrumentation/Symfony linting. * Fixing Instrumentation/HttpAsyncClient linting. * Fixing Instrumentation/Symfony linting. * Fixing Symfony import. * Updating Symfony composer deps.
1 parent 824cc81 commit 10185ae

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/Unit/PropagatorTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use OpenTelemetry\API\Trace\SpanContext;
88
use OpenTelemetry\API\Trace\SpanContextInterface;
99
use OpenTelemetry\API\Trace\SpanContextValidator;
10+
use OpenTelemetry\API\Trace\TraceFlags;
1011
use OpenTelemetry\API\Trace\TraceState;
1112
use OpenTelemetry\Context\Context;
1213
use OpenTelemetry\Context\ContextInterface;
@@ -43,7 +44,7 @@ public function test_inject_valid_sampled_trace_id()
4344
$carrier,
4445
null,
4546
$this->withSpanContext(
46-
SpanContext::create(self::TRACE_ID, self::SPAN_ID, SpanContextInterface::TRACE_FLAG_SAMPLED),
47+
SpanContext::create(self::TRACE_ID, self::SPAN_ID, TraceFlags::SAMPLED),
4748
Context::getCurrent()
4849
)
4950
);
@@ -65,7 +66,7 @@ public function test_inject_valid_not_sampled_trace_id()
6566
$carrier,
6667
null,
6768
$this->withSpanContext(
68-
SpanContext::create(self::TRACE_ID, self::SPAN_ID, SpanContextInterface::TRACE_FLAG_DEFAULT),
69+
SpanContext::create(self::TRACE_ID, self::SPAN_ID),
6970
Context::getCurrent()
7071
)
7172
);
@@ -87,7 +88,7 @@ public function test_inject_trace_id_with_trace_state()
8788
$carrier,
8889
null,
8990
$this->withSpanContext(
90-
SpanContext::create(self::TRACE_ID, self::SPAN_ID, SpanContextInterface::TRACE_FLAG_SAMPLED, new TraceState('vendor1=opaqueValue1')),
91+
SpanContext::create(self::TRACE_ID, self::SPAN_ID, TraceFlags::SAMPLED, new TraceState('vendor1=opaqueValue1')),
9192
Context::getCurrent()
9293
)
9394
);
@@ -109,7 +110,7 @@ public function test_inject_trace_id_with_invalid_span_context()
109110
$carrier,
110111
null,
111112
$this->withSpanContext(
112-
SpanContext::create(SpanContextValidator::INVALID_TRACE, SpanContextValidator::INVALID_SPAN, SpanContextInterface::TRACE_FLAG_SAMPLED, new TraceState('vendor1=opaqueValue1')),
113+
SpanContext::create(SpanContextValidator::INVALID_TRACE, SpanContextValidator::INVALID_SPAN, TraceFlags::SAMPLED, new TraceState('vendor1=opaqueValue1')),
113114
Context::getCurrent()
114115
)
115116
);

0 commit comments

Comments
 (0)