77use OpenTelemetry \API \Trace \SpanContext ;
88use OpenTelemetry \API \Trace \SpanContextInterface ;
99use OpenTelemetry \API \Trace \SpanContextValidator ;
10+ use OpenTelemetry \API \Trace \TraceFlags ;
1011use OpenTelemetry \API \Trace \TraceState ;
1112use OpenTelemetry \Context \Context ;
1213use 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