• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Get started with collector observability

|View as Markdown

Step-by-step configuration

Create the configuration file

Enable the collector's internal telemetry by saving the following configuration as internal-telemetry-config.yaml:

##### Example configuration for internal telemetry
# This configuration is intended to be used in conjunction with a configuration of components and pipelines. The
# collector supports config merging on startup.
##### Requirements
# - nrdot-collector (any distro) >= 1.3.0 or collector core version >= v1.35.0 / v0.129.0
##### Configuration via environment variables
# For official documentation, see: https://opentelemetry.io/docs/collector/internal-telemetry/
## Required
# - INTERNAL_TELEMETRY_NEW_RELIC_LICENSE_KEY
## Optional
# - INTERNAL_TELEMETRY_SERVICE_NAME: defaults to 'otel-collector'; determines entity name in New Relic
# - INTERNAL_TELEMETRY_OTLP_ENDPOINT: defaults to 'https://otlp.nr-data.net'; see https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp/ and https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp-troubleshooting/
# - INTERNAL_TELEMETRY_METRICS_LEVEL: defaults to 'detailed'; other values are 'normal', 'basic', 'none'
# - INTERNAL_TELEMETRY_LOG_LEVEL: defaults to INFO; other values are DEBUG, WARN, ERROR
# - INTERNAL_TELEMETRY_TRACE_LEVEL: defaults to 'none' (traces disabled); other value is 'basic'
# - INTERNAL_TELEMETRY_TRACE_SAMPLE_RATIO: defaults to 0.01, i.e. 1% sampling; has no effect if TRACE_LEVEL is 'none'
service:
telemetry:
metrics:
level: "${env:INTERNAL_TELEMETRY_METRICS_LEVEL:-detailed}"
readers:
- periodic:
exporter:
otlp:
protocol: http/protobuf
endpoint: "${env:INTERNAL_TELEMETRY_OTLP_ENDPOINT:-https://otlp.nr-data.net}"
temporality_preference: delta
headers:
- name: api-key
value: "${env:INTERNAL_TELEMETRY_NEW_RELIC_LICENSE_KEY}"
logs:
level: "${env:INTERNAL_TELEMETRY_LOG_LEVEL:-INFO}"
# default sampling config for reference to simplify overwrites even if not exposed via env var, e.g. --config=yaml:service::telemetry::logs::sampling::enabled::false
sampling:
enabled: true
# The interval in seconds that the logger applies to each sampling.
tick: 10s
# The number of messages logged at the start of each sampling::tick
initial: 10
# Sets the sampling policy for subsequent messages after sampling::initial messages are logged. When sampling::thereafter is set to N, every Nth message is logged and all others are dropped. If N is zero, the logger drops all messages after sampling::initial messages are logged.
thereafter: 100
processors:
- batch:
exporter:
otlp:
protocol: http/protobuf
endpoint: "${env:INTERNAL_TELEMETRY_OTLP_ENDPOINT:-https://otlp.nr-data.net}"
headers:
- name: api-key
value: "${env:INTERNAL_TELEMETRY_NEW_RELIC_LICENSE_KEY}"
traces:
# traces are disabled by default due to experimental status and lack of default sampling rate that works across use cases
level: "${env:INTERNAL_TELEMETRY_TRACE_LEVEL:-none}"
sampler:
parent_based:
root:
trace_id_ratio_based:
ratio: ${env:INTERNAL_TELEMETRY_TRACE_SAMPLE_RATIO:-0.01}
processors:
- batch:
exporter:
otlp:
protocol: http/protobuf
endpoint: "${env:INTERNAL_TELEMETRY_OTLP_ENDPOINT:-https://otlp.nr-data.net}"
headers:
- name: api-key
value: "${env:INTERNAL_TELEMETRY_NEW_RELIC_LICENSE_KEY}"
resource:
service.name: "${env:INTERNAL_TELEMETRY_SERVICE_NAME:-otel-collector}"

Set environment variables

  • INTERNAL_TELEMETRY_NEW_RELIC_LICENSE_KEY: Ingest license key for the account internal telemetry should be sent to. This key can be different than the key the collector uses to send regular data to New Relic, i.e. NEW_RELIC_LICENSE_KEY in the example below.
  • INTERNAL_TELEMETRY_SERVICE_NAME: Defaults to otel-collector, determines entity name in New Relic
  • INTERNAL_TELEMETRY_OTLP_ENDPOINT: Defaults to US https://otlp.nr-data.net; if you are in EU, set this to https://otlp.eu01.nr-data.net; if you are in JP, set this to https://otlp.jp.nr-data.net

Run collector with merged configuration

In addition to the normal configuration for components and pipelines (in the following example --config=/etc/nrdot-collector/config.yaml), add a second --config argument which will merge both configurations:

bash
$
docker run \
>
-e INTERNAL_TELEMETRY_NEW_RELIC_LICENSE_KEY='...' \
>
-e NEW_RELIC_LICENSE_KEY='...' \
>
-e INTERNAL_TELEMETRY_SERVICE_NAME='demo-collector' \
>
-v './internal-telemetry-config.yaml:/etc/nrdot-collector/config-internal.yaml' \
>
newrelic/nrdot-collector:2.8.1 --config=/etc/nrdot-collector/config.yaml \
>
--config='/etc/nrdot-collector/config-internal.yaml'

Important

The order of the --config arguments matters if you have preexisting configuration under the service::telemetry node. The collector uses a 'last one wins' strategy on a node level when merging configurations and certain parts of the config (e.g. lists, leaf nodes) cannot be merged, so they get overwritten by the last --config argument.

Wait for New Relic to detect your collector

You do not need to configure anything else. New Relic detects your collector automatically and shows the collector experience for its entity.

Behind the scenes, most of the collector's internal metrics have names that start with otelcol. When an entity emits a metric with this prefix, New Relic marks the entity as a collector by adding the entity tag otelCollector: opentelemetry. This happens at ingest, so it can take a few minutes after the first data arrives before the experience appears.

Once detected, see View your collector in the UI to explore your collector's data.

Optional: Customize the configuration

The default configuration exposes additional environment variables of the form INTERNAL_TELEMETRY_... to tweak common options such as detail levels and sampling. Refer to the configuration itself for more details.

We recommend using the default configuration to monitor your collector. However, you can modify the example configuration, such as reducing the detail level, sampling rate, or data collection rate. Refer to the official documentation for more details. Keep in mind that changes to the configuration may cause certain parts of the UI to not display data. Also refer to the FAQ. The collector's internal telemetry configuration options change as the OTel community evolves. You can use or modify the provided defaults as needed.

Overhead considerations

Like all telemetry, the collector's internal telemetry increases your data ingest. The overhead depends on your workload and configuration. Here are the key factors to consider:

Metrics Creates constant overhead for the collector and all active components, regardless of throughput. Metrics are emitted at a constant interval (60 seconds by default). Any component can emit custom metrics, as indicated by the respective metadata.yaml, which may add to the overhead.

If you need to reduce the amount of metrics your collector emits, we recommend setting the metric level to normal, e.g. via the environment variable INTERNAL_TELEMETRY_METRICS_LEVEL in the example config, as only a subset of the detailed metrics are used by the UI and are typically metrics intended for fine-tuning performance or network issues, so you can re-enable them as needed.

Logs Logs have minimal impact during normal operation. Higher overhead can occur when error logs increase rapidly, but this is reduced because logs are sampled by default. The sampling algorithm allows a constant number of logs per defined interval and then samples at a static rate. Refer to service::telemetry::logs::sampling in the configuration.

Traces Disabled by default, see the FAQ for more details. To experiment with traces as they develop, set INTERNAL_TELEMETRY_TRACE_LEVEL=basic and start with a low sampling rate such as INTERNAL_TELEMETRY_TRACE_SAMPLE_RATIO=0.001 (0.1%) while monitoring your ingest volume and adjusting as needed.

Configuration examples

This section contains examples of how the above step-by-step guide translates to different use cases involving the collector.

Simple collector with internal telemetry enabled

Minimal example of a collector running with docker compose.

Example: Populate infrastructure relationships (optional)

As mentioned on the Summary page, APM can show infrastructure metrics for the infrastructure the collector is running on but only if your infrastructure is instrumented and a relationship can be formed. The relationship is driven by additional attributes on the collector's internal telemetry. You can read more about this topic in our OTel documentation. The steps to set this up heavily depend on your exact infrastructure. For the common choice of Kubernetes we created an example that showcases how to achieve container-to-service relationships based on our OTel for Kubernetes solution.

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.