-
Notifications
You must be signed in to change notification settings - Fork 606
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 a simple way to configure system-metrics from outside #2528
Comments
cc @jeremydvoss |
This is called for every entrypoint found by auto instrumentation and so it takes just one entry point. Refs open-telemetry#2528
So using load_instrumentor will look like this:
An improvement would be to being able to reduce a bit of duplicated code would be something like this where on the distro side I would only override the helper returning the kwargs for the instrumentor constructor:
|
load_instrumentor_kwargs seems to me like a method that can be entirely handled by the custom ElasticOpenTelemetryDistro. I think we should only change the sdk/api if it were preventing instrumentation kwarg configuration |
Would making it an internal helper ok? It would be useful as documentation at least. |
Is your feature request related to a problem?
I would like to easily provide a different config for system metrics, i.e. to provide a subset of metrics, depending on an environment variable.
The instrumentation config can be passed to the instrumentation constructor.
Here's the config:
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py#L99
In today SIG @aabmass suggested to take a look at
BaseDistro.load_instrumentor()
that may already do the trickDescribe the solution you'd like
No solution in mind
Describe alternatives you've considered
None
Additional context
The text was updated successfully, but these errors were encountered: