-
Notifications
You must be signed in to change notification settings - Fork 888
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
Add support for OTEL_RESOURCE_DETECTORS
environment variable
#2948
Comments
Hi @open-telemetry/specs-triagers : any update on this issue? |
FYI #2891 (comment). |
The |
@reyang, I am not sure I understood it. How is this different from |
It is DETECTOR or DETECTORS? |
I am okay with either of the naming but what I am mainly trying to achieve is the SDK to support this capability. An |
I added a comment to open-telemetry/opentelemetry-python-contrib#1372 already, that OTEL_RESOURCE_DETECTORS might not work as expected:
I argue that the way how resource detectors are specified today in the spec, is not practical to end-users: right now the burden to decide which resource detectors are part of an application lays with the developer, although the developer might not have a full understanding on which resources an application will run in the future, e.g. the application might be migrated from one environment to another (let's say from Cloud Vendor A to Cloud Vendor B), or the application might be an open source product used in plenty of environments, like bare metal, docker, different cloud vendors, etc. There are now two options:
So, the question I am asking myself now, is how can OpenTelemetry provide a practical way for Developers & Operators to detect resources? |
All the exporters are also outside of the SDK and implemented as standalone packages. The propagator such as |
Fair point, I had to think about this for a while. From that perspective I agree that having OTEL_RESOURCE_DETECTORS is a meaningful addition to the spec (although I assume the addition is blocked by the moratorium @reyang mentioned here). Independent of that end-users might need some guidance on which detectors to add in which situation, but that's an issue on it's own. |
Arent' these included by default in the API though? |
Only |
Alright :). Remembered I saw the |
@reyang, do you still think this should be rejected? I would appreciate the reasoning behind the rejection, given that we have similar capabilities supported for exporters/propagators etc... |
@srikanthccv the reason is captured here. |
I looked around and didn't find anything related to this. Feel free to point me out if this has been discussed earlier. The SDK default behaviour is to use EnvDetector (using env
OTEL_RESOURCE_ATTRIBUTES
) and populate some necessary default values. There is no way to configure the SDK to detect and load the resource detector automatically. This is especially important in auto instrumentation cases where the user also wants some custom/third-party resource detector configured via env as with other components such as exporters. I propose addingOTEL_RESOURCE_DETECTORS
with default valueenv
and (optionally cloud platform-specific standard detectors). I can send a PR if this is accepted.The original issue that motivated this open-telemetry/opentelemetry-python-contrib#1372
The text was updated successfully, but these errors were encountered: