Skip to content

Make incoming labels from gcp into Loki internal labels. - #3285

Merged
cyriltovena merged 3 commits into
grafana:masterfrom
kavirajk:gcplog-labels-fix
Feb 5, 2021
Merged

Make incoming labels from gcp into Loki internal labels.#3285
cyriltovena merged 3 commits into
grafana:masterfrom
kavirajk:gcplog-labels-fix

Conversation

@kavirajk

@kavirajk kavirajk commented Feb 3, 2021

Copy link
Copy Markdown
Contributor

If these labels are significant, we can always use relabeling.

What this PR does / why we need it:
Convert incoming GCP labels into Loki internal labels by default

Which issue(s) this PR fixes:
NA

Special notes for your reviewer:
These internal labels can be made to normal labels by relabeling on demand.

Checklist

  • Documentation added
  • Tests updated

If these labels are significant, we can always use relabeling.
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Feb 5, 2021
@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #3285 (7b8c9dd) into master (d667dd2) will decrease coverage by 0.00%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3285      +/-   ##
==========================================
- Coverage   62.64%   62.64%   -0.01%     
==========================================
  Files         201      201              
  Lines       17110    17129      +19     
==========================================
+ Hits        10719    10730      +11     
- Misses       5431     5439       +8     
  Partials      960      960              
Impacted Files Coverage Δ
pkg/promtail/targets/gcplog/formatter.go 70.00% <86.66%> (+7.03%) ⬆️
pkg/promtail/targets/gcplog/target.go 69.23% <100.00%> (ø)
pkg/util/string.go 90.00% <100.00%> (+15.00%) ⬆️
pkg/promtail/targets/file/filetarget.go 64.13% <0.00%> (-2.76%) ⬇️
pkg/querier/queryrange/downstreamer.go 95.29% <0.00%> (-2.36%) ⬇️

@cyriltovena cyriltovena left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena left a comment

Copy link
Copy Markdown
Contributor

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 59a34f9 into grafana:master Feb 5, 2021
rfratto added a commit to rfratto/agent that referenced this pull request Feb 5, 2021
rfratto added a commit to rfratto/agent that referenced this pull request Feb 5, 2021
rfratto added a commit to grafana-cold-storage/agent that referenced this pull request Feb 5, 2021
cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Feb 15, 2021
* Make incoming labels from gcp into Loki internal labels.

If these labels are significant, we can always use relabeling.

* Add support for rebeling in gcptarget

* Test for SnakeCase
cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Jun 11, 2021
* fix timeout handling in GetObject for azure and gcs

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>

* wrapped readcloser which helps with cancelling the context when reader is closed

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>

* update changelog

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>

* changes suggested from PR review

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>

* changes suggested from PR review

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>

* update comments

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
@mattdurham mattdurham mentioned this pull request Sep 7, 2021
3 tasks
mattdurham pushed a commit to grafana-cold-storage/agent that referenced this pull request Nov 11, 2021
felix0102 pushed a commit to felix0102/loki that referenced this pull request Aug 2, 2026
* Make incoming labels from gcp into Loki internal labels.

If these labels are significant, we can always use relabeling.

* Add support for rebeling in gcptarget

* Test for SnakeCase
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.

3 participants