Skip to content

Commit 8edf143

Browse files
authored
fix: outdated classes (#374)
1 parent d8c3ab2 commit 8edf143

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/docs/getting-started/python-sdk/trace-manual-instr.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ import json
6464
from opentelemetry import trace
6565
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
6666
from opentelemetry.sdk.trace import TracerProvider
67-
from opentelemetry.sdk.trace.export import BatchExportSpanProcessor
67+
from opentelemetry.sdk.trace.export import BatchSpanProcessor
6868

6969
# Import the AWS X-Ray for OTel Python IDs Generator into the application.
70-
from opentelemetry.sdk.extension.aws.trace import AwsXRayIdsGenerator
70+
from opentelemetry.sdk.extension.aws.trace import AwsXRayIdGenerator
7171
```
7272

7373
Next, configure the Global Tracer Provider to export to the ADOT Collector. The configuration of your SDK exporter depends on how you wish to connect with your configured ADOT Collector.
@@ -78,9 +78,9 @@ Connecting to an ADOT Collector running as a sidecar, we can set up the TracerPr
7878
# Sends generated traces in the OTLP format to an ADOT Collector running on port 4317
7979
otlp_exporter = OTLPSpanExporter(endpoint="http://localhost:4317")
8080
# Processes traces in batches as opposed to immediately one after the other
81-
span_processor = BatchExportSpanProcessor(otlp_exporter)
81+
span_processor = BatchSpanProcessor(otlp_exporter)
8282
# Configures the Global Tracer Provider
83-
trace.set_tracer_provider(TracerProvider(active_span_processor=span_processor, ids_generator=AwsXRayIdsGenerator()))
83+
trace.set_tracer_provider(TracerProvider(active_span_processor=span_processor, ids_generator=AwsXRayIdGenerator()))
8484
```
8585

8686
The `endpoint=` argument allows you to set the address that the exporter will use to connect to the collector. If unset, the SDK will try to connect to `http://localhost:4317` by default. Note that because the scheme is `http` by default, you have to explicitly set it to be `https` if necessary.

0 commit comments

Comments
 (0)