eebbesen
eebbesen

Reputation: 5148

New Relic system memory page shows three New Relic libraries instead of two

Why am I seeing three New Relic library entries when I only expect two? Am I redundantly referencing the New Relic jars somewhere?

I have the following in my pom.xml

    <dependency>
        <groupId>com.newrelic.agent.java</groupId>
        <artifactId>newrelic-agent</artifactId>
        <version>3.0.1</version>
    </dependency>

    <dependency>
        <groupId>com.newrelic.agent.java</groupId>
        <artifactId>newrelic-api</artifactId>
        <version>3.0.1</version>
    </dependency>  

But on the Settings -> Environment page (https://rpm.newrelic.com/accounts/<account_id>/applications/<app_id>/environment) I see three entries:

newrelic-agent  3.0.1
newrelic-api    3.0.1
newrelic        3.0.1

I first saw this when the javaagent my JVM was pointing to was an different version than the on described in my pom.xml. It looks like I've got the two defined in the pom (required for me to compile my Java code that make use of the New Relic API) and the one pointed to as the agent when I start the JVM.

Upvotes: 0

Views: 138

Answers (1)

fool
fool

Reputation: 499

I work for New Relic tech support.

I asked our Java Agent authors how this could be happening and got the following advice:

1) you need not have anything other than newrelic-api.jar on your CLASSPATH. If you have other things like newrelic-agent.jar or newrelic.jar, those only need to be specified as -javaagent: settings (and only one of them!), not on your classpath. Removing any reference there should remove those from the list, eventually (see #2).

2) if you formerly had another reference to one of those unneeded jars in your classpath, that environment page is not necessarily realtime and might have some old cached data in it for awhile. If you spin your app up with a different app_name setting so you get a fresh clean listing for that page, and don't have anything other than newrelic-api.jar on your CLASSPATH, that should be the only one that shows up. I'm not advising you to do this permanently since your historical data will live under the old appname, only as a proof of concept.

In any case, having them listed should be harmless, but if you can't manage to spin up a new app to demonstrate that we won't see them if they're not & have never been on the classpath, and this is irking you, you should open a ticket at https://support.newrelic.com so we can investigate your particular app from our end.

Upvotes: 1

Related Questions