wavefrontHQ / wavefront-dropwizard-metrics-sdk-java

Send Dropwizard Metrics to Wavefront

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove custom JVM metrics code

panghy opened this issue · comments

Since dropwizard/metrics#1236, there is no longer exceptions of the kind:

ERROR [2018-09-29 06:55:48,122] com.codahale.metrics.ScheduledReporter: Exception thrown from WavefrontReporter#report. Exception was suppressed.
! java.lang.reflect.InaccessibleObjectException: Unable to make public long com.sun.management.internal.OperatingSystemImpl.getOpenFileDescriptorCount() accessible: module jdk.management does not "opens com.sun.management.internal" to unnamed module @7aea704c
! at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
! at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
! at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
! at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
! at com.codahale.metrics.jvm.FileDescriptorRatioGauge.invoke(FileDescriptorRatioGauge.java:48)
! at com.codahale.metrics.jvm.FileDescriptorRatioGauge.getRatio(FileDescriptorRatioGauge.java:35)
! at com.codahale.metrics.RatioGauge.getValue(RatioGauge.java:64)
! at com.codahale.metrics.RatioGauge.getValue(RatioGauge.java:11)
! at com.wavefront.integrations.metrics.WavefrontReporter.report(WavefrontReporter.java:430)
! at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:243)
! at com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:182)

on Java 9 and beyond. We should remove logic in our codebase.

Fixed