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

fix(docs): outdated class names #374

Merged
merged 1 commit into from
Aug 22, 2022
Merged

Conversation

hkford
Copy link
Contributor

@hkford hkford commented Aug 21, 2022

Solve this issue

Tracing with ADOT Python SDK and X-Ray documentation uses some old classes.

Sending Traces to AWS X-Ray should be like the following because BatchExportSpanProcessor is renamed to BatchSpanProcessor at this PR and AwsXRayIdsGenerator is renamed to AwsXRayIdGenerator at this PR.

from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.sdk.extension.aws.trace import AwsXRayIdGenerator
# Sends generated traces in the OTLP format to an ADOT Collector running on port 4317
otlp_exporter = OTLPSpanExporter(endpoint="http://localhost:4317")
# Processes traces in batches as opposed to immediately one after the other
span_processor = BatchSpanProcessor(otlp_exporter)
# Configures the Global Tracer Provider
trace.set_tracer_provider(TracerProvider(active_span_processor=span_processor, ids_generator=AwsXRayIdGenerator()))

@bryan-aguilar bryan-aguilar merged commit 8edf143 into aws-otel:main Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants