File tree 1 file changed +20
-0
lines changed
dd-trace-core/src/test/groovy/datadog/trace/core/propagation
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import datadog.trace.core.test.DDCoreSpecification
11
11
12
12
import static datadog.trace.api.sampling.PrioritySampling.SAMPLER_KEEP
13
13
import static datadog.trace.api.sampling.PrioritySampling.USER_DROP
14
+ import static datadog.trace.bootstrap.instrumentation.api.AgentPropagation.XRAY_TRACING_CONCERN
14
15
15
16
class TracingPropagatorTest extends DDCoreSpecification {
16
17
HttpCodec.Injector injector
@@ -136,4 +137,23 @@ class TracingPropagatorTest extends DDCoreSpecification {
136
137
root. finish()
137
138
tracer. close()
138
139
}
140
+
141
+ def ' test AWS X-Ray propagator' () {
142
+ setup :
143
+ def tracer = tracerBuilder(). build()
144
+ def span = tracer. buildSpan(' test' , ' operation' ). start()
145
+ def propagator = Propagators . forConcerns(XRAY_TRACING_CONCERN )
146
+ def setter = Mock (CarrierSetter )
147
+ def carrier = new Object ()
148
+
149
+ when :
150
+ propagator. inject(span, carrier, setter)
151
+
152
+ then :
153
+ 1 * setter. set(carrier, ' X-Amzn-Trace-Id' , _)
154
+
155
+ cleanup :
156
+ span. finish()
157
+ tracer. close()
158
+ }
139
159
}
You can’t perform that action at this time.
0 commit comments