New

The executive guide to generative AI

Read more

Quickstart: Send data to the Elastic Cloud Managed OTLP Endpoint

edit

Quickstart: Send data to the Elastic Cloud Managed OTLP Endpoint

edit

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

In this quickstart guide, you’ll learn how to use the Elastic Cloud Managed OTLP Endpoint to send logs, metrics, and traces to Elastic.

What is the Elastic Cloud Managed OTLP endpoint?

edit

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.

Prerequisites

edit
  • 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).

Limitations

edit
  • 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.

Get started

edit

Get your native OTLP endpoint credentials

edit
  1. Create a new Elastic Observability Serverless project, or open an existing one.
  2. In your Elastic Observability Serverless project, go to Add Data.
  3. Under What do you want to monitor? select Application, and then under Monitor your application using select OpenTelemetry.

    Follow this flow for all use cases, including logs and infrastructure monitoring.

  4. Copy the OTEL_EXPORTER_OTLP_ENDPOINT URL. Replace .apm with .ingest and save this value for later.

Create an API key

edit
  1. Click "Create an API Key" to generate a new API key. Copy this value for later.
  2. (Optional) Test your new API key. You can do this 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":{}}%

Send data to your Elastic Cloud Managed OTLP endpoint

edit

I have an OTel Collector/SDK running

edit

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.

I need an OTel Collector/SDK

edit

Don’t have a collector or SDK running? No problem. Spin up an EDOT collector in just a few steps:

I just want to use the instrumentation

edit

See application use-cases for more information.

Troubleshoot

edit

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.

Provide feedback

edit

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, please open an issue in the elastic-agent repository.

What’s next?

edit

Visualize your OpenTelemetry data. Learn more in Visualize OTLP data.