Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TraceState #276

Merged
merged 10 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key must start with alphabet or digit as per specs.

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