canonical: https://jentic.com/apis/newrelic.com/newrelic

# New Relic Gateway API

The New Relic Gateway API ingests metrics, traces, and logs into New Relic using OTLP-format payloads. It is purpose-built for migrating telemetry from other observability platforms - Datadog, Dynatrace, Splunk, and similar - by exposing dedicated /gateway/v1/metrics, /gateway/v1/traces, and /gateway/v1/logs endpoints. Authentication uses an api-key header tied to a New Relic Ingest license key, and payloads follow the OpenTelemetry Protocol over HTTP/JSON.

## For AI agents

Send OTLP-format metrics, traces, and logs to New Relic via the Gateway endpoints. Useful for migrating telemetry from Datadog, Dynatrace, or other observability platforms.

## Scope

Does not handle dashboard creation, NRQL queries, alerting rules, or APM agent installation - use for OTLP metric, trace, and log ingest only.

## Capabilities

- Ingest OTLP-format metric payloads via POST /gateway/v1/metrics for migration from Datadog or Dynatrace
- Forward distributed trace spans through POST /gateway/v1/traces using OpenTelemetry Protocol
- Stream application and infrastructure logs into New Relic via POST /gateway/v1/logs
- Authenticate ingest workloads with an api-key header bound to a specific New Relic ingest license
- Bridge multi-vendor observability stacks during a phased move onto the New Relic platform

## Use cases

### Datadog-to-New-Relic Metric Migration

Platform teams migrating from Datadog use the Gateway API to dual-write metrics into New Relic during a transition window. POST /gateway/v1/metrics accepts OTLP-format payloads with the api-key header so existing OpenTelemetry collectors can be repointed at otlp.nr-data.net without rewriting instrumentation. Once dashboards are validated in New Relic, the Datadog write path is shut down.

Example prompt: Forward an OTLP metric payload containing a counter named requests.total to POST /gateway/v1/metrics using the configured ingest license key

### Distributed Trace Forwarding

Teams running OpenTelemetry collectors send trace spans to New Relic via POST /gateway/v1/traces. Because the endpoint speaks OTLP, the same collector configuration that pointed at another vendor can be retargeted by changing the endpoint URL and api-key header. This avoids re-instrumenting services during an observability platform change.

Example prompt: Forward a 50-span OTLP trace export to POST /gateway/v1/traces and confirm the response indicates ingest success

### Log Pipeline Consolidation

Operations teams consolidating multiple log backends into New Relic use POST /gateway/v1/logs to push OTLP-formatted log records. The Gateway endpoint is designed for high-volume ingest, so log shippers like Fluent Bit or the OpenTelemetry Collector can stream records directly without an intermediate aggregator. Logs land in New Relic Logs and can be queried with NRQL alongside metrics and traces.

Example prompt: Send an OTLP log record with severity ERROR and message body 'database connection timeout' to POST /gateway/v1/logs

### Agent-Driven Telemetry Validation

An AI agent uses the Gateway API through Jentic to validate ingest pipelines after a configuration change. The agent sends a synthetic OTLP payload to each of the three endpoints, checks the response status, and reports back to the human operator whether the api-key, endpoint URL, and payload format are all configured correctly.

Example prompt: Send a synthetic metric, trace, and log payload to the three Gateway endpoints and report which calls returned a successful status

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /gateway/v1/metrics | Ingest OTLP-format metrics into New Relic |
| POST | /gateway/v1/traces | Ingest OTLP-format trace spans into New Relic |
| POST | /gateway/v1/logs | Ingest OTLP-format log records into New Relic |

## Key resources

- **Gateway** — Three OTLP ingest endpoints for metrics, traces, and logs, designed for migration from other observability vendors

## Why Jentic

- **Setup:** Wiring the New Relic Gateway by hand means learning its api-key header auth, pointing at the otlp.nr-data.net ingest host, and shaping OTLP metric, trace, and log payloads yourself. Through Jentic you install once, import the New Relic Gateway API from the API Directory, store the license key once, and your agent calls it.
- **Permission scoping:** The Gateway exposes only ingest operations and carries no resource id in the URL path, so scope your agent by operation: limit it to the operations it needs, such as posting metrics or logs, and leave trace ingest out of the allowed set if the agent has no reason to send it. You choose which of the three ingest operations it may call.
- **Credential handling:** Your New Relic ingest license key is stored once, encrypted, by your own Jentic One instance and injected into the api-key header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send OTLP metrics to New Relic' or 'ship logs to New Relic', and Jentic returns the matching Gateway operation with its OTLP input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Splunk API** — Splunk ingests logs and metrics through its HTTP Event Collector instead of OTLP
- **Bugsnag API** — Bugsnag captures application crashes and stack traces; New Relic Gateway ingests broader OTLP telemetry
- **Elastic Kibana API** — Elastic provides log search and visualisation; the New Relic Gateway routes telemetry into a different unified backend

## FAQ

### What authentication does the New Relic Gateway API use?

The Gateway API uses an api-key header carrying a New Relic ingest license key. Through Jentic the key sits in the encrypted vault and Jentic injects it on the agent's behalf, so the license key never appears in the agent's prompt or response.

### Can I forward Datadog metrics to New Relic with the Gateway API?

Yes. The /gateway/v1/metrics endpoint accepts OTLP-format payloads, so any OpenTelemetry collector that previously exported to Datadog can be repointed at otlp.nr-data.net. The collector translates Datadog's native model into OTLP before sending - that conversion happens at the collector, not the Gateway.

### What payload format does the New Relic Gateway API accept?

All three endpoints - /gateway/v1/metrics, /gateway/v1/traces, and /gateway/v1/logs - accept OpenTelemetry Protocol (OTLP) over HTTP/JSON. The schemas in the OpenAPI spec describe the OTLP request bodies for each signal type.

### How do I send a test log entry through Jentic?

Search Jentic for 'send a log to new relic gateway', load the POST /gateway/v1/logs schema, and execute with an OTLP log record. Jentic injects the api-key header automatically. Get started with Jentic One, the self-hosted execution layer.

### Are the metrics, traces, and logs endpoints rate-limited differently?

The Gateway API is designed for high-volume telemetry ingest and returns 4xx responses when payloads exceed account limits or are malformed. For ingest budgets and per-account caps, consult your New Relic account configuration - the spec itself does not encode account-specific limits.

### Can I limit what my agent is allowed to do with the New Relic Gateway API?

Yes. Because you run Jentic One yourself, your own rules decide which of the three Gateway ingest operations the agent may call: posting metrics to /gateway/v1/metrics, traces to /gateway/v1/traces, or logs to /gateway/v1/logs. Since the endpoints carry no resource id in the path, you scope the agent by operation, allowing only the signals it needs and leaving the rest out of its permitted set. Your ingest license key stays with your Jentic One instance and is injected into the api-key header at execution time, so the agent never handles the credential directly.
