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

OpenTelemetry Collector for data processing

The OpenTelemetry Collector is a vendor-agnostic tool for receiving, processing, and exporting telemetry data. It's recommended to run the Collector in your observability pipeline. While Collector requirements and configuration will vary, it's common to route APM OpenTelemetry data through a Collector. This shifts overhead away from applications, and provides a place to enrich the telemetry with additional environment context data, filter and transform, and more. It's also common to use the Collector for infrastructure monitoring, but this documentation focuses on data processing use cases. See Collector for infrastructure monitoring for more information.

Here's an example of the Collector as a gateway, but you can also set up the Collector as an agent running on the same host as your application:

Diagram showing OpenTelemetry using the OpenTelemetry Collector and New Relic's OTLP endpoint.

The Collector has an extensive set of receivers, processors, exporters, extensions, and connectors. These components are bundled into pre-built distributions. However, it's possible to build custom components to suit specific requirements, and build a custom Collector distribution to package a specific set of components.

While configuration varys based on requirements, Collectors that send data to New Relic should have certain things in common:

OTLP exporter

The OpenTelemetry Collector supports exporting data using the OTLP/HTTP exporter. Ensure that the exporter configuration matches New Relic OTLP requirements.

Note: While the OTLP gRPC exporter is supported, we recommend using the OTLP/HTTP protocol for sending telemetry data instead of OTLP/gRPC.

Batch processor

Configure the Collector to use the batch processor to export records in batches. Ensure the batch size and frequency is configured to match New Relic OTLP requirements.

Minimal example

To install the Collector, follow the OpenTelemetry documentation.

Run the Collector with the configuration below, making sure you replace the following:

receivers:
otlp:
protocols:
grpc:
http:
processors:
batch:
exporters:
otlphttp:
endpoint: <INSERT_NEW_RELIC_OTLP_ENDPOINT>
headers:
api-key: <INSERT_NEW_RELIC_LICENSE_KEY>
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp]
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp]

For a working example, see the New Relic OpenTelemetry examples repository.

For additional Collector examples, see Collector for infrastructure monitoring.

Copyright © 2024 New Relic Inc.

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