OTLP/HTTP exporter
The OTLP/HTTP exporter allows the OpenTelemetry Collector to send metrics, traces, and logs via HTTP using the OTLP format. Read on to learn how to configure the component.
The OTLP/HTTP exporter sends metrics, traces, and logs through HTTP using the OTLP format. The supported pipeline types are traces
, metrics
, and logs
. See Process your data with pipelines for more information.
You can also use the OTLP exporter for advanced options to send data using gRPC protocol. See more at OTLP exporter.
Read more about the OTLP format at the OTel repo OpenTelemetry Protocol Specification .
Get started
Follow these steps to configure and activate the component:
-
Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform:
-
Configure the exporter as described in the next section.
-
Restart the Collector.
Configuration options
The following settings are required:
-
traces_endpoint
. The target URL to send trace data to.https://ingest.<realm>.signalfx.com/v2/trace/otlp
for Splunk Observability Cloud.
The following settings are optional and can be added to the configuration for more advanced use cases:
-
logs_endpoint
. The target URL to send log data to. For example,https://example.com:4318/v1/logs
. -
metrics_endpoint
. The target URL to send metric data to. For example,"https://ingest.<realm>.signalfx.com/v2/datapoint/otlp"
to send metrics to Splunk Observability Cloud. -
tls
. See TLS Configuration Settings in this document for the full set of available options. Only applicable for sending data to a custom endpoint. -
timeout
.30s
by default. HTTP request time limit. For details see https://golang.org/pkg/net/http/#Client. -
read_buffer_size
.0
by default. ReadBufferSize for HTTP client. -
write_buffer_size
.512 * 1024
by default. WriteBufferSize for the HTTP client.
Sample configuration
To send traces and metrics to Splunk Observability Cloud using OTLP over HTTP, configure the metrics_endpoint
and traces_endpoint
settings to the REST API ingest endpoints. For example:
exporters:
otlphttp:
# The target URL to send trace data to. By default it's set to ``https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace/otlp``.
traces_endpoint: https://ingest.<realm>.signalfx.com/v2/trace/otlp
# The target URL to send metrics data to. By default it's set to
metrics_endpoint: https://ingest.<realm>.signalfx.com/v2/datapoint/otlp
# Set of HTTP headers added to every request.
headers:
# X-SF-Token is the authentication token provided by Splunk Observability Cloud.
X-SF-Token: <access_token>
To complete the configuration, include the exporter in the required pipeline of the service
section of your configuration file. For example:
service:
pipelines:
metrics:
exporters: [otlphttp]
traces:
exporters: [otlphttp]
Configuration examples
This is a detailed configuration example:
endpoint: "https://1.2.3.4:1234"
traces_endpoint: https://ingest.<realm>.signalfx.com/v2/trace/otlp
metrics_endpoint: https://ingest.<realm>.signalfx.com/v2/datapoint/otlp
headers:
X-SF-Token: <access_token>
timeout: 10s
read_buffer_size: 123
write_buffer_size: 345
sending_queue:
enabled: true
num_consumers: 2
queue_size: 10
retry_on_failure:
enabled: true
initial_interval: 10s
randomization_factor: 0.7
multiplier: 1.3
max_interval: 60s
max_elapsed_time: 10m
compression: gzip
Configure gzip compression
By default, gzip compression is turned on. To turn it off use the following configuration:
exporters:
otlphttp:
...
compression: none
Associate passthroughs to an access token
The setting access_token_passthrough
from the Splunk APM (SAPM) exporter (deprecated) in no longer available.
To associate datapoints with an organization access token, make sure of the following:
-
include_metadata
is set totrue
in yourotlp
configuration -
metadata_keys
is set to the org token in the Batch processor
For example:
extensions:
headers_setter:
headers:
- action: upsert
key: X-SF-TOKEN
from_context: X-SF-TOKEN
receivers:
otlp:
protocols:
http:
include_metadata: true
processors:
batch:
metadata_keys:
- X-SF-Token
exporters:
otlphttp:
metrics_endpoint: https://ingest.<realm>.signalfx.com/v2/datapoint/otlp
traces_endpoint: https://ingest.<realm>.signalfx.com/v2/trace/otlp
headers:
"X-SF-Token": "mytoken"
auth:
authenticator: headers_setter
Settings
The following table shows the configuration options for the OTLP/HTTP exporter:
Troubleshooting
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.
Available to Splunk Observability Cloud customers
-
Submit a case in the Splunk Support Portal.
-
Contact Splunk Support.
Available to prospective customers and free trial users
-
Ask a question and get answers through community support at Splunk Answers.
-
Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups.