otlpExporter

Version

Exports spans to an OpenTelemetry collector using the OTLP protocol over gRPC or HTTP. Defaults to gRPC on localhost:4317. Switch to HTTP by setting transport: http (default port 4318, default path /v1/traces). Set secured: true to use HTTPS. Custom request headers can be added for hosted collectors that require authorization.

Example Configuration

global:
- openTelemetry:
otlpExporter:
host: localhost
port: 4317
transport: grpc
global:
   - openTelemetry:
       otlpExporter:
         host: localhost
         port: 4317
         transport: grpc

Syntax

otlpExporter:
headers:
- <addHeader>
host: <string>
path: <string>
port: <number>
secured: <boolean>
transport: <string>
otlpExporter:
  headers:
    - <addHeader>
  host: <string>
  path: <string>
  port: <number>
  secured: <boolean>
  transport: <string>

Attributes

NameRequiredDefaultDescriptionExamples
hostfalselocalhostHostname or IP address of the OTLP collector.collector.example.com
pathfalse(empty)URL path appended to the collector endpoint. For HTTP transport defaults to /v1/traces when left empty.-
portfalse-Port of the OTLP collector. When omitted, defaults to 4317 for gRPC and 4318 for HTTP.4317
securedfalsefalseWhether to use a secure (TLS) connection. When true, the endpoint URL scheme is set to https for HTTP transport and causes the gRPC client to use TLS as well.-
transportfalsegrpcWire protocol for delivering spans: grpc or http.http

Child Structure

ElementCardinalityDescription
addHeader0..*HTTP headers sent with every span export request. Only effective when transport is http. Useful for authorization headers required by hosted collectors.

Can be used in