-
Notifications
You must be signed in to change notification settings - Fork 645
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
[redis] Unable to initiate tracer #405
[redis] Unable to initiate tracer #405
Comments
I have the same problem, but with the Flask instrumentation. |
You need to set the trace pipeline with concrete implementation of tracer provider before adding span processor. Please share more context. |
hey @ashok-an and @dgzlopes, in both cases you will need to configure a
|
Thanks, @lonewolf3739 and @codeboten! Fixed my code by moving the TraceProvider configuration to the top. On my case: # This works!
trace.set_tracer_provider(TracerProvider())
jaeger_exporter = JaegerExporter(
...
)
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(jaeger_exporter)
) # This doesn't work
jaeger_exporter = JaegerExporter(
...
)
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(jaeger_exporter)
) |
@dgzlopes glad you found a way to make it work. What you did to fix it is still the recommended way to setup tracing i.e, registering a global tracer provider before other things. We'll still ship a fix for this in the next release so cases where users cannot control the order in which things are setup will work as expected as well. |
Thanks for the response @owais! I'll keep that in mind :) |
Describe your environment
Unable to initiate tracer
Steps to reproduce
What is the expected behavior?
tracer instance
What is the actual behavior?
Additional context
Reference: https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py
The text was updated successfully, but these errors were encountered: