Quickstart: Send data to the Elastic Cloud Managed OTLP Endpoint
Serverless
In this quickstart guide, you'll learn how to use the Elastic Cloud Managed OTLP Endpoint to send logs, metrics, and traces to Elastic.
The Managed OTLP Endpoint is a fully managed offering exclusively for Elastic Cloud users (initially available in Elastic Cloud Serverless only) that simplifies OpenTelemetry data ingestion. It provides an endpoint for OpenTelemetry SDKs and Collectors to send telemetry data, with Elastic handling scaling, data processing, and storage.
This endpoint is designed for the following use cases:
- Logs & Infrastructure Monitoring: Logs forwarded in OTLP format and host and Kubernetes metrics in OTLP format.
- APM: Application telemetry in OTLP format.
Differences from the existing Elastic APM Endpoint
The Elastic Cloud Managed OTLP Endpoint ensures that OpenTelemetry data is stored without any schema translation, preserving both OpenTelemetry semantic conventions and resource attributes. It supports ingesting OTLP logs, metrics, and traces in a unified manner, ensuring consistent treatment across all telemetry data. This marks a significant improvement over the existing functionality, which primarily focuses on traces and the APM use case.
- An Elastic Observability Serverless project. To learn more, refer to create an Observability project.
- A system forwarding logs, metrics, or traces in OTLP (any OTel Collector or SDK—EDOT or community).
- The OTLP endpoint only supports histograms with delta temporality. Cumulative histograms are dropped.
- Latency distributions based on histogram values have limited precision due to the fixed boundaries of explicit bucket histograms.
create a new Observability project, or open an existing one.
In your Elastic Observability Serverless project, go to Add Data.
Under What do you want to monitor? select Application, and then under Monitor your application using select OpenTelemetry.
NoteFollow this flow for all use cases, including logs and infrastructure monitoring.
Copy the
OTEL_EXPORTER_OTLP_ENDPOINT
URL. Replace.apm
with.ingest
and save this value for later.
Click Create an API Key to generate a new API key. Copy this value for later.
(Optional) Test your new API key by sending an empty JSON object to the
/v1/traces
endpoint. For example:curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: ApiKey <api-key>" \ https://{YOUR_CLUSTER}.ingest.us-east-1.aws.elastic.cloud:443/v1/traces \ -d '{}'
The response should be similar to:
{"partialSuccess":{}}%
- I have an OTel Collector/SDK running
- I need an OTel Collector/SDK
- I just want to use the instrumentation
If you have an OpenTelemetry Collector or SDK exporting telemetry data, configure it with the endpoint and API key generated in the previous steps.
OpenTelemetry Collector configuration
Configure your OTel Collector as follows:
exporters:
otlp:
endpoint: "https://my_cluster.ingest.us-east-1.aws.elastic.cloud:443/v1/traces"
headers: "Authorization": "ApiKey <api-key-value-here>"
For more information, see OTLP Collector configuration.
Elastic Distributions of OpenTelemetry (EDOT) Collector configuration
Configure an EDOT Collector using the same method described above in OpenTelemetry Collector configuration. See the EDOT Language SDK documentation for more information.
OpenTelemetry SDK configuration
Configure your OTel SDK with the following environment variables:
- Elastic Cloud Managed OTLP endpoint:
OTEL_EXPORTER_OTLP_ENDPOINT
- Elastic API key:
OTEL_EXPORTER_OTLP_HEADERS
For example:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://my-api-endpoint:443"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey <api-key>"
For more information, see OTLP Exporter configuration.
Elastic Distributions of OpenTelemetry (EDOT) SDK configuration
Configure an EDOT SDK using the same method described above in OpenTelemetry SDK configuration. See the EDOT Language SDK documentation for more information.
Don't have a collector or SDK running? No problem. Spin up an EDOT collector in just a few steps:
See application use-cases for more information.
Api Key prefix not found
The following error is due to an improperly formatted API key:
Exporting failed. Dropping data.
{"kind": "exporter", "data_type": }
"Unauthenticated desc = ApiKey prefix not found"
You must format your API key as "Authorization": "ApiKey <api-key-value-here>"
or "Authorization=ApiKey <api-key>"
depending on whether you're using a collector or SDK. See I have an OTel Collector/SDK running for more information.
Error: too many requests
The Managed endpoint has per-project rate limits in place. If you hit this limit, reach out to our support team.
We love to hear from you! Help improve the Elastic Cloud Managed OTLP Endpoint by sending us feedback in our discussion forum or community Slack.
For EDOT collector feedback, open an issue in the elastic-agent repository.
Visualize your OpenTelemetry data. Learn more in Visualize OTLP data.