-
Notifications
You must be signed in to change notification settings - Fork 155
Add support for cli params/custom label in groovy script #33
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
Comments
@jatan28 after looking into this a bit I think the use case you're describing may better match resource attributes than labels for individual points. The metric gatherer uses the autoconfigure sdk extension that provides a property for setting these. Allowing for arbitrary labels for each datapoint would require wrapping the OTel instrument methods to inject them, and this seems undesirable. The label function feature and labels parameter for recording values should already provide the ability to do this where desired in custom script functionality. Would it be acceptable for me to add a
The Collector's configuration library doesn't support case sensitive map keys, so I think this would need to be an array of strings to reduce the potential for unexpected behavior. |
@rmfitzpatrick Yes, this solution would solve the problem in hand. With this and a custom groovy script, we should be able to differentiate the jmx metrics |
@jatan28 appears the Collector contrib project has just released a new version with the added functionality in the JMX receiver: https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.28.0 Thanks for your patience, and if you run into any issues using it please don't hesitate to open an issue in that project. |
Uh oh!
There was an error while loading. Please reload this page.
Currently, when you are trying to monitor the JVM metrics(using JMX receiver) for multiple processes/applications on a single host, it is impossible to differentiate which process the metrics originated from.
Having support for adding custom labels to the groovy script through command line params or a config would provide the required flexibility to re-use the same groovy script to solve the problem stated above and also give end users the option to add more labels.
Example
OR
The text was updated successfully, but these errors were encountered: