Migrate from New Relic to Logfire
New Relic accepts OpenTelemetry data over OTLP — the OpenTelemetry Protocol — at otlp.nr-data.net, authenticated with an api-key header carrying your license key. Migrating to Logfire swaps the endpoint and that header — see Migrate to Logfire for the general shape.
You’ll need a Logfire write token and your region endpoint (https://logfire-us.pydantic.dev or -eu).
Point the SDK at Logfire and replace New Relic’s api-key header with Authorization:
# before (New Relic):
# OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net # EU: otlp.eu01.nr-data.net · FedRAMP: gov-otlp.nr-data.net
# OTEL_EXPORTER_OTLP_HEADERS='api-key=your-license-key'
export OTEL_EXPORTER_OTLP_ENDPOINT=https://logfire-us.pydantic.dev
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS='Authorization=your-write-token'
export OTEL_SERVICE_NAME=your-service-name
New Relic recommends OTLP over HTTP (http/protobuf); keeping that protocol when you repoint is the simplest path. (Logfire’s managed platform accepts both HTTP and gRPC.)
Change the exporter’s endpoint and header to Logfire’s:
exporters:
otlphttp/logfire:
endpoint: "https://logfire-us.pydantic.dev" # or https://logfire-eu.pydantic.dev
headers:
# was: api-key: your-license-key
Authorization: "Bearer ${env:LOGFIRE_TOKEN}"
service:
pipelines:
traces:
exporters: [otlphttp/logfire]
metrics:
exporters: [otlphttp/logfire]
logs:
exporters: [otlphttp/logfire]
Keep both exporters in the pipeline to run in parallel during a cutover.
Run your workload and open the Live view. Traces should appear within seconds.
- Migrate to Logfire — the general two-path pattern and parallel-run guidance
- Alternative clients — worked SDK examples
- New Relic’s own docs, to confirm your current endpoint and header: OpenTelemetry: OTLP