As of April 2022, we're discontinuing support for several capabilities, including the C SDK. For more details, including how you can easily prepare for this transition, see our Support Forum post.
Follow these procedures as appropriate to temporarily disable the C SDK in your app's code library or to remove it completely.
As a C library that provides direct access to the New Relic API, the C SDK cannot be turned on or off directly. However, you can write your code for the SDK so that a quick recompile and deploy can enable or disable your instrumentation.
One approach is to use an
#ifdef macro. By surrounding all your instrumentation in
#ifdef macros and setting the value of
YOURNAMESPACE_NEWRELIC_ENABLED with your build system, you will be able to quickly enable or disable New Relic's instrumentation in your C/C++ based programs by recompiling them and then redeploying the application.
To remove the New Relic C SDK completely from your app's code library:
- Remove the linking to
libnewrelic.ain your build system.
- Remove all New Relic API calls from your application code.
- Recompile and redeploy your application.