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

Promtail: Add pack stage #3401

Merged
merged 13 commits into from
Mar 1, 2021
Merged

Promtail: Add pack stage #3401

merged 13 commits into from
Mar 1, 2021

Conversation

slim-bean
Copy link
Collaborator

Wrap stage lets you wrap a log line in a JSON object which can then embed labels and/or extracted values from the Promtail pipeline.

Useful for reducing label cardinality while still keeping the labels or extracted values in the log line itself.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slim-bean slim-bean changed the title Promtail: Add wrap stage Promtail: Add ~wrap~ pack stage Mar 1, 2021
@slim-bean slim-bean changed the title Promtail: Add ~wrap~ pack stage Promtail: Add pack stage Mar 1, 2021
@slim-bean slim-bean merged commit e57af51 into master Mar 1, 2021
@slim-bean slim-bean deleted the wrap-stage branch March 1, 2021 20:47
cyriltovena added a commit to cyriltovena/loki that referenced this pull request Mar 2, 2021
To go with the new pack stage in promtail grafana#3401 this PR introduces a unpack parser
that will automatically unpack all labels packed into the log line and set back the original log line.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@cyriltovena cyriltovena mentioned this pull request Mar 2, 2021
2 tasks
slim-bean added a commit that referenced this pull request Mar 3, 2021
* Introduce a unpack parser.

To go with the new pack stage in promtail #3401 this PR introduces a unpack parser
that will automatically unpack all labels packed into the log line and set back the original log line.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>

* Add documentation.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>

* tweak promtail docs a little now that we have unpack in Loki

Co-authored-by: Edward Welch <edward.welch@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants