New Relic agent developer mode vs. local mock collector for integration tests without production credentials
0 reputation · 27 Sept 2026, 01:45 UTC
0 reputation · 27 Sept 2026, 01:45 UTC
I want to run an integration test suite that exercises a New Relic language agent's instrumentation hooks against a test application, without using a real license key and without any data reaching a live New Relic account.
Two documented approaches seem possible: enabling the agent's developer mode (via developer_mode: true in the config or the NEW_RELIC_DEVELOPER_MODE environment variable), which initializes the agent but discards metric data locally, or pointing the agent at a local mock collector by overriding the host and port and capturing the payloads with a stub server.
The unresolved decision is which approach gives reliable verification. Developer mode appears to only confirm data was discarded, while a mock collector would let me inspect actual payload structure — but introduces the risk of misconfigured networking leaking traffic to the real collector endpoint. I am also unsure whether developer mode behaves identically across agent versions, since some older agents reportedly reject placeholder license keys and fail to start.
Specifically:
collector.newrelic.com occurs if the stub is unreachable?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.