Elasticsearch (OTLP)
Description
The Elasticsearch (OTLP) Destination configures an OTLP Exporter to send telemetry data (logs, metric, traces) to Elastic for ingestion. The OTLP gRPC Exporter is used for Self-Managed
Elastic instances, and the OTLP/HTTP Exporter is used for Elastic Cloud
instances.
Supported Types
Logs | Metrics | Traces | BindPlane Agent |
---|---|---|---|
✓ | ✓ | ✓ | v1.36.0 + |
Elasticsearch Exporter vs OTLP Exporter
note
"When using the OpenTelemetry Collector, you should always prefer sending data via the OTLP exporter to an Elastic APM Server. Other methods, like using the elasticsearch exporter to send data directly to Elasticsearch will send data to the Elastic Stack, but will bypass all of the validation and data processing that the APM Server performs. In addition, your data will not be viewable in the Kibana Observability apps if you use the elasticsearch exporter."
How to Find Your APM Server URL and Secret Token
Elastic Cloud
- Navigate to your Elastic deployment.
- Navigate to Management > Fleet > Agent Policies (Search for agent policies).
- Select the Agent Policy you wish to configure your agent for. If none exist, one must be created.
- Under the integrations tab, there should be a row titled Elastic APM. On the far right of this row is a menu of actions. Select the action Edit Integration.
- Your Server URL is listed under General > Server Configuration > URL.
- Your Secret Token is listed under Agent Authorization > Secret token and can be configured if desired.
Self-Managed
For Kubernetes hosted Elastic, reference the Elastic docs: Connect to the APM Server
Configuration Table
Parameter | Type | Default | Description |
---|---|---|---|
telemetry_types | telemetrySelector | Logs, Metrics, Traces | Specifies which types of telemetry to export to Elasticsearch. |
deployment_type | enum | Elastic Cloud | The deployment model of your elastic instance. Either Elastic Cloud or Self-Managed . Used to determine whether the http or gRPC protocol will be used, respectively. |
server_url | string | The URL of your Elastic APM Server. Telemetry will be sent to server_url/v1/logs , server_url/v1/metrics , server_url/v1/traces respectively. Only relevant for Elastic Cloud instances. | |
hostname | string | The hostname or IP address of your Elastic APM Server. Only relevant for Self-Managed Elastic instances. | |
grpc_port | int | 8200 | TCP port to which the exporter is going to send OTLP data. Only relevant for Self-Managed Elastic instances. |
secret_token | string | The Secret Token for agents to authenticate with your Elastic APM Server. | |
enable_tls | bool | true | Enable advanced TLS settings. Only relevant for Self-Managed Elastic. Elastic Cloud instances always use TLS with TLS Verification enabled. |
insecure_skip_verify | bool | false | Enable to skip TLS certificate verification. |
ca_file | string | Certificate authority used to validate the database server's TLS certificate. | |
tls_server_name_override | string | Optional virtual hostname. Indicates the name of the server requested by the client. This option is generally not required. | |
mutual_tls | bool | false | Whether or not to use mutual TLS authentication. |
cert_file | string | A TLS certificate used for client authentication if mutual TLS is enabled. | |
key_file | string | A TLS private key used for client authentication if mutual TLS is enabled. | |
compression | enum | gzip | Compression algorithm to use when sending data to the OTLP server. Must be one of none , gzip , and zlib . |
headers | map | {} | Additional headers to attach to each request. |
Supported Retry and Queuing Settings
This destination supports the following retry and queuing settings:
Sending Queue | Persistent Queue | Retry on Failure |
---|---|---|
✓ | ✓ | ✓ |
Example Configuration
Web Interface