Rename DefaultSpan to NonRecordingSpan (#354)

This commit is contained in:
Leighton Chen
2021-03-02 10:30:52 -08:00
committed by GitHub
parent e57dec8854
commit 79809976d5
6 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,7 @@ on:
- 'release/*'
pull_request:
env:
CORE_REPO_SHA: 0008290841a1f59ee266f906dd841fc151f757ea
CORE_REPO_SHA: 91ae6fc6226ddfbbe9f92da286470cf65aa834a4
jobs:
build:

View File

@ -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

View File

@ -73,7 +73,9 @@ class DatadogFormat(TextMapPropagator):
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,

View File

@ -20,7 +20,7 @@ from opentelemetry.context import Context
from opentelemetry.trace import (
INVALID_SPAN_ID,
INVALID_TRACE_ID,
DefaultSpan,
NonRecordingSpan,
SpanContext,
TraceFlags,
get_current_span,
@ -76,7 +76,7 @@ class OTTracePropagator(TextMapPropagator):
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),

View File

@ -151,7 +151,7 @@ class AwsXRayFormat(TextMapPropagator):
)
return trace.set_span_in_context(
trace.DefaultSpan(span_context), context=context
trace.NonRecordingSpan(span_context), context=context
)
@staticmethod

View File

@ -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
)