Snippets · Destinations
Send logs and traces to OpenSearch
OpenSearch has its own exporter in otelcol-contrib. It writes logs and traces into the index you name, with basic auth credentials from the environment. In our test against OpenSearch 2.17 it indexed all three test log records in otel-logs.
- Source
- OTLP
- Components
- otlpbatchmemory_limiter
- Destination
- OpenSearch
OpenTelemetry Collector
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
processors:
memory_limiter:
check_interval: 1s
limit_percentage: 80
spike_limit_percentage: 25
batch:
timeout: 5s
exporters:
opensearch:
http:
endpoint: https://opensearch.example.internal:9200
auth:
authenticator: basicauth/opensearch
logs_index: otel-logs
sending_queue:
enabled: true
queue_size: 5000
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
extensions:
basicauth/opensearch:
client_auth:
username: ${env:OPENSEARCH_USER}
password: ${env:OPENSEARCH_PASSWORD}
service:
extensions: [basicauth/opensearch]
pipelines:
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [opensearch]
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [opensearch]
LinkMesh
LinkMesh has no built-in template for this job. Add it as a custom destination in raw mode, with opensearch as the component type and this body - the same lines as under opensearch in the collector config:
http:
endpoint: https://opensearch.example.internal:9200
auth:
authenticator: basicauth/opensearch
logs_index: otel-logs
sending_queue:
enabled: true
queue_size: 5000
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
How custom components are validated and rolled out: create a custom destination.
Download config.yamlValidated with otelcol-contrib v0.161.0 on 2026-10-26
Complete config files, each checked with the collector's own validate command (otelcol-contrib v0.161.0).
The gotcha
The elasticsearch exporter is not a substitute. In our test, pointed at the same OpenSearch 2.17, it logged "Permanent error: flush failed (400): {\"error\":{\"type\":\"illegal_argument_exception\"...}}" after its flush interval and indexed nothing - the opensearch exporter indexed all three records.
Manage this across a fleet
LinkMesh manages collector configuration across a fleet from one self-hosted control plane, so a change like this is made once rather than host by host. The first 25 Collectors are free after a no-card registration in the OpenSight Customer Portal (5 without one).
Doing this in LinkMesh: Create a custom source or destination
Related snippets
- Agents to a gateway tier, load-balanced by trace IDAgents route every span of a trace to the same gateway, so tail sampling on the gateways sees complete traces.
- Send to Azure Monitor (Application Insights)Logs, metrics and traces to Application Insights, authenticated by the connection string from the environment.
- Store telemetry in ClickHouseLogs, traces and metrics into ClickHouse tables the exporter creates for you, expired by TTL.
- Send to DatadogLogs, metrics and traces to Datadog, with the API key from the environment and a queue in front of the exporter.