-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: catch, discard & warn about the labels that have reserved names #3162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It requires minimizing the allocation because we invoke this code with high frequency.
6fc9674
to
66372db
Compare
Codecov Report
@@ Coverage Diff @@
## master #3162 +/- ##
==========================================
+ Coverage 72.78% 72.84% +0.05%
==========================================
Files 255 255
Lines 19585 19611 +26
==========================================
+ Hits 14255 14285 +30
+ Misses 4433 4430 -3
+ Partials 897 896 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🙇 Just a minor on the warn message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just caught only now. We can just use a slice storing the tags' keys during the detection process. A TagSet shouldn't include multiple tags with the same key.
69cf43a
to
12e95f6
Compare
a786d21
to
5941821
Compare
Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
5941821
to
327ab5a
Compare
@esquonk, adding you also as the reviewer, probably the most interesting part for you is https://github.com/grafana/k6/pull/3162/files#diff-2edc8a9a0a0d4ec2a88767baae9d8ad5c035168eeee41b7b5c8b36ce31d9ce70R42-R49 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏🏻 🙇🏻
What?
Cloud Output V2 drops labels that are reserved, for now, we're sticking with the
test_run_id
and Prometheus system metrics (everything that prefixed with__
)Why?
These tags are reserved for internal use and can't be set with the client.
Checklist
make ci-like-lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)
Closes #3155