Skip to main content

Influxdb Exporter

Status Available in: contrib Maintainers: @jacobmarble Source: opentelemetry-collector-contrib

Supported Telemetry

Logs Metrics Traces

Overview

This exporter supports sending tracing, metrics, and logging data to InfluxDB.

Configuration

The following configuration options are supported:
  • endpoint (required) HTTP/S destination for line protocol
    • if path is set to root (/) or is unspecified, it will be changed to /api/v2/write.
  • timeout (default = 5s) Timeout for requests
  • headers: (optional) additional headers attached to each HTTP request
    • header User-Agent is OpenTelemetry -> Influx by default
    • if token (below) is set, then header Authorization will overridden with the given token
  • org (required) Name of InfluxDB organization that owns the destination bucket
  • bucket (required) name of InfluxDB bucket to which signals will be written
  • token (optional) The authentication token for InfluxDB
  • v1_compatibility (optional) Options for exporting to InfluxDB v1.x
    • enabled (optional) Use InfluxDB v1.x API if enabled
    • db (required if enabled) Name of the InfluxDB database to which signals will be written
    • username (optional) Basic auth username for authenticating with InfluxDB v1.x
    • password (optional) Basic auth password for authenticating with InfluxDB v1.x
  • span_dimensions (default = service.name, span.name) Span attributes to use as dimensions (InfluxDB tags)
  • log_record_dimensions (default = service.name) Log Record attributes to use as dimensions (InfluxDB tags)
  • payload_max_lines (default = 10_000) Maximum number of lines allowed per HTTP POST request
  • payload_max_bytes (default = 10_000_000) Maximum number of bytes allowed per HTTP POST request
  • precision (default = ns) Timestamp precision for writing data to InfluxDB details here
  • metrics_schema (default = telegraf-prometheus-v1) The chosen metrics schema to write; must be one of:
    • telegraf-prometheus-v1
    • telegraf-prometheus-v2
  • sending_queue details here
    • enabled (default = true)
    • num_consumers (default = 10) The number of consumers from the queue
    • queue_size (default = 1000) Maximum number of batches allowed in queue at a given time
  • retry_on_failure details here
    • enabled (default = true)
    • initial_interval (default = 5s) Time to wait after the first failure before retrying
    • max_interval (default = 30s) Upper bound on backoff interval
    • max_elapsed_time (default = 120s) Maximum amount of time (including retries) spent trying to send a request/batch
The full list of settings exposed for this exporter are documented in config.go. Example:

Definitions

InfluxDB is an open-source time series database. Telegraf is an open-source metrics agent, similar to the OpenTelemetry Collector. Telegraf has hundreds of plugins. Line protocol is a textual HTTP payload format used to move metrics between Telegraf agents and InfluxDB instances.

Schema

The OpenTelemetry->InfluxDB conversion schema and implementation are hosted at https://github.com/influxdata/influxdb-observability . Spans are stored in measurement spans. Metric points through metrics_schema=telegraf-prometheus-v1 are assigned measurement from the OTel field Metric.name. Metric points through metrics_schema=telegraf-prometheus-v2 are stored in measurement prometheus. Logs are stored in measurement logs.

Example: Tracing Spans

Example: Metrics - telegraf-prometheus-v1

Example: Metrics - telegraf-prometheus-v2

Example: Logs

Configuration

Example Configuration


Last generated: 2026-08-24