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

Support entire extracted value map in template pipeline stage #1666

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

adityacs
Copy link
Contributor

@adityacs adityacs commented Feb 10, 2020

What this PR does / why we need it:
Supports templating with multiple keys in template pipeline stage

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

Checklist

  • Documentation added
  • Tests updated

@adityacs adityacs requested a review from cyriltovena February 10, 2020 10:14
@adityacs adityacs force-pushed the 1559 branch 4 times, most recently from 202b2c1 to 6354f48 Compare February 10, 2020 12:31
@codecov-io
Copy link

codecov-io commented Feb 10, 2020

Codecov Report

Merging #1666 into master will increase coverage by 0.01%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1666      +/-   ##
==========================================
+ Coverage   62.56%   62.57%   +0.01%     
==========================================
  Files         112      112              
  Lines        8615     8607       -8     
==========================================
- Hits         5390     5386       -4     
+ Misses       2822     2818       -4     
  Partials      403      403
Impacted Files Coverage Δ
pkg/logentry/stages/template.go 68.88% <87.5%> (+6.62%) ⬆️
pkg/promtail/targets/tailer.go 75.86% <0%> (-2.3%) ⬇️
pkg/logql/evaluator.go 91.63% <0%> (-0.65%) ⬇️
pkg/ingester/transfer.go 66.42% <0%> (+1.42%) ⬆️

@adityacs adityacs force-pushed the 1559 branch 5 times, most recently from 297ab01 to b5d636b Compare February 12, 2020 10:03
@adityacs adityacs requested a review from cyriltovena February 12, 2020 10:04
@adityacs adityacs force-pushed the 1559 branch 2 times, most recently from 2b91ebf to 4bca034 Compare February 12, 2020 15:19
Refactor template stage processing.

This sets all extracted key available, plus if the source is available adds the extra key `Value` for
backward compatibility.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Aditya C S <aditya.gnu@gmail.com>
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

@cyriltovena cyriltovena merged commit 460bb5b into grafana:master Feb 14, 2020
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.

Promtail : Support entire extracted value map in template pipeline stage
3 participants