diff --git a/docs/guides/open-telemetry-collector.md b/docs/guides/open-telemetry-collector.md index 40d2aa83bf2..cd0e9bd7ad2 100644 --- a/docs/guides/open-telemetry-collector.md +++ b/docs/guides/open-telemetry-collector.md @@ -1,8 +1,8 @@ --- -title: "OpenTelemetry Collector" -linkTitle: "OpenTelemetry Collector" +title: "Use OpenTelemetry Collector to send metrics to Cortex" +linkTitle: "Use OpenTelemetry Collector to send metrics to Cortex" weight: 10 -slug: opentelemetry-collector +slug: use-opentelemetry-collector-to-send-metrics-to-cortex --- This guide explains how to configure open-telemetry collector and OTLP(OpenTelemetry Protocol) configurations in the @@ -64,9 +64,22 @@ service: exporters: [otlphttp] ``` -## Configure OTLP +## Cortex configurations for ingesting OTLP metrics +You can configure OTLP-related flags in the config file. -### target_info metric +``` +limits: + promote_resource_attributes: +... +distributor: + otlp: + convert_all_attributes: + disable_target_info: + allow_delta_temporality: + enable_type_and_unit_labels: +``` + +### Ingest `target_info` metric By default, 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: disable_target_info: false ``` +### Ingest delta temporality OTLP metrics + +OpenTelemetry supports two temporalities, [Delta and Cumulative](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#temporality). +By default, only the cumulative metrics can be ingested via OTLP endpoint in Cortex. +To enable the ingestion of OTLP metrics with delta temporality, set the `distributor.otlp.allow-delta-temporality` flag to `true`. + +### Enable `__type__` and `__unit__` label + +The `__type__` and `__unit__` labels are added to OTLP metrics if `distributor.otlp.enable-type-and-unit-labels` is set to `true`. +This flag is disabled by default. + ### Configure promote resource attributes per tenants The `promote_resource_attributes` is a [runtime config](./overrides-exporter.md) so you can configure it per tenant.