[Tempo-traceToLogs] allow mapping of attributes to Loki labels #41392
Replies: 5 comments 1 reply
-
@grafana/observability-squad this sounds like a reasonable feature request. |
Beta Was this translation helpful? Give feedback.
-
@grafana/loki-team is there a reason why Loki doesn't support dots in label names? Is it possible to change it? |
Beta Was this translation helpful? Give feedback.
-
@secustor I think it's a good idea. We're actually exploring the idea of more generic label mappings across different data sources. For example, apart from Loki and Tempo there could be a Prometheus instance with labels having the same meaning but being named differently than Loki and Tempo. And we'd like to make it easy to configure such relations to make it possible to make use of them in other features (like query imports when switching data sources in Explore). Definitely something that is currently on our radar! |
Beta Was this translation helpful? Give feedback.
-
This is actually pretty high on my to do list as it's been brought up several times before in issues/Slack. Currently out on paternity leave for another week, but I'm hoping to get to this soon. |
Beta Was this translation helpful? Give feedback.
-
Hey, this was implemented in this PR a few months ago: af2d19b Just ran across this discussion and wanted to close it out |
Beta Was this translation helpful? Give feedback.
-
At the moment the name of the attribute has to exactly the same as the label ingested into Loki.
This results in problems if using the semantic conventions introduced with OpenTelemetry which contain dots, e.g. (
k8s.namespace.name
). This problems surface as Loki does not support dots in its label keys.My proposed change is to replace the string array of tags with key value pairs. This would allow to map any trace attribute to a label.
This example would map
k8s.namespace.name
, if it is found, to the Log labelnamespace
.Beta Was this translation helpful? Give feedback.
All reactions