New Relic Java APM agent: Determining effective app_name when both newrelic.yml and environment variable are set
0 reputation · 28 May 2020, 20:08 UTC
Goal: guarantee that a single deployable image produces the same New Relic APM entity name regardless of the environment it runs in.
Uncertainty: when both newrelic.yml defines app_name and the NEW_RELIC_APP_NAME environment variable (or JVM system property) are present, the agent’s precedence rules determine which value wins, and those rules can differ across agent releases, potentially splitting one service into multiple entities. Additionally, an incorrect region/endpoint paired with a valid license key may silently drop data, complicating validation.
Questions:
- Which configuration source takes precedence for
app_namewhen both the YAML file and the environment variable are set? - Does this precedence change between specific New Relic Java agent versions, and how can it be verified for a given pinned version?
- What validation steps confirm that the effective
app_nameand ingest region produce expected telemetry without altering the immutable artifact?