-
Notifications
You must be signed in to change notification settings - Fork 175
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
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[[otlp-visualize]] | ||
= Visualize OTLP data | ||
|
||
TIP: Want to ingest OpenTelemetry data? See <<collect-data-with-native-otlp>>. | ||
|
||
[discrete] | ||
== Get creative with Discover | ||
|
||
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}/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? |
178 changes: 178 additions & 0 deletions
178
docs/en/serverless/quickstarts/collect-data-with-native-otlp.asciidoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
[[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 Managed OTLP 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. | ||
|
||
[discrete] | ||
=== Create an API key | ||
|
||
. Click "Create an API Key" to generate a new API key. Copy this value for later. | ||
bmorelli25 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
. (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":{}}% | ||
vigneshshanmugam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
---- | ||
|
||
[discrete] | ||
=== Send data to your Elastic Cloud Managed OTLP endpoint | ||
|
||
bmorelli25 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* <<otel-sdk-running>> | ||
* <<no-sdk-running>> | ||
* <<instrumentation-please>> | ||
|
||
[discrete] | ||
[[otel-sdk-running]] | ||
==== I have an OTel Collector/SDK running | ||
|
||
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: | ||
|
||
[source,yaml] | ||
---- | ||
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 | ||
https://opentelemetry.io/docs/collector/configuration/[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 https://elastic.github.io/opentelemetry/edot-collector/index.html[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: | ||
|
||
[source,terminal] | ||
---- | ||
export OTEL_EXPORTER_OTLP_ENDPOINT="https://my-api-endpoint:443" | ||
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey <api-key>" | ||
---- | ||
|
||
For more information, see | ||
https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/[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 https://elastic.github.io/opentelemetry/edot-sdks/index.html[EDOT Language SDK documentation] for more information. | ||
|
||
[discrete] | ||
[[no-sdk-running]] | ||
==== I need an OTel Collector/SDK | ||
|
||
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 | ||
// * https://elastic.github.io/opentelemetry/quickstart/serverless/docker.html[Docker Quickstart] | ||
|
||
[discrete] | ||
[[instrumentation-please]] | ||
==== I just want to use the instrumentation | ||
|
||
Docs coming soon to https://elastic.github.io/opentelemetry/use-cases/application/ | ||
Just send data to your Elastic Cloud Managed OTLP endpoint. That's it. | ||
|
||
[discrete] | ||
== Troubleshoot | ||
|
||
**Api Key prefix not found** | ||
|
||
The following error is due to an improperly formatted API key: | ||
|
||
[source,terminal] | ||
---- | ||
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 <<otel-sdk-running>> for more information. | ||
|
||
[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]. | ||
|
||
[discrete] | ||
== What's next? | ||
|
||
Visualize your OpenTelemetry data. Learn more in <<otlp-visualize>>. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
