> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/logs/integrations/providers/newrelic.md).

# New Relic

Connect New Relic to Logs — not in the Cloud picker; it can be saved from code, but Norbix cannot send logs to it yet.

New Relic is an observability platform; logs would go to its Log API in your data center (US or EU).

{% hint style="warning" %}
Cloud has no screen to add New Relic: it is not in the picker, and its address shows *This is an internal platform-monitoring provider, configured by the Norbix host operator — it is not a project integration. Please pick a provider from the integrations list.* An integration saved from the SDK, the CLI or the API opens in Cloud with its fields, but its test fails with *Log delivery for the 'NewRelic' provider is configured but not yet supported by this version. The integration is saved correctly; delivery will start working once the provider's runtime client ships. NorbixLogging and MongoDB are currently the only providers with live delivery.* — so it receives no entries. To keep your logs today, use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md).
{% endhint %}

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-0c0e208e04476ef94424e9921e76afaec04581fa%2Famqp-new-1.png?alt=media" alt="The address /logging/integrations/new/newrelic shows the text This is an internal platform-monitoring provider, configured by the Norbix host operator — it is not a project integration."><figcaption><p>The New Relic address in Cloud today.</p></figcaption></figure>

## Get your credentials

What New Relic will ask for, from its own documentation:

1. Sign in to New Relic, open **API keys** and copy an **INGEST - LICENSE** key. See [New Relic API keys](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/).
2. Note the data center of your account, `US` or `EU`. See [Choose your data center](https://docs.newrelic.com/docs/accounts/accounts-billing/account-setup/choose-your-data-center/).

## Connect it in Cloud

**Where:** not in the picker. An integration saved from code opens from Logs → Integrations at `/projects/<project>/logging/integrations/<integrationId>/edit`.

| Field             | Required | What it does                                     | Example                      |
| ----------------- | -------- | ------------------------------------------------ | ---------------------------- |
| Region            | yes      | Your New Relic data center.                      | `US`                         |
| Service Name      | yes      | The service name on every entry.                 | `bookshop-api`               |
| License / API Key | yes      | Secret; encrypted on save and never shown again. | `your-new-relic-license-key` |
| Integration Name  | yes      | The name in your integrations list.              | `New Relic US`               |

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-1af61a1d18f292791cd8df2c4155e45ca94a7595%2Fnewrelic-saved-2.png?alt=media" alt="Editing New Relic integration saved from the SDK: badges ENABLED and TEST FAILED and the New Relic fields"><figcaption><p>An integration saved from code, opened in Cloud.</p></figcaption></figure>

Secret fields are never shown; type them again before **Save** on this page.

## Test and set as default

**Test integration** runs one check, **WriteLog**, and it fails today for every New Relic integration — Norbix has no New Relic sender yet. See [Test an integration](/codemash/cloud/logs/integrations/test.md). Logging has no default integration ([Default integration](/codemash/cloud/logs/integrations/set-default.md)).

## Common errors

| Message                                                                                                                                                                                                                                                                                | Cause                                                         | Fix                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Log delivery for the 'NewRelic' provider is configured but not yet supported by this version. The integration is saved correctly; delivery will start working once the provider's runtime client ships. NorbixLogging and MongoDB are currently the only providers with live delivery. | Every New Relic test today.                                   | Use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md).                       |
| This is an internal platform-monitoring provider, configured by the Norbix host operator — it is not a project integration. Please pick a provider from the integrations list.                                                                                                         | You opened `/new/newrelic` in Cloud.                          | Save it from code, or use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md). |
| Required                                                                                                                                                                                                                                                                               | An empty field on the edit form; secrets must be typed again. | Fill every field.                                                                                          |

## Do it from code

```ts
const { id } = await norbix.hub.logs.saveLoggingIntegration({
  integration: {
    provider: 'NewRelic',
    integrationName: 'New Relic US',
    isEnabled: true,
    region: 'US',
    serviceName: 'bookshop-api',
    apiKey: 'your-new-relic-license-key',
  } as any, // the TS type knows only the shared fields
});
const { items } = await norbix.hub.logs.testLoggingIntegration({ integrationId: id });
// [ { operation: 'WriteLog', result: 'FAILED', errors: [ "Log delivery for the …" ] } ]
```

```sh
norbix hub logs logging integration save --integration '{"provider":"NewRelic","integrationName":"New Relic US","isEnabled":true,"region":"US","serviceName":"bookshop-api","apiKey":"your-new-relic-license-key"}'
```

The provider is written `NewRelic` in requests. The client setup is on the [Logs page](/codemash/cloud/logs.md#use-it-from-code). API: [Save Logging Integration](/codemash/api-reference/logs/integrations/save-logging-integration.md) · [Test Logging Integration](/codemash/api-reference/logs/integrations/test-logging-integration.md)
