-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 collectorNamePattern in config and JavaAgent #760
base: main
Are you sure you want to change the base?
Conversation
3c77382
to
0288615
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks a lot for your PR. I added two minor comments, apart from that it's looking good.
jmx_prometheus_javaagent_common/src/main/java/io/prometheus/jmx/JavaAgent.java
Outdated
Show resolved
Hide resolved
…s optional collectorNamePattern to set from Config file to filter metrics. Signed-off-by: scottselikoff <[email protected]>
Signed-off-by: scottselikoff <[email protected]>
bef32c1
to
b425a01
Compare
@fstab Can we merge this CL? I believe I addressed your concerns. |
@Selikoff looking at the PR... I think the changes should also be made to the standalone HTTP JMX exporter as well. |
I'd also would very much like to see this merged, currently I'm not sure I can deploy this on high-volume systems without risk. |
@Selikoff are you still interested in completing this PR? |
@Selikoff following up on the PR. Are you still interested in completing this PR? |
@Selikoff following up on the PR. Are you still interested in completing this PR? |
Per Issue 759, there is no way to prevent certain metrics from being processed, such as
jvm_threads_state
, as this is run insideCollectionRegistry
before the jmx_exporter code can apply any rules. For applications with a lot of threads, this can temporarily cause the application to hang even if the metrics are later filtered out by a rule.The solution is to add a new pattern value to the config that can be sent into
JavaAgent
and then passed to theHTTPServer
as aSampleNameFilter
. This allows metrics to be skipped from processing and resolves issue #759 by adding a config such as:Adding per contributors read me: @fstab @tomwilkie