Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f008a4 commit 66d67b8Copy full SHA for 66d67b8
examples/opentelemetry-example-app/src/opentelemetry_example_app/context_propagation_example.py
@@ -76,8 +76,10 @@ def fetch_from_service_c() -> str:
76
77
@app.route("/")
78
def hello():
79
- tracer = trace.tracer_source()
80
- tracer.add_span_processor(BatchExportSpanProcessor(ConsoleSpanExporter()))
+ tracer = trace.tracer_source().get_tracer(__name__)
+ trace.tracer_source().add_span_processor(
81
+ BatchExportSpanProcessor(ConsoleSpanExporter())
82
+ )
83
with propagation.extract(request.headers):
84
# extract a baggage header
85
with tracer.start_as_current_span("service-span"):
0 commit comments