|
2 | 2 | navigation_title: "OTLP/HTTP endpoint" |
3 | 3 | applies_to: |
4 | 4 | stack: preview 9.2 |
| 5 | + deployment: |
| 6 | + self: |
5 | 7 | products: |
6 | 8 | - id: elasticsearch |
7 | 9 | --- |
8 | 10 |
|
9 | 11 | # OTLP/HTTP endpoint |
10 | 12 |
|
11 | 13 | :::{important} |
12 | | -Usually, you'll want to send data to an OpenTelemetry Collector or the [{{motlp}}](opentelemetry:/reference/motlp.md), |
13 | | -rather than directly going to the {{es}} OTLP endpoint. |
14 | | -See [Best practices](#best-practices) for more details. |
| 14 | +The recommended way to send OTLP data for most use cases is through an OpenTelemetry Collector in [Gateway mode](elastic-agent://reference/edot-collector/config/default-config-standalone.md#gateway-mode) or, if you're on {{ecloud}}, directly to the [{{motlp}}](opentelemetry:/reference/motlp.md). Refer to [Best practices](#best-practices) for more details. |
15 | 15 | ::: |
16 | 16 |
|
17 | 17 | In addition to the ingestion of metrics data through the bulk API, |
18 | | -{{es}} offers an alternative way to ingest data via the [OpenTelemetry Protocol (OTLP)](https://opentelemetry.io/docs/specs/otlp). |
| 18 | +{{es}} offers an alternative way to ingest data through the [OpenTelemetry Protocol (OTLP)](https://opentelemetry.io/docs/specs/otlp). |
19 | 19 |
|
20 | 20 | The endpoint is available under `/_otlp/v1/metrics`. |
21 | 21 |
|
22 | | -:::{note} |
23 | | -{{es}} only supports [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp), |
24 | | -not [OTLP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc). |
25 | | -::: |
26 | | - |
27 | 22 | Ingesting metrics data using the OTLP endpoint has the following advantages: |
28 | 23 |
|
29 | 24 | * Improved ingestion performance, especially if the data contains many resource attributes. |
30 | 25 | * Simplified index mapping: |
31 | 26 | there's no need to manually create data streams, index templates, or define dimensions and metrics. |
32 | 27 | Metrics are dynamically mapped using the metadata included in the OTLP requests. |
33 | 28 |
|
| 29 | +:::{note} |
| 30 | +{{es}} only supports [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp), |
| 31 | +not [OTLP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc). |
| 32 | +::: |
| 33 | + |
34 | 34 | ## How to send data to the OTLP endpoint |
35 | 35 |
|
36 | 36 | To send data from an OpenTelemetry Collector to the {{es}} OTLP endpoint, |
@@ -64,19 +64,23 @@ service: |
64 | 64 | exporters: [otlphttp/elasticsearch-metrics] |
65 | 65 | receivers: ... |
66 | 66 | ``` |
67 | | -:::{note} |
68 | | -Only `encoding: proto` is supported, which the `OTLP/HTTP` exporter uses by default. |
69 | | -::: |
| 67 | +
|
70 | 68 | The supported options for `compression` are `gzip` (default value of the `OTLP/HTTP` exporter) and `none`. |
71 | 69 |
|
72 | 70 | % TODO we might actually also support snappy and zstd, test and update accordingly) |
73 | 71 |
|
74 | 72 | To track metrics in your custom application, |
75 | 73 | use the [OpenTelemetry language SDK](https://opentelemetry.io/docs/getting-started/dev/) of your choice. |
76 | 74 |
|
| 75 | +:::{note} |
| 76 | +Only `encoding: proto` is supported, which the `OTLP/HTTP` exporter uses by default. |
| 77 | +::: |
| 78 | + |
77 | 79 | ## Best practices |
78 | 80 |
|
79 | | -Do not send metrics from applications directly to the {{es}} OTLP endpoint, especially if there are many individual applications that periodically send a small amount of metrics. Instead, send data to an OpenTelemetry Collector first. This helps with handling many connections, and with creating bigger batches to improve ingestion performance. On {{ecloud}}, use the [{{motlp}}](opentelemetry:/reference/motlp.md) and for self-managed use cases, you can use the [Elastic Distribution of OpenTelemetry Collector](elastic-agent:/reference/edot-collector/index.md). |
| 81 | +Don't send metrics from applications directly to the {{es}} OTLP endpoint, especially if there are many individual applications that periodically send a small amount of metrics. Instead, send data to an OpenTelemetry Collector first. This helps with handling many connections, and with creating bigger batches to improve ingestion performance. |
| 82 | + |
| 83 | +On {{ecloud}}, use the [{{motlp}}](opentelemetry:/reference/motlp.md) and for self-managed use cases, you can use the [Elastic Distribution of OpenTelemetry Collector](elastic-agent:/reference/edot-collector/index.md). |
80 | 84 |
|
81 | 85 | For more details on the recommended way to set up OpenTelemetry-based data ingestion, refer to the [EDOT reference architecture](opentelemetry:/reference/architecture/index.md). |
82 | 86 |
|
|
0 commit comments