Skip to content

Commit

Permalink
Update TraceState (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv authored Jan 20, 2021
1 parent 8b9202b commit b3aa7a7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'release/*'
pull_request:
env:
CORE_REPO_SHA: 2b188b9a43dfaa74c1a0a4514b91d1cb07d3075d
CORE_REPO_SHA: dea21fdf97472e5b4434e8455d1aaf9c2130028c

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DD_ORIGIN = "_dd_origin"
DD_ORIGIN = "dd_origin"
AUTO_REJECT = 0
AUTO_KEEP = 1
USER_KEEP = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def extract(
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def test_origin(self):
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")]
),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def test_inject_into_context_with_non_default_state(self):
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
Expand Down

0 comments on commit b3aa7a7

Please sign in to comment.