newrelic / newrelic/newrelic-java-agent

Stop reporting the values of invalid env vars / sysprops / config

Open
#3,104 1 comment 0 reactions 1 assignee View on GitHub

@jtduffy is already working on this.

Since Sep 15, 2026.

feature request
Dominant language
Java
Stars
240
Forks
170
Avg merge
3d 2h
Merged PRs (30d)
21

Description

Is your feature request related to a problem? Please describe.

A deployment specified NEW_RELIC_API_KEY in the environment of the container. The Java agent read this and sent it to the collector as an api_key value that shows, unredacted, under the Agent initialization UI.

Feature Description

While we are removing NEW_RELIC_API_KEY from that deployment, and while we are pursuing a separate fix to make the Agent initialization UI a little more redactive, I think the agent should also modify its behavior and, if it detects an invalid configuration, it should say so. That way the user knows that a value was specified but also that it wasn't parsed. As we don't know if random values are actually sensitive, we should avoid sending any of the values (after all, they could represent a log4shell-like attack either on the consumer or on a browser).

For example, if NEW_RELIC_NOT_A_VAR is set in the environment, it should send:

not_a_var: Invalid env var NEW_RELIC_NOT_A_VAR

If -Dnewrelic.not_a_var is provided on the command-line, it should send:

not_a_var: Invalid system property newrelic.not_a_var

Describe Alternatives

You could also simply not send invalid values at all, but log them instead. That way, they never leave the execution environment.

Priority

Really Want

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.