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 Explorers Hub post.
New Relic defines a web or non-web transaction as one logical unit of work in a software application. Once you instrument a transaction, you can also instrument errors in the transaction so you can monitor them in the New Relic UI. In order to use the C SDK to monitor errors, you must manually instrument your source code by adding the New Relic function
newrelic_notice_error() to it.
To include function calls in error traces, use GNU's
-rdynamic linker flag to link your apps when compiling. The
-rdynamic linker flag gives you more meaningful error traces.
To instrument errors in transactions:
- Start a transaction.
- Record an error with
newrelic_notice_error(), supplying the required parameters.
- End the transaction.
Transaction errors and error traces appear on the Error analytics page in the New Relic UI. The C SDK reports the total number of errors and up to 100 error traces per minute on the Error analytics page.
You can also view, query, and visualize transaction errors as
You can bring your logs and application's data together to make troubleshooting easier and faster. With logs in context, you can see log messages related to your errors and traces directly in your app's UI.
- From the Errors page, click on a trace to go to the Error details page.
- From the error details page, click See logs.
- To view details related to an individual log message, click directly on the message.
You can also see logs in context of your infrastructure data, such as Kubernetes clusters. No need to switch to another UI page.