javanewrelicnewrelic-platform

Send newrelic application name


I'm using newrelic java agent, I'm sending informarion to newrelic insights from my java app. how to send also newrelic application name (exist in newrelic.yml) so that I can know which application is sending the information.


Solution

  • I open a discussion with newrelic support

    https://discuss.newrelic.com/t/how-to-get-app-name-from-my-application/49366

    Support answer:

    The application name should automatically be included in all Transaction events from APM apps under the appName attribute. You can include additional custom attributes - such as the number of users - in Transaction events by calling the agent API as outlined here: https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/collect-custom-attributes#enabling-custom.

    For example, in Java:

    NewRelic.addCustomParameter("numberOfUsers", numberOfUsers);