-
Notifications
You must be signed in to change notification settings - Fork 200
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
Cannot fetch jmx counter for GC with Java SDK agent #952
Comments
@usecloud It looks like |
without # is not working either |
We've found the issue and plan to fix in the next service release. |
This is fixed now in Preview.7 |
ghost
locked as resolved and limited conversation to collaborators
Jul 20, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected behavior
I am trying to fetch data from mbeans about last GC duration but I am receiving error
Actual behavior
RROR 18-06-2019 20:59:52.694+0000, 27(PerformanceCounterContainer-0): Failed to fetch JMX object 'java.lang:type=GarbageCollector,name=PS MarkSweep' with attribute 'LastGcInfo.#duration': 'java.lang.ClassCastException: sun.management.GcInfoCompositeData cannot be cast to javax.management.openmbean.CompositeDataSupport'
ERROR 18-06-2019 20:59:52.695+0000, 27(PerformanceCounterContainer-0): Error while fetching JMX data: 'java.lang.ClassCastException: sun.management.GcInfoCompositeData cannot be cast to javax.management.openmbean.CompositeDataSupport', The PC will be ignored
TRACE 18-06-2019 20:59:52.697+0000, 27(PerformanceCounterContainer-0): Stack trace generated is java.lang.ClassCastException: sun.management.GcInfoCompositeData cannot be cast to javax.management.openmbean.CompositeDataSupport
at com.microsoft.applicationinsights.internal.jmx.JmxDataFetcher.fetch(JmxDataFetcher.java:113)
at com.microsoft.applicationinsights.internal.jmx.JmxDataFetcher.fetch(JmxDataFetcher.java:72)
at com.microsoft.applicationinsights.internal.perfcounter.AbstractJmxPerformanceCounter.report(AbstractJmxPerformanceCounter.java:64)
at com.microsoft.applicationinsights.internal.perfcounter.PerformanceCounterContainer$1.run(PerformanceCounterContainer.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
To Reproduce
Steps to reproduce the behavior:
My configuration in ApplicationInsight
Sample Application
The application is running on Tomcat 9
System information
Please provide the following information:
Logs
Turn on SDK logs and attach/paste them to the issue. If using an application server, also attach any relevant server logs.
Be sure to remove any private information from the logs before posting!
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: