-
Notifications
You must be signed in to change notification settings - Fork 671
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
Support resource detector in auto instrumentation by entry_point or whatever #1752
Comments
Is this for end users or distributors? Could it be solved by implementing a custom configurator that knows which resource detectors to use. |
Can we follow this pattern https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py#L42 ? From end users' perspective, auto-instrumentation loads all of resource detectors installed in current environment, unless explicitly excluded by env variable |
Yes, that sounds reasonable if you want this for end users. |
It is more complicated that that though as the result of resource detectors (resources) must be passed on to the tracer provider constructor. So we'd have to load resource detectors using entry points and pass them to whatever configurator is found. Essentially the It'd be up to each configurator to use the detectors when setting up tracer providers. We can update the configurator in opentelemetry-distro to use them. |
I am not sure if my problem is related, but I can't get any fully auto instrumentation (distro/conf + spans) to work with any other than console_span, i.e. zipkin and jaeger fail
venv properly activated
deps installed in venv
Works fine as per the example. If I also install opentelemetry-distro, then I get the span on the console twice (once from code once from auto-distro)
Thanks for any clues. |
Hello Sorry for the late reply. Please try with |
Thanks a lot, it works now, so I think I will spend 1/2 day in the next two weeks for a PR of documentation improvement. |
Is your feature request related to a problem?
Python sdk supports add resource detector to provider by code change. We want to support custom resource detector in auto-instrumentation without code change..
Describe the solution you'd like
load resource detectors from entry_points or by env variable
Describe alternatives you've considered
Which alternative solutions or features have you considered?
NA
The text was updated successfully, but these errors were encountered: