Quickstart: Send data to the Elastic Cloud Managed OTLP Endpoint
Serverless
The Elastic Cloud Managed OTLP Endpoint is a fully managed offering exclusively for Elastic Cloud users 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. Refer to Elastic Cloud Managed OTLP Endpoint for more information.
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.
In this quickstart guide, you'll learn how to use the Elastic Cloud Managed OTLP Endpoint to send logs, metrics, and traces to Elastic.
- An Elastic Observability Serverless project. To learn more, refer to create an Observability project.
- A system forwarding logs, metrics, or traces in OTLP (any EDOT Collector or SDK—EDOT or community).
Follow these steps to send data to Elastic using the Elastic Cloud Managed OTLP Endpoint.
-
Check the requirements
To use the Elastic Cloud Managed OTLP Endpoint you need the following:
- An Elastic Observability Serverless project. Security projects are not yet supported.
- An OTLP-compliant shipper capable of forwarding logs, metrics, or traces in OTLP format. This can include the OpenTelemetry Collector (EDOT, Contrib, or other distributions), OpenTelemetry SDKs (EDOT, upstream, or other distributions), or any other forwarder that supports the OTLP protocol.
-
Locate your Elastic Cloud Managed OTLP Endpoint
To retrieve your Elastic Cloud Managed OTLP Endpoint endpoint address and an API key, follow these steps:
- In Elastic Cloud, create an Observability project or open an existing one.
- Select your project's name and then select Manage project.
- Locate the Connection alias and select Edit.
- Copy the Managed OTLP endpoint URL.
-
Create an API key
Generate an API key with appropriate ingest privileges to authenticate OTLP traffic:
- In Elastic Cloud, go to Manage project → API Keys.
- Select Create API Key.
- Name the key. For example,
otlp-client
. - Edit the optional security settings.
- Select Create API Key.
- Copy the key to the clipboard.
Add this key to your final API key string. For example:
Authorization: ApiKey <your-api-key>
ImportantThe API key copied from Kibana does not include the
ApiKey
scheme. Always prependApiKey
before using it in your configuration or encoding it for Kubernetes secrets. For example:- Correct:
Authorization: ApiKey abc123
- Incorrect:
Authorization: abc123
-
Send data to the Elastic Cloud Managed OTLP Endpoint
The final step is to use the Elastic Cloud Managed OTLP Endpoint endpoint and your Elastic API key to send data to Elastic Cloud.
To send data to the Elastic Cloud Managed OTLP Endpoint from the Elastic Distribution of OpenTelemetry Collector or the contrib Collector, configure the
otlp
exporter:exporters: otlp: endpoint: https://<motlp-endpoint> headers: Authorization: ApiKey <your-api-key>
Set the API key as an environment variable or directly in the configuration as shown in the example.
To send data to the Elastic Cloud Managed OTLP Endpoint from Elastic Distribution of OpenTelemetry SDKs or contrib SDKs, set the following variables in your application's environment:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://<motlp-endpoint>" export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey <your-api-key>"
Avoid extra spaces in the header. For Python SDKs replace any spaces with
%20
. For example:OTEL_EXPORTER_OTLP_HEADERS=Authorization=ApiKey%20<your-api-key>`
You can store your API key in a Kubernetes secret and reference it in your OTLP exporter configuration. This is more secure than hardcoding credentials.
The API key from Kibana does not include the
ApiKey
scheme. You must prependApiKey
before storing it.For example, if your API key from Kibana is
abc123
, run:kubectl create secret generic otlp-api-key \ --namespace=default \ --from-literal=api-key="ApiKey abc123"
Mount the secret as an environment variable or file, then reference it in your OTLP exporter configuration:
exporters: otlp: endpoint: https://<motlp-endpoint> headers: Authorization: ${API_KEY}
And in your deployment spec:
env: - name: API_KEY valueFrom: secretKeyRef: name: otlp-api-key key: api-key
ImportantWhen creating a Kubernetes secret, always encode the full string in Base64, including the scheme (for example,
ApiKey abc123
).
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.
The following sections provide troubleshooting information for the Elastic Cloud Managed OTLP Endpoint.
Don't have a collector or SDK running? Spin up an EDOT collector in just a few steps:
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.
The Managed OTLP endpoint has per-project rate limits in place. If you hit this limit, reach out to our support team. Refer to Rate limiting for more information.
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.