Our C SDK auto-instruments your code so you can start monitoring applications. You can use our launcher, or follow the instructions in this document to complete a basic C SDK installation.
To use the C SDK or any other agent, as well as the rest of our observability platform, join the New Relic family! Sign up to create your free account in only a few seconds. Then ingest up to 100GB of data for free each month. Forever.
Add the C SDK to your code
To monitor your application with New Relic's C SDK, instrument the features you want to use:
Web transactions, transaction events, non-web transactions
Segments (for additional levels of timing details)
Attributes
Errors
Then compile and link your app against the C SDK static library.
To install the C SDK into your application's code library, follow this procedure.
You may give your application up to three different names, separated by ;. Giving your application multiple names allows you to aggregate metrics for multiple agents across an entire app or service; for example:
The C SDK's libnewrelic.a is a static library that is already linked with the libpcre and libpthread libraries. To avoid symbol collisions in this linking step, be sure to link against each of these libraries.
In addition, to take full advantage of error traces in APM's Error analytics page, link your application using GNU's -rdynamic linker flag. This will allow more meaningful information to appear in the stack trace for the error recording on a transaction using the C SDK's newrelic_notice_error API call.
If no data appears within a few minutes, check your c_sdk.log and newrelic-daemon.log files for errors. If you still have problems, follow the troubleshooting tips.
For more help
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.