Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

feat: Prevent agent from talking to New Relic (but preserve instrumentation) #1

Merged
merged 5 commits into from
Jun 26, 2024

Conversation

timmc-edx
Copy link
Member

If the Django setting EDX_NEWRELIC_NO_REPORT is present and enabled, the agent will not talk to New Relic's servers and will instead use a set of previously captured responses from our sandbox account.

Instrumentation (tracing, etc.) will still be in place, but the data will be discarded rather than being reported.

See edx/edx-arch-experiments#692

# {return_value: ...} wrapper has been removed from each of these
FAKE_AGENT_RESPONSE = {
'preconnect': {"redirect_host": "collector.newrelic.com"},
'connect': json_decode(r"""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to move the connect response to a Django setting so we can iterate on it if needed. But I suspect it's fine as is while we do the experiment.

'preconnect': {"redirect_host": "collector.newrelic.com"},
'connect': json_decode(r"""
{
"agent_run_id": "xxx1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed everything that looked like an identifier or key and replaced it with xxxN.

Copy link

@robrap robrap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun. I guess we don't have much to lose, except the data, which we want to lose.

@timmc-edx timmc-edx merged commit 5c21db1 into 2u/no-report Jun 26, 2024
1 check passed
@timmc-edx timmc-edx deleted the timmc/local-only branch June 26, 2024 19:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants