File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111### Changed
1212- Rename ` IdsGenerator ` to ` IdGenerator `
1313 ([ #350 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/350 ) )
14+ - ` opentelemetry-exporter-datadog ` Fix warning when DatadogFormat encounters a request with
15+ no DD_ORIGIN headers ([ #368 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/368 ) ).
1416
1517## [ 0.18b0] ( https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.18b0 ) - 2021-02-16
1618
@@ -21,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2123 ([ #345 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/345 ) )
2224
2325### Removed
24- - Remove ` component ` span attribute in instrumentations.
26+ - Remove ` component ` span attribute in instrumentations.
2527 ` opentelemetry-instrumentation-aiopg ` , ` opentelemetry-instrumentation-dbapi ` Remove unused ` database_type ` parameter from ` trace_integration ` function.
2628 ([ #301 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/301 ) )
2729- ` opentelemetry-instrumentation-asgi ` Return header values using case insensitive keys
Original file line number Diff line number Diff line change 2727
2828
2929class DatadogFormat (TextMapPropagator ):
30- """Propagator for the Datadog HTTP header format.
31- """
30+ """Propagator for the Datadog HTTP header format."""
3231
3332 TRACE_ID_KEY = "x-datadog-trace-id"
3433 PARENT_ID_KEY = "x-datadog-parent-id"
@@ -65,12 +64,15 @@ def extract(
6564 if trace_id is None or span_id is None :
6665 return set_span_in_context (trace .INVALID_SPAN , context )
6766
67+ trace_state = []
68+ if origin is not None :
69+ trace_state .append ((constants .DD_ORIGIN , origin ))
6870 span_context = trace .SpanContext (
6971 trace_id = int (trace_id ),
7072 span_id = int (span_id ),
7173 is_remote = True ,
7274 trace_flags = trace_flags ,
73- trace_state = trace .TraceState ([( constants . DD_ORIGIN , origin )] ),
75+ trace_state = trace .TraceState (trace_state ),
7476 )
7577
7678 return set_span_in_context (
You can’t perform that action at this time.
0 commit comments