mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 20:52:57 +08:00
Update TraceState (#276)
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
env:
|
||||
CORE_REPO_SHA: 2b188b9a43dfaa74c1a0a4514b91d1cb07d3075d
|
||||
CORE_REPO_SHA: dea21fdf97472e5b4434e8455d1aaf9c2130028c
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -65,6 +65,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
([#246](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/246))
|
||||
- `opentelemetry-instrumentation-dbapi`, `opentelemetry-instrumentation-psycopg2`, `opentelemetry-instrumentation-mysql`, `opentelemetry-instrumentation-pymysql`, `opentelemetry-instrumentation-aiopg` Use SQL command name as the span operation name instead of the entire query.
|
||||
([#246](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/246))
|
||||
- Update TraceState to adhere to specs
|
||||
([#276](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/276))
|
||||
|
||||
## [0.16b1](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.16b1) - 2020-11-26
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
DD_ORIGIN = "_dd_origin"
|
||||
DD_ORIGIN = "dd_origin"
|
||||
AUTO_REJECT = 0
|
||||
AUTO_KEEP = 1
|
||||
USER_KEEP = 2
|
||||
|
@ -70,7 +70,7 @@ class DatadogFormat(TextMapPropagator):
|
||||
span_id=int(span_id),
|
||||
is_remote=True,
|
||||
trace_flags=trace_flags,
|
||||
trace_state=trace.TraceState({constants.DD_ORIGIN: origin}),
|
||||
trace_state=trace.TraceState([(constants.DD_ORIGIN, origin)]),
|
||||
)
|
||||
|
||||
return set_span_in_context(trace.DefaultSpan(span_context), context)
|
||||
|
@ -542,7 +542,7 @@ class TestDatadogSpanExporter(unittest.TestCase):
|
||||
span_id=trace_api.INVALID_SPAN,
|
||||
is_remote=True,
|
||||
trace_state=trace_api.TraceState(
|
||||
{datadog.constants.DD_ORIGIN: "origin-service"}
|
||||
[(datadog.constants.DD_ORIGIN, "origin-service")]
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -139,7 +139,9 @@ class AwsXRayPropagatorTest(unittest.TestCase):
|
||||
AwsXRayPropagatorTest.XRAY_PROPAGATOR.inject(
|
||||
AwsXRayPropagatorTest.carrier_setter,
|
||||
carrier,
|
||||
build_test_current_context(trace_state=TraceState({"foo": "bar"})),
|
||||
build_test_current_context(
|
||||
trace_state=TraceState([("foo", "bar")])
|
||||
),
|
||||
)
|
||||
|
||||
# TODO: (NathanielRN) Assert trace state when the propagator supports it
|
||||
|
Reference in New Issue
Block a user