Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e5c1cb

Browse files
docs/examples/http: Remove duplicated call to set_tracer_provider (open-telemetry#560)
set_tracer_provider() was called twice using different TracerProvider objects. It caused that the "parent" span wasn't exported because it was created with a tracer from the first call to set_tracer_provider that didn't have a configured span processor.
1 parent 4b8892c commit 2e5c1cb

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

docs/examples/http/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
exporter = ConsoleSpanExporter()
3737
span_processor = BatchExportSpanProcessor(exporter)
38-
trace.set_tracer_provider(TracerProvider())
3938
trace.get_tracer_provider().add_span_processor(span_processor)
4039

4140
# Integrations are the glue that binds the OpenTelemetry API and the

0 commit comments

Comments
 (0)