Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs feedback: Clarify stage.structured_metadata behavior #1810

Open
marshallford opened this issue Oct 2, 2024 · 0 comments
Open

Docs feedback: Clarify stage.structured_metadata behavior #1810

marshallford opened this issue Oct 2, 2024 · 0 comments
Labels
type/docs Docs Squad label across all Grafana Labs repos

Comments

@marshallford
Copy link

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 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 := range foundLabels {
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.

@marshallford marshallford added the type/docs Docs Squad label across all Grafana Labs repos label Oct 2, 2024
@marshallford marshallford changed the title Docs feedback: Clarify stage.structured_metadata extraction behavior Docs feedback: Clarify stage.structured_metadata behavior Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

No branches or pull requests

1 participant