Skip to content

Commit

Permalink
Rename DefaultSpan to NonRecordingSpan (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen authored Mar 2, 2021
1 parent e57dec8 commit 7980997
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 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: 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

0 comments on commit 7980997

Please sign in to comment.