Skip to content

Commit 69a4249

Browse files
Collect data with Elastic Cloud Native OpenTelemetry Endpoint (#1000)
### Summary Ports elastic/observability-docs#4854 to V3. --------- Co-authored-by: Arianna Laudazzi <[email protected]>
1 parent ac5f4f3 commit 69a4249

File tree

5 files changed

+219
-0
lines changed

5 files changed

+219
-0
lines changed

solutions/images/hosts-ui-otlp.png

216 KB
Loading
499 KB
Loading
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
---
2+
mapped_urls:
3+
- https://www.elastic.co/guide/en/serverless/current/collect-data-with-native-otlp.html
4+
applies_to:
5+
serverless:
6+
---
7+
8+
# Quickstart: Send data to the Elastic Cloud Managed OTLP Endpoint
9+
10+
In this quickstart guide, you'll learn how to use the Elastic Cloud Managed OTLP Endpoint to send logs, metrics, and traces to Elastic.
11+
12+
## What is the Elastic Cloud Managed OTLP endpoint?
13+
14+
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.
15+
16+
This endpoint is designed for the following use cases:
17+
18+
* Logs & Infrastructure Monitoring: Logs forwarded in OTLP format and host and Kubernetes metrics in OTLP format.
19+
* APM: Application telemetry in OTLP format.
20+
21+
:::{dropdown} Differences from the existing Elastic APM Endpoint
22+
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](/solutions/observability/apps/use-opentelemetry-with-apm.md), which primarily focuses on traces and the APM use case.
23+
:::
24+
25+
## Prerequisites
26+
27+
* An {{obs-serverless}} project. To learn more, refer to [create an Observability project](/solutions/observability/get-started/create-an-observability-project.md).
28+
* A system forwarding logs, metrics, or traces in OTLP (any OTel Collector or SDK—EDOT or community).
29+
30+
### Limitations
31+
32+
* The OTLP endpoint only supports histograms with delta temporality. Cumulative histograms are dropped.
33+
* Latency distributions based on histogram values have limited precision due to the fixed boundaries of explicit bucket histograms.
34+
35+
## Get started
36+
37+
### Get your native OTLP endpoint credentials
38+
39+
1. [create a new Observability project](/solutions/observability/get-started/create-an-observability-project.md), or open an existing one.
40+
41+
1. In your {{obs-serverless}} project, go to **Add Data**.
42+
43+
1. Under **What do you want to monitor?** select **Application**, and then under **Monitor your application using** select **OpenTelemetry**.
44+
45+
:::{note}
46+
Follow this flow for all use cases, including logs and infrastructure monitoring.
47+
:::
48+
49+
1. Copy the `OTEL_EXPORTER_OTLP_ENDPOINT` URL. Replace `.apm` with `.ingest` and save this value for later.
50+
51+
### Create an API key
52+
53+
1. Click **Create an API Key** to generate a new API key. Copy this value for later.
54+
1. (Optional) Test your new API key by sending an empty JSON object to the `/v1/traces` endpoint. For example:
55+
56+
```bash
57+
curl -X POST \
58+
-H "Content-Type: application/json" \
59+
-H "Authorization: ApiKey <api-key>" \
60+
https://{YOUR_CLUSTER}.ingest.us-east-1.aws.elastic.cloud:443/v1/traces \
61+
-d '{}'
62+
```
63+
64+
The response should be similar to:
65+
66+
```txt
67+
{"partialSuccess":{}}%
68+
```
69+
70+
### Send data to your Elastic Cloud Managed OTLP endpoint
71+
72+
* [I have an OTel Collector/SDK running](#otel-sdk-running)
73+
* [I need an OTel Collector/SDK](#no-sdk-running)
74+
* [I just want to use the instrumentation](#instrumentation-please)
75+
76+
#### I have an OTel Collector/SDK running [otel-sdk-running]
77+
78+
If you have an OpenTelemetry Collector or SDK exporting telemetry data,
79+
configure it with the endpoint and API key generated in the previous steps.
80+
81+
**OpenTelemetry Collector configuration**
82+
83+
Configure your OTel Collector as follows:
84+
85+
```yaml
86+
exporters:
87+
otlp:
88+
endpoint: "https://my_cluster.ingest.us-east-1.aws.elastic.cloud:443/v1/traces"
89+
headers: "Authorization": "ApiKey <api-key-value-here>"
90+
```
91+
92+
For more information, see [OTLP Collector configuration](https://opentelemetry.io/docs/collector/configuration/).
93+
94+
**Elastic Distributions of OpenTelemetry (EDOT) Collector configuration**
95+
96+
Configure an EDOT Collector using the same method described above in **OpenTelemetry Collector configuration**.
97+
See the [EDOT Language SDK documentation](https://elastic.github.io/opentelemetry/edot-collector/index.html) for more information.
98+
99+
**OpenTelemetry SDK configuration**
100+
101+
Configure your OTel SDK with the following environment variables:
102+
103+
* Elastic Cloud Managed OTLP endpoint: `OTEL_EXPORTER_OTLP_ENDPOINT`
104+
* Elastic API key: `OTEL_EXPORTER_OTLP_HEADERS`
105+
106+
For example:
107+
108+
```bash
109+
export OTEL_EXPORTER_OTLP_ENDPOINT="https://my-api-endpoint:443"
110+
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey <api-key>"
111+
```
112+
113+
For more information, see [OTLP Exporter configuration](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/).
114+
115+
**Elastic Distributions of OpenTelemetry (EDOT) SDK configuration**
116+
117+
Configure an EDOT SDK using the same method described above in **OpenTelemetry SDK configuration**.
118+
See the [EDOT Language SDK documentation](https://elastic.github.io/opentelemetry/edot-sdks/index.html) for more information.
119+
120+
#### I need an OTel Collector/SDK [no-sdk-running]
121+
122+
Don't have a collector or SDK running? No problem. Spin up an EDOT collector in just a few steps:
123+
124+
* [Kubernetes Quickstart](https://elastic.github.io/opentelemetry/quickstart/serverless/k8s.html)
125+
* [Hosts & VMs Quickstart](https://elastic.github.io/opentelemetry/quickstart/serverless/hosts_vms.html)
126+
127+
% Commenting out Docker until the docs are ready
128+
% * [Docker Quickstart](https://elastic.github.io/opentelemetry/quickstart/serverless/docker.html)
129+
130+
#### I just want to use the instrumentation [instrumentation-please]
131+
132+
See [application use-cases](https://elastic.github.io/opentelemetry/use-cases/application/) for more information.
133+
134+
## Troubleshoot
135+
136+
**Api Key prefix not found**
137+
138+
The following error is due to an improperly formatted API key:
139+
140+
```txt
141+
Exporting failed. Dropping data.
142+
{"kind": "exporter", "data_type": }
143+
"Unauthenticated desc = ApiKey prefix not found"
144+
```
145+
146+
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](#otel-sdk-running) for more information.
147+
148+
**Error: too many requests**
149+
150+
The Managed endpoint has per-project rate limits in place. If you hit this limit, reach out to our [support team](https://support.elastic.co).
151+
152+
## Provide feedback
153+
154+
We love to hear from you!
155+
Help improve the Elastic Cloud Managed OTLP Endpoint by sending us feedback in our [discussion forum](https://discuss.elastic.co/c/apm) or [community Slack](https://elasticstack.slack.com/signup#/domain-signup).
156+
157+
For EDOT collector feedback, open an issue in the [elastic-agent repository](https://github.com/elastic/elastic-agent/issues).
158+
159+
## What's next?
160+
161+
Visualize your OpenTelemetry data. Learn more in [](/solutions/observability/otlp-visualize.md).
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
mapped_urls:
3+
- https://www.elastic.co/guide/en/serverless/current/otlp-visualize.html
4+
applies_to:
5+
serverless:
6+
---
7+
8+
# Visualize OTLP data
9+
10+
:::{tip}
11+
Want to ingest OpenTelemetry data? See [](/solutions/observability/get-started/quickstart-elastic-cloud-otel-endpoint.md).
12+
:::
13+
14+
## Get creative with Discover
15+
16+
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.
17+
Find **Discover** in your {{obs-serverless}} project's UI under **Analyze** --> **Discover**.
18+
19+
Attributes and resource attributes are prefixed with `attributes.*` and `resource.attributes.*`.
20+
You can correlate all signals with a single `resource.attributes.*`.
21+
22+
:::{image} ../images/resource-attrs.png
23+
:screenshot:
24+
:alt: resource attributes
25+
:::
26+
27+
See [](/explore-analyze/discover.md) to learn more.
28+
29+
## Monitor application performance
30+
31+
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.
32+
33+
## Check the health of your infrastructure
34+
35+
To access the **Hosts** page, in your {{obs-serverless}} project, go to
36+
**Infrastructure****Hosts**.
37+
38+
On the Hosts page, you can view health and performance metrics to help you quickly:
39+
40+
* Analyze and compare hosts without having to build new dashboards.
41+
* Identify which hosts trigger the most alerts.
42+
* Troubleshoot and resolve issues quickly.
43+
44+
:::{image} ../images/hosts-ui-otlp.png
45+
:screenshot:
46+
:alt: resource attributes
47+
:::
48+
49+
See [](/solutions/observability/infra-and-hosts/analyze-compare-hosts.md) to learn more.
50+
51+
### (Optional) Install the OpenTelemetry Assets integration
52+
53+
Install the OpenTelemetry Assets integrations to access the "[OTEL][Metrics Kubernetes] Cluster Overview" dashboard.
54+
55+
In your {{obs-serverless}} project, go to **Integrations** and toggle **Display beta integrations**.
56+
Search for "OpenTelemetry" to select and install **Kubernetes OpenTelemetry Assets**.

solutions/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ toc:
9494
- file: observability/get-started/quickstart-monitor-hosts-with-opentelemetry.md
9595
- file: observability/get-started/quickstart-unified-kubernetes-observability-with-elastic-distributions-of-opentelemetry-edot.md
9696
- file: observability/get-started/quickstart-collect-data-with-aws-firehose.md
97+
- file: observability/get-started/quickstart-elastic-cloud-otel-endpoint.md
9798
- file: observability/get-started/add-data-from-splunk.md
9899
- file: observability/get-started/get-started-with-dashboards.md
99100
- file: observability/apps.md
@@ -314,6 +315,7 @@ toc:
314315
- file: observability/apps/analyze-monitors.md
315316
- file: observability/apps/inspect-uptime-duration-anomalies.md
316317
- file: observability/apps/configure-settings.md
318+
- file: observability/otlp-visualize.md
317319
- file: observability/apps/tutorial-monitor-java-application.md
318320
- file: observability/cicd.md
319321
- file: observability/cloud.md

0 commit comments

Comments
 (0)