Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

ClassHistogram error



We are trying to get the class histogram extension working with no success. Even though our integration with APM and Insights works fine, and after following the guidelines for adding the class histogram extension, we can’t get it to work and report as expected.

  • Current library versions:

    compile ‘’
    compile ‘’
    compile ‘com.newrelic.agent.extension:class-histogram-extension:1.1.0’

  • YML configuration
    enabled: true
    classes_per_histogram: 50
    delay_between_calls_seconds: 60

We have already tried setting NewRelic’s log level to finest, and this is the output we got:

Mar 25, 2020 19:39:43 +0000 [28809 1] com.newrelic.agent.extension.ExtensionService FINE: Invoking com.newrelic.classhistogram.ExtensionPremain.premain method
Mar 25, 2020 19:39:43 +0000 [28809 1] com.newrelic.agent.extension.ExtensionService INFO: Unable to invoke com.newrelic.classhistogram.ExtensionPremain.premain
Mar 25, 2020 19:39:43 +0000 [28809 1] com.newrelic.agent.extension.ExtensionService FINEST: Noticed extension class com.newrelic.classhistogram.ClassHistogramConfiguration

The way we read this is that the jar is correctly being loaded but for whatever reason the extension can’t be weaved into correctly.
Any thoughts?


Hey @guillermo.kleinlein. The one thing that looks to be missing from the configuration is the path to the jdk. Or, did you leave that out of the forum post intentionally?
There should be a path to the jdk bin.

jmap_path: /your/jdk/bin 

The extensions invokes a jmap instance.

There are a few logs entries that we can look for. Do you see anything that indicates any of the log lines below?

Starting jmap process

Started jmap process

jmap exited with 

Are there any RuntimeExceptions in the logs? Or just grep for anything jmap


Thanks @bellis for your help.
As a matter of fact, the jmap path property has a default value defined within the New Relic code, so as long as that matches with the java’s bin folder’s location, it will be fine, thus no need to define it.
As a side node, you can’t put environment variables from within the yml (i.e $JAVA_HOME/bin), as it will be taken as a literal.
It seems it only took a restart for the events start showing up in Insights.