-
Notifications
You must be signed in to change notification settings - Fork 626
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
error with logging instrumentation - AttributeError: 'ProxyTracerProvider' object has no attribute 'resource' #810
Comments
You need to set up the SDK and tracing pipeline before you can use any instrumentors. Please refer to this: https://opentelemetry-python.readthedocs.io/en/latest/getting-started.html |
|
This is right, but we should not fail like this (with an attribute error) if SDK or tracing has not yet been set. |
We shouldn't. I meant to bring it up in weekly SIG this Thursday. |
@proffalken |
@lzchen - apologies, I'd forgotten that I'd commented here, the linked issue resolved my particular problem. |
Imo, the instrumentation shouldn't make any assumptions about the SDK at all since it does not define a dependency to it. Furtheremore, there might be 3rd party SDKs in the wild that might handle things like resources differently. |
Hello all, Is the logging instrumentation supposed to work with the auto-instrumentation? I'm asking because when I use the I have this sample with the logging instrumentation commented out, just in case someone wants to reproduce the issue. |
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes open-telemetry#810
Now service name is extracted from the provider defensively and lazily. This accounts for an SDK that does not provide access to "resource" via TracerProviders and for lazy initialization of TracerProviders. Fixes #810 Co-authored-by: Diego Hurtado <[email protected]>
Describe your environment
LoggingInstrumentor().instrument() is throwing an error
Steps to reproduce
Below packages installed and trying to instrument with below two lines:
What is the expected behavior?
What did you expect to see?
logging should be instrumented properly.
What is the actual behavior?
What did you see instead?
logging should be instrumented properly and populate the otelTraceID and otelSpanID in the logs.
Additional context
Add any other context about the problem here.
$ python3 --version
Python 3.8.10
manage.py:
The text was updated successfully, but these errors were encountered: