|
1 | 1 | ---
|
2 |
| -title: "OpenTelemetry Collector" |
3 |
| -linkTitle: "OpenTelemetry Collector" |
| 2 | +title: "Use OpenTelemetry Collector to send metrics to Cortex" |
| 3 | +linkTitle: "Use OpenTelemetry Collector to send metrics to Cortex" |
4 | 4 | weight: 10
|
5 |
| -slug: opentelemetry-collector |
| 5 | +slug: use-opentelemetry-collector-to-send-metrics-to-cortex |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | This guide explains how to configure open-telemetry collector and OTLP(OpenTelemetry Protocol) configurations in the
|
@@ -64,9 +64,22 @@ service:
|
64 | 64 | exporters: [otlphttp]
|
65 | 65 | ```
|
66 | 66 |
|
67 |
| -## Configure OTLP |
| 67 | +## Cortex configurations for ingesting OTLP metrics |
| 68 | +You can configure OTLP-related flags in the config file. |
68 | 69 |
|
69 |
| -### target_info metric |
| 70 | +``` |
| 71 | +limits: |
| 72 | + promote_resource_attributes: <list of string> |
| 73 | +... |
| 74 | +distributor: |
| 75 | + otlp: |
| 76 | + convert_all_attributes: <boolean> |
| 77 | + disable_target_info: <boolean> |
| 78 | + allow_delta_temporality: <boolean> |
| 79 | + enable_type_and_unit_labels: <boolean> |
| 80 | +``` |
| 81 | + |
| 82 | +### Ingest `target_info` metric |
70 | 83 |
|
71 | 84 | By default,
|
72 | 85 | the [target_info](https://github.com/prometheus/OpenMetrics/blob/main/specification/OpenMetrics.md#supporting-target-metadata-in-both-push-based-and-pull-based-systems)
|
@@ -117,6 +130,17 @@ distributor:
|
117 | 130 | disable_target_info: false
|
118 | 131 | ```
|
119 | 132 |
|
| 133 | +### Ingest delta temporality OTLP metrics |
| 134 | + |
| 135 | +OpenTelemetry supports two temporalities, [Delta and Cumulative](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#temporality). |
| 136 | +By default, only the cumulative metrics can be ingested via OTLP endpoint in Cortex. |
| 137 | +To enable the ingestion of OTLP metrics with delta temporality, set the `distributor.otlp.allow-delta-temporality` flag to `true`. |
| 138 | + |
| 139 | +### Enable `__type__` and `__unit__` label |
| 140 | + |
| 141 | +The `__type__` and `__unit__` labels are added to OTLP metrics if `distributor.otlp.enable-type-and-unit-labels` is set to `true`. |
| 142 | +This flag is disabled by default. |
| 143 | + |
120 | 144 | ### Configure promote resource attributes per tenants
|
121 | 145 |
|
122 | 146 | The `promote_resource_attributes` is a [runtime config](./overrides-exporter.md) so you can configure it per tenant.
|
|
0 commit comments