---
title: C SDK configuration
source: https://docs.newrelic.com/docs/apm/agents/c-sdk/install-configure/c-sdk-configuration
---

> #### ⚠️ 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).

Your C application requires two configuration values:

-   Application's name: [`app_name`](https://newrelic.github.io/c-sdk/struct__newrelic__app__config__t.html#a0543f501cfec009c483be0c6d5d511f7)
-   New Relic license key: [`license_key`](https://newrelic.github.io/c-sdk/struct__newrelic__app__config__t.html#aac3c5f9a0e5da64836a806c47b954b71)

All other configuration values are optional, and typically the default settings don't need to be changed. However, when necessary, you can adjust New Relic's  C SDK configuration.

This document is a quick reference for using some basic configuration options with the  C SDK API. For detailed information about changing your configuration settings, including code values and examples, see the [ C SDK's configuration GUIDE.md on GitHub](https://github.com/newrelic/c-sdk/blob/master/GUIDE.md#configuration).

## Change configuration settings [#change-config]

Here are examples of some available configuration options you can change, as defined in the C SDK's public header, [`libnewrelic.h`](https://newrelic.github.io/c-sdk/libnewrelic_8h.html).

| C SDK configuration options                  | Comments                                                                                                                                                                                                         |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| General configuration settings               | To set or change the app name, set the license key, logging level, transaction tracing, datastore tracing, etc., use: `newrelic_app_config_t`                                                                    |
| Additional transaction tracing configuration | To enable the transaction tracer and to configure what transaction durations are considered for reporting a trace to New Relic, use: `newrelic_transaction_tracer_config_t`                                      |
| Datastore segments                           | To configure whether a database name and datastore instance name are reported, use: [`newrelic_datastore_segment_config_t`](https://newrelic.github.io/c-sdk/structnewrelic__datastore__segment__config__t.html) |
| Communication with the C SDK                 | To set the socket endpoint for agent-to-daemon communications, use: `newrelic_init`                                                                                                                              |

## Change app name (alias) in UI [#change-ui]

You can change your [application's alias](https://docs.newrelic.com/docs/agents/manage-apm-agents/app-naming/name-your-application#differences) from the **Application** settings page in the New Relic UI. This is useful, for example, to give your application a different name, yet keep historic data under the new alias. For more information, see [Name your application](https://docs.newrelic.com/docs/agents/manage-apm-agents/app-naming/name-your-application).

New Relic's C SDK does not support [server-side configuration](https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/server-side-agent-configuration). However, you can also use this **Application** settings page in the UI to set your application's [Apdex T](https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/apdex-measure-user-satisfaction) threshold.

To change the application's alias or Apdex T threshold in the UI go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > APM & services > (select an app) > Settings > Application**.

## Change app name in configuration [#change-app-name]

If you change your application's name in your configuration settings, this will result in the same app appearing in the UI with a new name. Any historic data (based on the [data retention](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/apm-data-retention) schedule) will only exist under the old name. (To rename your application but still keep historic data, use the [UI settings](#change-ui) to change the alias.)

If you need to change your application's name in your configuration after your application is connected to the daemon:

1.  Make a new `config` with a call to [`newrelic_create_app_config()`](https://newrelic.github.io/c-sdk/libnewrelic_8h.html#af067b3ff89a40b6fa417e18be5e847aa) using the new application name.
2.  Make a new connected app with a call to [`newrelic_create_app()`](https://newrelic.github.io/c-sdk/libnewrelic_8h.html#a61dd90439ae3cc5060021f6ab4701132).

> #### ⚠️ CAUTION
>
> Timing is everything. Switching application names during a single application execution may mean that your instrumented data is sent under the new application name.

## View logs for your APM and infrastructure data [#logs-context]

You can also 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. 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.
