You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bit of a nitpick, but the phrase "add them to log entries as structured metadata" does not make it obvious that the stage.structured_metadata block in the loki.process component will remove labels. It is almost as if the current behavior could be better described as a "conversion" from labels to structured metadata rather than a "copy" or "add". In fact, it wasn't until I cracked open the source and found this code comment and snippet that I actually understood the goal of the block/stage:
// Remove found labels, do this after append to structure metadata
for_, fl:=rangefoundLabels {
delete(labels, fl)
}
e.Labels=labels
On a related note, a feature request: Could this behavior be configurable? Effectively allow for structured metadata values based on labels, but retain the original values/labels. I can open a seperate GH issue if required.
The text was updated successfully, but these errors were encountered:
URL
https://grafana.com/docs/alloy/latest/reference/components/loki/loki.process/#stagestructured_metadata-block
Feedback
Hello,
A bit of a nitpick, but the phrase "add them to log entries as structured metadata" does not make it obvious that the
stage.structured_metadata
block in theloki.process
component will remove labels. It is almost as if the current behavior could be better described as a "conversion" from labels to structured metadata rather than a "copy" or "add". In fact, it wasn't until I cracked open the source and found this code comment and snippet that I actually understood the goal of the block/stage:alloy/internal/component/loki/process/stages/structured_metadata.go
Lines 56 to 60 in 67409b5
On a related note, a feature request: Could this behavior be configurable? Effectively allow for structured metadata values based on labels, but retain the original values/labels. I can open a seperate GH issue if required.
The text was updated successfully, but these errors were encountered: