Linking New Relic as a source

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 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 AdministrationAccess managementAccounts.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see 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 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

OptionTypeRequired
User API keypasswordYes
Account IDnumberYes
RegionselectYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
transactions

APM transaction events. Only syncs the last 30 days on initial sync

Append only, Full refreshtimestamp
transaction_errors

APM transaction error events. Only syncs the last 30 days on initial sync

Append only, Full refreshtimestamp
page_views

Browser page view events. Only syncs the last 30 days on initial sync

Append only, Full refreshtimestamp
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 refreshtimestamp
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 refreshtimestamp
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 and reconnect.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Community questions

Was this page useful?