Spice can be monitored with New Relic using either the Spice Metrics Endpoint (Prometheus scrape via the New Relic infrastructure agent) or the OpenTelemetry Metrics Exporter (push directly to New Relic's OTLP intake).
For agent-based collection, see the New Relic Prometheus integrations overview. The walkthrough below covers the agentless OTLP path, which is recommended for serverless and ephemeral deployments and for environments where the New Relic license key is managed through Spice's secret stores.
New Relic accepts OpenTelemetry metrics on a hosted OTLP endpoint. Spice pushes directly to it without requiring an OpenTelemetry collector or the New Relic agent.
Pick the endpoint that matches your account region (see New Relic OTLP endpoint configuration) and store the New Relic license key in a secret:
| Region | OTLP/HTTP endpoint |
|---|---|
| US (default) | https://otlp.nr-data.net/v1/metrics |
| EU | https://otlp.eu01.nr-data.net/v1/metrics |
| FedRAMP | https://gov-otlp.nr-data.net/v1/metrics |
The header name is api-key (lowercase). Use a New Relic license key — either the account's ingest license key or an ingest-specific key.
Metrics begin appearing in New Relic's Metrics Explorer within a minute or two.
Use runtime.telemetry.metric_prefix to prepend a string to every exported metric name. This avoids collisions with metrics from other services in the same New Relic account:
The runtime metric query_duration_ms is then exported as spiceai.query_duration_ms.
:::caution Combining metric_prefix with metric filtering
If you also set runtime.telemetry.otel_exporter.metrics to whitelist specific metrics, the entries must include the prefix. The filter runs after the prefix is applied, so e.g. query_duration_ms will not match when metric_prefix: 'spiceai.' is set — use spiceai.query_duration_ms instead.
:::
Attach custom key/value pairs to every metric using runtime.telemetry.properties. Spice sends these as OpenTelemetry resource attributes, which New Relic surfaces as queryable dimensions on each metric:
These attributes are available in NRQL via the WHERE and FACET clauses, e.g.:
A complete runtime.telemetry block combining metric prefixing, custom attributes, and New Relic OTLP export:
With this configuration, every Spice metric (e.g. spiceai.query_duration_ms, spiceai.query_executions) arrives in New Relic with environment, region, and team available as dimensions for use in NRQL queries, dashboards, and alerts.
For general OTLP exporter options (push interval, metric filtering, gRPC vs HTTP), see OpenTelemetry Metrics Exporter.