Loading

Collect OpenTelemetry data with Elastic Agent integrations

Fleet now supports installing Elastic Agent integration packages for collecting and visualizing OpenTelemetry (OTel) data such as logs, metrics, and traces. To find the available OpenTelemetry integration packages, open the Integrations page in Kibana, then select the OpenTelemetry category.

Note

Some OpenTelemetry integrations are in technical preview and only appear in the list when you enable the setting to show beta integrations.

There are two types of OpenTelemetry integration packages:

  • Input packages which include an OTel Collector configuration.
  • Content packages which include Elasticsearch and Kibana assets such as prebuilt dashboards and visualizations.

Unlike Elastic Agent integrations based on the Elastic Common Schema (ECS), OpenTelemetry input packages use OTel Collector receivers to collect OTel data following OpenTelemetry semantic conventions.

When OTel data is collected using an OpenTelemetry input package, content packages with assets related to the collected data type are automatically installed if available.

Important

OpenTelemetry input packages are used with Fleet and Elastic Agent running in default mode. They are distinct from running Elastic Agent as an EDOT Collector, and cannot be used on Elastic Agent running in otel mode.

Elastic Agent policies can include configurations for both ECS-based integrations and OpenTelemetry input packages, which essentially turns the enrolled Elastic Agents into hybrid agents.

Hybrid agent policies are useful when you want to:

  • Keep an ECS-based integration for one data type (for example, to ingest logs and use built-in dashboards)
  • Use an OpenTelemetry input package for another data type (for example, to collect metrics using OpenTelemetry standards)

This type of hybrid data collection provides flexibility without forcing a single ingestion model, and allows you to:

  • Gradually migrate toward OpenTelemetry
  • Standardize ingestion on OpenTelemetry receivers at scale
  • Keep native integrations for logs or existing dashboards

For examples on using a hybrid agent configuration to collect telemetry, refer to:

The installation and configuration of OpenTelemetry input packages are similar to those of ECS-based integrations, and allow you to specify the namespace, dataset name, data stream type, and more. For more information, refer to Add an integration to an Elastic Agent policy.

When the integration policy for the input package is created, Fleet creates a managed index template with an OTel configuration and an index pattern with an .otel suffix. The index template uses Fleet component templates for settings and OTel component templates for default mappings. It also includes @custom component templates that allow you to customize your Elasticsearch index similarly to ECS-based integrations.

On the OpenTelemetry input package's Configs page, you can view a generated sample configuration, which you can use as a starting point to set up the integration on a standalone Elastic Agent.

This is a partial configuration as it does not include an exporter component. For more information on setting up the exporter, refer to Elasticsearch exporter.

Note

Currently, OpenTelemetry input packages only support sending data using the Elasticsearch output.

Only Elastic Agents on version 9.2 or later can collect OTel data using OpenTelemetry input packages. OpenTelemetry input packages added to an agent policy do not affect enrolled agents on prior versions.