mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-02 11:31:52 +08:00
move textmap propagators to opentelemetry.propagators (#355)
This commit is contained in:
@ -53,7 +53,7 @@ import typing
|
||||
|
||||
import opentelemetry.trace as trace
|
||||
from opentelemetry.context import Context
|
||||
from opentelemetry.trace.propagation.textmap import (
|
||||
from opentelemetry.propagators.textmap import (
|
||||
Getter,
|
||||
Setter,
|
||||
TextMapPropagator,
|
||||
@ -316,7 +316,7 @@ class AwsXRayFormat(TextMapPropagator):
|
||||
"""Returns a set with the fields set in `inject`.
|
||||
|
||||
See
|
||||
`opentelemetry.trace.propagation.textmap.TextMapPropagator.fields`
|
||||
`opentelemetry.propagators.textmap.TextMapPropagator.fields`
|
||||
"""
|
||||
|
||||
return {TRACE_HEADER_KEY}
|
||||
|
@ -14,11 +14,11 @@
|
||||
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
|
||||
from opentelemetry.propagators.textmap import DictGetter
|
||||
from opentelemetry.sdk.extension.aws.trace.propagation.aws_xray_format import (
|
||||
TRACE_HEADER_KEY,
|
||||
AwsXRayFormat,
|
||||
)
|
||||
from opentelemetry.trace.propagation.textmap import DictGetter
|
||||
|
||||
XRAY_PROPAGATOR = AwsXRayFormat()
|
||||
|
||||
|
@ -18,6 +18,7 @@ from unittest.mock import Mock, patch
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
|
||||
import opentelemetry.trace as trace_api
|
||||
from opentelemetry.propagators.textmap import DictGetter
|
||||
from opentelemetry.sdk.extension.aws.trace.propagation.aws_xray_format import (
|
||||
TRACE_HEADER_KEY,
|
||||
AwsXRayFormat,
|
||||
@ -31,7 +32,6 @@ from opentelemetry.trace import (
|
||||
TraceState,
|
||||
set_span_in_context,
|
||||
)
|
||||
from opentelemetry.trace.propagation.textmap import DictGetter
|
||||
|
||||
TRACE_ID_BASE16 = "8a3c60f7d188f8fa79d48a391a778fa6"
|
||||
|
||||
|
Reference in New Issue
Block a user