> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt

# Linking New Relic as a source - Docs

Copy page

# Linking New Relic as a source - Docs

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70)

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d)

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

`npx @posthog/wizard warehouse`

[Learn more](/wizard.md)

![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)

![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you

**Alpha release**

This source is currently in **alpha**. The interface and available tables may change.

The New Relic connector syncs your observability data – APM transactions, transaction errors, page views, logs, distributed tracing spans, monitored entities, and alert configuration – into PostHog, so you can query it alongside your product analytics.

## Prerequisites

You need a New Relic account and a **User API key** (it starts with `NRAK-`). License keys, browser keys, and the deprecated Insights query keys won't work. Create a User API key on the [API keys page](https://one.newrelic.com/admin-portal/api-keys/home) of your New Relic account.

You also need your New Relic **account ID**. It's shown in the URL when viewing your account, or under **Administration** → **Access management** → **Accounts**.

## Adding a data source

1.  In PostHog, go to the [Sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section.
2.  Click **\+ New source** and click **Link** next to this source.
3.  Enter your credentials (see [Configuration](#configuration) below) and click **Next**.
4.  Select the tables you want to sync, choose a sync method and frequency, then click **Import**.

Once the syncs are complete, you can start querying this data in PostHog.

When linking New Relic, you'll need:

-   **User API key** – the key you created on the API keys page (starts with `NRAK-`).
-   **Account ID** – the numeric ID of the New Relic account to sync.
-   **Region** – select **EU** if your account is hosted in New Relic's EU data center. Most accounts use **US**.

## Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

-   **Webhook** (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
-   **Incremental** – only new or updated rows are synced on each run, using a cursor field (such as an `updated_at` timestamp). Cheaper than a full refresh, but deletes aren't captured.
-   **Append only** – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
-   **Full refresh** – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See [sync methods](/docs/cdp/sources.md#sync-methods) for a full explanation of how each mode works and how to choose between them.

Event tables (`transactions`, `transaction_errors`, `page_views`, `logs`, and `spans`) are append-only, since New Relic events are immutable. On the initial sync, only the last 30 days of events are imported, and New Relic's own data retention limits how far back data is available on your plan. The `logs` and `spans` tables can be very high volume, so they're disabled by default – toggle them on in the schema configuration if you want them.

Entity and alert configuration tables (`entities`, `alert_policies`, and `alert_conditions`) are synced with a full refresh, since New Relic doesn't expose updated-since filters for them.

## Configuration

| Option | Type | Required |
| --- | --- | --- |
| User API key | password | Yes |
| Account ID | number | Yes |
| Region | select | Yes |

## Supported tables

| Table | Description | Sync method | Incremental field | Primary key |
| --- | --- | --- | --- | --- |
| transactions | APM transaction events. Only syncs the last 30 days on initial sync | Append only, Full refresh | timestamp | — |
| transaction_errors | APM transaction error events. Only syncs the last 30 days on initial sync | Append only, Full refresh | timestamp | — |
| page_views | Browser page view events. Only syncs the last 30 days on initial sync | Append only, Full refresh | timestamp | — |
| logs | Log events. Can be very high volume, so it's off by default. Only syncs the last 30 days on initial sync | Append only, Full refresh | timestamp | — |
| spans | Distributed tracing span events. Can be very high volume, so it's off by default. Only syncs the last 30 days on initial sync | Append only, Full refresh | timestamp | — |
| entities | Inventory of monitored entities (applications, hosts, services, ...) from entity search | Full refresh | — | — |
| alert_policies | Alert policies configured on the account | Full refresh | — | — |
| alert_conditions | NRQL alert conditions configured on the account | Full refresh | — | — |

## Troubleshooting

-   **Your API key is valid but has no access to account** – the key belongs to a user without access to the account ID you entered. Double-check the account ID and make sure the key was created by a user on that account.
-   **Your New Relic API key is invalid or has been revoked** – create a new User API key on the [API keys page](https://one.newrelic.com/admin-portal/api-keys/home) and reconnect.

If your sync is failing or data looks wrong, see the [Data warehouse troubleshooting guide](/docs/data-warehouse/troubleshooting.md). If that doesn't help, [contact support](https://us.posthog.com/#panel=support%3Asupport%3Adata_warehouse%3A%3Atrue) – we're happy to help.

### Was this page useful?

HelpfulCould be better