---
title: Instrument errors with the C SDK
source: https://docs.newrelic.com/docs/apm/agents/c-sdk/instrumentation/instrument-errors-c-sdk
---

> #### ⚠️ EOL NOTICE
>
> From April 2022, we don't support the C SDK capability. For more details, see our [Support Forum post](https://support.newrelic.com/s/hubtopic/aAX8W0000008d0r/q1-bulk-eol-announcement-fy23).

New Relic defines a [web or non-web transaction](https://docs.newrelic.com/docs/apm/transactions/intro-transactions/transactions-new-relic-apm) as one logical unit of work in a software application. Once you [instrument a transaction](https://docs.newrelic.com/docs/instrument-transactions-c-agent), 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.

> #### 💡 TIP
>
> To include function calls in error traces, use GNU's `-rdynamic` linker flag to [link your apps when compiling](https://docs.newrelic.com/docs/install-c-agent-compile-link-your-code#compile). The `-rdynamic` linker flag gives you more meaningful error traces.

## Instrument errors in transactions [#errors]

To instrument errors in transactions:

1.  [Start a transaction](https://docs.newrelic.com/docs/instrument-transactions-c-agent#start-transaction).
2.  Record an error with `newrelic_notice_error()`, supplying the required parameters.
3.  [End the transaction](https://docs.newrelic.com/docs/instrument-transactions-c-agent#end-transaction).

## View errors

Transaction errors and [error traces](#error-trace-examples) appear on the [**Error analytics** page](https://docs.newrelic.com/docs/apm/applications-menu/error-analytics/error-analytics-manage-error-traces) 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 `TransactionError` events.

## Examine logs for error details [#logs-context]

You can bring your logs and application's data together to make troubleshooting easier and faster. With [logs in context](https://docs.newrelic.com/docs/logs/logs-context/c-sdk-configure-logs-context/), you can see log messages related to your errors and traces directly in your app's UI.

1.  From the **Errors** page, click on a trace to go to the [**Error details** page](https://docs.newrelic.com/docs/apm/apm-ui-pages/error-analytics/errors-page-find-fix-verify-problems/).
2.  From the error details page, click **See logs**.
3.  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](https://docs.newrelic.com/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent/), such as Kubernetes clusters. No need to switch to another UI page.
