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

Google output resource to labels #425

Merged
merged 2 commits into from
Sep 16, 2021
Merged

Conversation

jsirianni
Copy link
Member

Description of Changes

Google Output operator relies on managed resources, which have a static set of resources and resources.labels. This causes any Stanza entry.Resources to be wiped out.

I have not found a way to use managed resources and preserve stanza's resources, so my solution involves moving stanza's resources to the cloud logging labels.

This works by checking to see if the label already exists, adding it if not. A warning is logged if a label already exists with a different value, to protect against data loss. I think this would be a rare situation.

Before
Screen Shot 2021-09-15 at 2 49 33 PM

After
Screen Shot 2021-09-15 at 2 57 36 PM

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Add a changelog entry (for non-trivial bug fixes / features)
  • CI passes

@codecov
Copy link

codecov bot commented Sep 15, 2021

Codecov Report

Merging #425 (1711afd) into master (30f6818) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #425      +/-   ##
==========================================
- Coverage   72.71%   72.65%   -0.05%     
==========================================
  Files         124      124              
  Lines        8152     8158       +6     
==========================================
  Hits         5927     5927              
- Misses       1716     1721       +5     
- Partials      509      510       +1     
Impacted Files Coverage Δ
...perator/builtin/output/googlecloud/google_cloud.go 57.64% <0.00%> (-1.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30f6818...1711afd. Read the comment docs.

@jsirianni jsirianni merged commit f07878d into master Sep 16, 2021
@jsirianni jsirianni deleted the google-output-resource-to-labels branch September 16, 2021 18:17
@jsirianni jsirianni mentioned this pull request Sep 21, 2021
4 tasks
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.

2 participants