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: initialize extracted map with initial labels #1122

Merged

Conversation

pracucci
Copy link
Contributor

@pracucci pracucci commented Oct 5, 2019

What this PR does / why we need it:

Initial labels (populated before the pipeline stages run) are unaccessible from the pipeline stages, thus it's not possible to operate on them (ie. filename initial label). The idea proposed in this PR is to initially populate the extracted map with the initial labels.

Which issue(s) this PR fixes:
Fixes #775

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

@adityacs
Copy link
Collaborator

adityacs commented Oct 7, 2019

@pracucci This is very nice approach. This idea didn't occur to me 😁. Thank you.
@ed @cyriltovena I am closing PR #1013.

@rfratto
Copy link
Member

rfratto commented Oct 9, 2019

LGTM with one comment: could you update the docs to note that the extracted map is pre-populated with existing labels?

@pracucci pracucci force-pushed the allow-stages-to-operate-on-initial-labels-too branch from 862957e to 9113633 Compare October 9, 2019 12:04
@pracucci
Copy link
Contributor Author

pracucci commented Oct 9, 2019

Thanks @rfratto for your feedback. May you check it again, please? Any feedback on how to clarify it is very welcome 🙏

@pracucci pracucci force-pushed the allow-stages-to-operate-on-initial-labels-too branch from 9113633 to bd63a49 Compare October 10, 2019 06:52
@pracucci pracucci requested a review from rfratto October 10, 2019 06:53
Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

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

LGTM!

@rfratto rfratto merged commit b94a436 into grafana:master Oct 10, 2019
@pracucci pracucci deleted the allow-stages-to-operate-on-initial-labels-too branch October 10, 2019 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promtail: Cant get the value of filename in relabel_configs
3 participants