Skip to content

Collect data with Elastic Cloud Native OpenTelemetry Endpoint #4854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/en/serverless/images/hosts-ui-otlp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/serverless/images/resource-attrs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/en/serverless/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ include::./quickstarts/k8s-logs-metrics.asciidoc[leveloffset=+3]
include::./quickstarts/monitor-hosts-with-otel.asciidoc[leveloffset=+3]
include::./quickstarts/monitor-k8s-otel.asciidoc[leveloffset=+3]
include::./quickstarts/collect-data-with-aws-firehose.asciidoc[leveloffset=+3]
include::./quickstarts/collect-data-with-native-otlp.asciidoc[leveloffset=+3]

// Dashboards
include::./dashboards/dashboards-and-visualizations.asciidoc[leveloffset=+3]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
[[collect-data-with-native-otlp]]
= Quickstart: Send data to the Elastic Cloud Managed OTLP Endpoint

preview::[]

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

[discrete]
== What is the Elastic Cloud Native OpenTelemetry Endpoint?

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.

[%collapsible]
.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 {observability-guide}/apm-open-telemetry.html[existing functionality], which primarily focuses on traces and the APM use case.
====

[discrete]
== Prerequisites

* An {obs-serverless} project. To learn more, refer to <<observability-create-an-observability-project>>.
* A system forwarding logs, metrics, or traces in OTLP (any OTel Collector or SDK—EDOT or community).

[discrete]
=== Limitations

* 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.
* Per-project rate limits apply. If you hit this limit, reach out to our https://support.elastic.co[support team].

[discrete]
== Get started

[discrete]
=== Get your native OTLP endpoint credentials

. <<observability-create-an-observability-project,Create a new {obs-serverless} project>>, or open an existing one.

. In your {obs-serverless} project, go to **Add Data**.

. Under **What do you want to monitor?** select **Application**, and then under **Monitor your application using** select **OpenTelemetry**.
+
NOTE: Follow 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users will no longer have to edit the endpoint, the actual endpoint url will be displayed in the cloud console and also in the application onboarding. I recommend we guide users to obtain the endpoint from cloud console.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify: We should recommend users go to the cloud console for both the Endpoint and API key, not the onboarding flow?

Should we doc both?

Copy link
Member Author

@bmorelli25 bmorelli25 Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to: "Managed OTLP endpoint"
Update to use Cloud Console to reduce confusion about what type of data is supported

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mlunadia I'm not able to replicate this page in the cloud console.

When I click on "Manage project API keys" I'm taken to this page
Screenshot 2025-03-26 at 8 03 06 PM


[discrete]
=== Create an API key

. Click "Create an API Key" to generate a new API key. Copy this value for later.
. (Optional) Test your new API key. You can do this by sending an empty JSON object to the `/v1/traces` endpoint. For example:
+
[source,bash]
----
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:
+
[source,txt]
----
{"partialSuccess":{}}%
----

[discrete]
=== Send data to your native OTLP endpoint

To send data to your native OTLP endpoint, add the above credentials to your OpenTelemetry collector or SDK. If you're unsure how to accomplish this, the following links may be helpful:

* https://opentelemetry.io/docs/collector/configuration/[OTLP Collector configuration]
* https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/[OTLP Exporter configuration]
* https://elastic.github.io/opentelemetry/edot-collector/edot-collector-config.html[Elastic Distributions of OpenTelemetry (EDOT) Collector configuration]
* https://elastic.github.io/opentelemetry/edot-sdks/index.html[Elastic Distributions of OpenTelemetry (EDOT) SDKs]

// I'm not entirely sure how to be more helpful here
// Should we expand on some of these in this doc?

That's it. You're now ready to leverage OTel in Elastic Observability.

[discrete]
==== (Optional) Install EDOT Collector

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

* https://elastic.github.io/opentelemetry/quickstart/serverless/k8s.html[Kubernetes Quickstart]
* https://elastic.github.io/opentelemetry/quickstart/serverless/hosts_vms.html[Hosts & VMs Quickstart]

// Commenting out Docker until the docs are ready
Copy link
Member Author

@bmorelli25 bmorelli25 Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other is focussed on on infra. This will focus on use case
APM coming soon here: https://elastic.github.io/opentelemetry/use-cases/application/

// * https://elastic.github.io/opentelemetry/quickstart/serverless/docker.html[Docker Quickstart]

[discrete]
== Get creative with Discover
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to a new page in apps and services

Make for ANY otlp data

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End goal is analysis of OTLP data in one place


**Discover allows you to quickly search and filter your data, get information about the structure of the fields in your data, and display your findings in a visualization.
Find **Discover** in your {obs-serverless} project's UI under *Analyze / Discover*.

Attributes and resource attributes are prefixed with `attributes.*` and `resource.attributes.*`.
You can correlate all signals with a single `resource.attributes.*`.

[role="screenshot"]
image::images/resource-attrs.png[resource attributes]

See {kibana-ref}/discover.html[Discover] to learn more.

[discrete]
== Monitor application performance

The Applications UI allows you to monitor your software services and applications in real-time. You can visualize detailed performance information on your services, identify and analyze errors, and monitor host-level metrics.

[discrete]
== Check the health of your infrastructure

To access the **Hosts** page, in your {obs-serverless} project, go to
**Infrastructure** → **Hosts**.

On the Hosts page, you can view health and performance metrics to help you quickly:

* Analyze and compare hosts without having to build new dashboards.
* Identify which hosts trigger the most alerts.
* Troubleshoot and resolve issues quickly.

[role="screenshot"]
image::images/hosts-ui-otlp.png[resource attributes]

See {observability-guide}/observability-analyze-hosts.html[Analyze and compare hosts] to learn more.

[discrete]
=== (Optional) Install the OpenTelemetry Assets integration

Install the OpenTelemetry Assets integrations to access the "[OTEL][Metrics Kubernetes] Cluster Overview" dashboard.
This dashboard

In your {obs-serverless} project, go to **Integrations** and toggle **Display beta integrations**.
Search for "OpenTelemetry" and select and install **Kubernetes OpenTelemetry Assets**.

// Does anyone have a cluster with relevant data that we can use to take a screenshot of this dashboard?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asked above too

Does anyone have a cluster with relevant data that we can use to take a screenshot of this dashboard?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mlunadia ^^ could you provide it since you have already have one running. Thanks


[discrete]
== Troubleshoot

// are there specific troubleshooting scenarios we should call out?

[discrete]
== Provide feedback

We love to hear from you!
Help improve the Elastic Cloud Managed OTLP Endpoint by sending us feedback in our https://discuss.elastic.co/c/apm[discussion forum] or https://elasticstack.slack.com/signup#/domain-signup[community Slack].

For EDOT collector feedback, please open an issue in the https://github.com/elastic/elastic-agent/issues[elastic-agent repository].