-
Notifications
You must be signed in to change notification settings - Fork 195
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
Turn off customMetrics, performanceCounters and metrics collected by default #1905
Comments
have you tried this? this will disable all jms metrics, perf counters. |
another option you can try is using metrics filtering. this allows you to filter out unwanted metrics. |
Well, I'm asking about JVM metrics plus I'm not using JMS atm so "jms enabled" will not solve it. I've also found this Line 91 in 9d1ec8c
It suggests that it's not possible to disable them as they are treated as non-filtered metrics/perf counters. |
default metrics and perf counter collected by 3.x agent. you can use metrics filtering to filter both perf counter and custom metrics. i don't believe we use jvm to define any metrics we collect. |
fyi: some metrics specific to jvm are like the following: | jvm_memory_used | |
here is an example how to use metric filter:
|
I added following config:
and still I got in AI following custom metrics/perf counters | performanceCounter | Available Bytes | Memory | I believe they match following code Line 91 in 9d1ec8c
The fact that the agent collects some metrics/perf counters out-of-the box plus it is not documented at all is confusing. Additionally some telemetries can not be filtered. I think metrics with prefix jvm_ comes from micrometer :) Magically when I put agent jar on the classpath they were collected |
You can disable micrometer by doing the following:
do you want to turn off metrics and perf counter completely?
this will turn off all telemetries though. alternatively, you can use metric interval:
this includes perf counters and metrics. but it doesn't impact custom metrics via 2.x SDK trackMetrics. Hope these help. |
https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-in-process-agent#auto-collected-metrics we do documented auto-collected metrics. hope this will clear your confusion. |
Thanks, what I want to achieve is to turn off collecting of metrics/perf counters that are enabled by default. I think the scenario I want to achieve is pretty standard. I don't understand why there is something enabled by default that can not be completely turn off. Better approach would be to explicitly enable collecting of default metrics with some config. I haven't found a link (https://github.com/microsoft/ApplicationInsights-Java/wiki/Default-Metrics-Captured-by-Java-3.0-Agent ) on docs.microsoft.com so I thought it's not documented at all :) |
Thanks, a good point. We will make that link available in the public azure docs. I've created a work item to track it #12103176.
i think that's a valid ask. I will circle back if we will extend this feature to let customers have the ability to turn off default collected custom metrics, perf counters and metrics. |
@lidkowiak confirmed. we will add that feature to turn off custom metrics, metrics and perf counters collected by default. work item |
hi @lidkowiak @emmansun can you confirm your reason for wanting to turn of the default metrics below? is it for cost, or for other reasons? thx! Lines 37 to 45 in 53ea6e7
|
Hi @trask , in our use case, we use ApplicationInsights-Java for e2e trace, e.g. Request/Dependency/Trace log/..., for metric monitor, we have other solution. So we hope end user can have options to enable/disable those metrics collection, include default metrics. Yes, cost is also our concern. Thx! |
Is your feature request related to a problem? Please describe.
By default agent collects lots of metrics/data:
customMetric Loaded Class Count
customMetric % Of Max Heap Memory Used
customMetric Heap Memory Used (MB)
customMetric Suspected Deadlocked Threads
customMetric Current Thread Count
customMetric GC Total Time
customMetric GC Total Count
customMetric HeartbeatState
performanceCounter Available Bytes
performanceCounter IO Data Bytes/sec
performanceCounter % Processor Time
performanceCounter Private Bytes
metric Loaded Class Count
metric % Of Max Heap Memory Used
metric Heap Memory Used (MB)
metric Suspected Deadlocked Threads
metric Current Thread Count
metric GC Total Time
metric GC Total Count
metric HeartbeatState
metric Available Bytes
metric % Processor Time
metric Private Bytes
metric IO Data Bytes/sec
I prefer to use standard provided by Spring Boot/Micrometer. Is there a possibility to turn off collecting of the above telemetries?
Describe the solution you would like
By default no telemetries should be collected by default. Adding a config entry like collectStandardJVMMetric should cause collecting the data.
Describe alternatives you have considered
Additional context
The text was updated successfully, but these errors were encountered: