Feature Idea: Support reading from environmental variable to disable .NET Core agent

There’s other agents that support some variety of launch parameters and/or environmental variable conformance as to whether the New Relic agent runs or not.

.NET core relies on reading a XML file.

It should read from this in a tiered structure (similar to how AWS would get credentials), with the environment variable overriding the configuration file.

For anyone reading and wanting a workaround - we ultimately decided on it was easier to completely bypass the agent installation on envs that we did not want the agent running.

New Relic Edit

  • I want this too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.

1 Like

Hey @charles.lee - Thanks for posting your feature idea here. I’ve got that filed internally now & I have added a poll here for others to vote on. :smiley:

You’ve got to be kidding me right? Is this still not possible?
I need to disable the agent for Test, Acceptance and Staging, using Docker.
The image we build is exactly the same for Staging and Production, so how on earth can I disable the agent based on the environment it’s running on if this is not possible yet???

Setting CORECLR_ENABLE_PROFILING=0 seems like a valid work-around.


Yes, the above solution will work.


This is the Microsoft-defined method for disabling all .NET Core profiling via an environment variable.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.