Caution
Grafana Agent has reached End-of-Life (EOL) on November 1, 2025. Agent is no longer receiving vendor support and will no longer receive security or bug fixes. Current users of Agent Static mode, Agent Flow mode, and Agent Operator should proceed with migrating to Grafana Alloy. If you have already migrated to Alloy, no further action is required. Read more about why we recommend migrating to Grafana Alloy.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
otelcol.exporter.otlp
otelcol.exporter.otlp accepts telemetry data from other otelcol components
and writes them over the network using the OTLP gRPC protocol.
NOTE:
otelcol.exporter.otlpis a wrapper over the upstream OpenTelemetry Collectorotlpexporter. Bug reports or feature requests will be redirected to the upstream repository, if necessary.
Multiple otelcol.exporter.otlp components can be specified by giving them
different labels.
Usage
otelcol.exporter.otlp "LABEL" {
client {
endpoint = "HOST:PORT"
}
}Arguments
otelcol.exporter.otlp supports the following arguments:
Blocks
The following blocks are supported inside the definition of
otelcol.exporter.otlp:
The > symbol indicates deeper levels of nesting. For example, client > tls
refers to a tls block defined inside a client block.
client block
The client block configures the gRPC client used by the component.
The following arguments are supported:
By default, requests are compressed with gzip. The compression argument
controls which compression mechanism to use. Supported strings are:
"gzip""zlib""deflate""snappy""zstd"
If compression is set to "none" or an empty string "", no compression is
used.
The balancer_name argument controls what client-side load balancing mechanism
to use. See the gRPC documentation on Load balancing for more information.
When unspecified, pick_first is used.
An HTTP proxy can be configured through the following environment variables:
HTTPS_PROXYNO_PROXY
The HTTPS_PROXY environment variable specifies a URL to use for proxying
requests. Connections to the proxy are established via the HTTP CONNECT
method.
The NO_PROXY environment variable is an optional list of comma-separated
hostnames for which the HTTPS proxy should not be used. Each hostname can be
provided as an IP address (1.2.3.4), an IP address in CIDR notation
(1.2.3.4/8), a domain name (example.com), or *. A domain name matches
that domain and all subdomains. A domain name with a leading “.”
(.example.com) matches subdomains only. NO_PROXY is only read when
HTTPS_PROXY is set.
Because otelcol.exporter.otlp uses gRPC, the configured proxy server must be
able to handle and proxy HTTP/2 traffic.
tls block
The tls block configures TLS settings used for the connection to the gRPC
server.
The following arguments are supported:
If the server doesn’t support TLS, the tls block must be provided with the
insecure argument set to true. To disable tls for connections to the
server, set the insecure argument to true.
keepalive block
The keepalive block configures keepalive settings for gRPC client
connections.
The following arguments are supported:
sending_queue block
The sending_queue block configures an in-memory buffer of batches before data is sent
to the gRPC server.
The following arguments are supported:
When enabled is true, data is first written to an in-memory buffer before
sending it to the configured server. Batches sent to the component’s input
exported field are added to the buffer as long as the number of unsent batches
does not exceed the configured queue_size.
queue_size is used to determine how long an endpoint outage is tolerated for.
Assuming 100 requests/second, the default queue size 5000 provides about 50
seconds of outage tolerance. To calculate the correct value for queue_size,
multiply the average number of outgoing requests per second by the amount of
time in seconds that outages should be tolerated for.
The num_consumers argument controls how many readers read from the buffer and
send data in parallel. Larger values of num_consumers allow data to be sent
more quickly at the expense of increased network traffic.
retry_on_failure block
The retry_on_failure block configures how failed requests to the gRPC server are
retried.
The following arguments are supported:
When enabled is true, failed batches are retried after a given interval.
The initial_interval argument specifies how long to wait before the first
retry attempt. If requests continue to fail, the time to wait before retrying
increases exponentially. The max_interval argument specifies the upper bound
of how long to wait between retries.
If a batch has not sent successfully, it is discarded after the time specified
by max_elapsed_time elapses. If max_elapsed_time is set to "0s", failed
requests are retried forever until they succeed.
Exported fields
The following fields are exported and can be referenced by other components:
input accepts otelcol.Consumer data for any telemetry signal (metrics,
logs, or traces).
Component health
otelcol.exporter.otlp is only reported as unhealthy if given an invalid
configuration.
Debug information
otelcol.exporter.otlp does not expose any component-specific debug
information.
Example
This example creates an exporter to send data to a locally running Grafana Tempo without TLS:
otelcol.exporter.otlp "tempo" {
client {
endpoint = "tempo:4317"
tls {
insecure = true
insecure_skip_verify = true
}
}
}


