Skip to content

[Grafana Cloud OTLP Endpoint] Support specifying OTel Resource Attributes promoted as Loki labels #13044

Open

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:

  1. 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.
  2. 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 (see default_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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions