The C SDK is designed to support the often complex, multi-threaded nature of C/C++ applications. You can gain a new level of visibility to help you identify and solve performance issues. You can also collect and analyze data to help you improve the customer experience and make data-driven business decisions.
The C SDK can be used to instrument a wide range of applications beyond C or C++. If your application does not use other languages supported by New Relic and can import C libraries, then you can use the New Relic C SDK to take advantage of our monitoring capabilities and features.
one.newrelic.com > APM > (select an app): Here is an example of some of the data you can view in New Relic after you deploy the C SDK for your app.
If your app meets the C SDK's compatibility and requirements in Linux environments, you can customize the generic library to communicate with New Relic, then start with APM to monitor your app's performance.
What you can do
How to do it
See the big picture
Identify and fix errors
Analyze business data
The C SDK relies on two components to send data from your application to New Relic:
- The lC SDK calls: You download this library, then add the calls and instrumentation to your application's code. This allows you to identify and customize the kinds of data that matters the most to you.
- The C SDK daemon: This is a separate binary that accumulates data from the C SDK calls, and sends it to New Relic. This acts as a proxy between the SDK and New Relic.
C SDK architecture: To send data from your application to New Relic, the daemon must be invoked before making calls to your application's C SDK instrumentation library.
Working together, the C SDK instrumentation and the daemon forward data on to New Relic where you can view and query data about transactions. The workflow between your application and New Relic must occur in this order:
- An HTTPS link is established between the daemon and New Relic. The daemon must be invoked first, before your instrumented application is invoked.
- Next, socket communication is established between your instrumented application and the daemon. This occurs after successful calls to
The call to
newrelic_create_app() is non-blocking. Its second parameter allows you to specify an amount of time for your instrumented application to wait so that the socket communication is adequately established. For example:
newrelic_app_t* app = newrelic_create_app(config, 10000);
If your instrumented application sends transactions before both the daemon connection and your application's socket communication are established, data reported from your application will be lost.
To use our C SDK agent:
- Make sure your application meets the compatibility and requirements for the C SDK.
- If you do not already have one, sign up for a free New Relic account.
- Use our launcher, or follow the installation and instrumentation procedures to install the agent. Within a few minutes, you will be able to view data from your application in your New Relic account's UI.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.