Description
Is your feature request related to a problem? Please describe.
Context: As discussed with @sandeepsukhani and many others, we want to simplify Loki's OpenTelemetry ingestion path and move away from the otel2loki converters available through the OpenTelemetry Collector Loki Exporter and the Alloy otelcol.exporter.loki
in favor of the newly introduced Loki OTLP Endpoint.
However, we have identified the limitation to specify OTel resource attributes that should be promoted as Loki labels:
- If self managed Loki supports overwriting the default list of resource attributes that are promoted as labels through
distributor: otlp_config / default_resource_attributes_as_index_labels
(docs here), Grafana Cloud Logs and the Grafana Cloud OTLP Endpoint does provide such a stack wide config option. - The Loki OTLP Endpoint doesn't offer mechanisms for the logs ingestion pipeline to specify additional resource attributes to promote as labels similar to the
loki.resource.labels
attributes that was available when using the OpenTelemetry Collector Loki Exporter
Describe the solution you'd like
I would like
- A global configuration parameter in Grafana Cloud equivalent to
distributor: otlp_config / default_resource_attributes_as_index_labels
(docs here) to overwrite the default list of resource attributes that are promoted as labels. - A mechanism for the OTLP ingestion pipeline to specify additional resource attributes to promote as labels. This mechanism could be slightly different from OpenTelemetry Collector Loki Exporter
loki.resource.labels
mechanism as the desired solution would not be about overwriting the global list of resource attributes promoted as labels (seedefault_resource_attributes_as_index_labels
) but to extend it.
Describe alternatives you've considered
Continue to do the otel2loki conversion through the OpenTelemetry Collector Loki Exporter and Alloy otelcol.exporter.loki
but it's more burden put on the Loki users and none of these converters leverage Loki V3 metadata.
Additional context
Similar to the problem Grafana Labs Community - Add additional index labels in Loki 3.0 via OTLP