Skip to content

Rename DefaultSpan to NonRecordingSpan #354

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

Merged
merged 3 commits into from
Mar 2, 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: 0008290841a1f59ee266f906dd841fc151f757ea
CORE_REPO_SHA: 91ae6fc6226ddfbbe9f92da286470cf65aa834a4

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Rename `IdsGenerator` to `IdGenerator`
([#350])(https://github.com/open-telemetry/opentelemetry-python/pull/350)
([#350](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/350))

## [0.18b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.18b0) - 2021-02-16

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def extract(
trace_state=trace.TraceState([(constants.DD_ORIGIN, origin)]),
)

return set_span_in_context(trace.DefaultSpan(span_context), context)
return set_span_in_context(
trace.NonRecordingSpan(span_context), context
)

def inject(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from opentelemetry.trace import (
INVALID_SPAN_ID,
INVALID_TRACE_ID,
DefaultSpan,
NonRecordingSpan,
SpanContext,
TraceFlags,
get_current_span,
Expand Down Expand Up @@ -76,7 +76,7 @@ def extract(
and _valid_extract_spanid.fullmatch(spanid) is not None
):
context = set_span_in_context(
DefaultSpan(
NonRecordingSpan(
SpanContext(
trace_id=int(traceid, 16),
span_id=int(spanid, 16),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def extract(
)

return trace.set_span_in_context(
trace.DefaultSpan(span_context), context=context
trace.NonRecordingSpan(span_context), context=context
)

@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def build_test_current_context(
trace_state=DEFAULT_TRACE_STATE,
):
return set_span_in_context(
trace_api.DefaultSpan(
trace_api.NonRecordingSpan(
build_test_span_context(
trace_id, span_id, is_remote, trace_flags, trace_state
)
Expand Down