-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add metadata to push payload #9694
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
b799556
Add metadata to push payload
salvacorts b0810c8
Add metadata to tests
salvacorts b7ae131
update vendor push pkg
salvacorts 9bec73a
WIP fix tests
salvacorts d876c21
Fix more tests
salvacorts 9c6fdef
Revent some unwanted changes
salvacorts b4ed160
Remove more unwanted changes
salvacorts 8c6f22e
Update vendor files
salvacorts c854d06
use json format for metadata labels in v1 push api
sandeepsukhani 95ba8a2
rename metadataLabels to labels
sandeepsukhani 7db3e54
Merge branch 'main' into salvacorts/metadata-push-payload
sandeepsukhani ea8f3f6
lint and some test fixes
sandeepsukhani 73cf5dc
lint
sandeepsukhani 7b77c69
lint lint lin...
sandeepsukhani 44b0932
use map object instead of string representation for log labels in jso…
sandeepsukhani 617e864
revert some accidental chagnes
sandeepsukhani f43dfab
Make labels in loghttp.Entry of type LabelSet
salvacorts 384d556
Apply CR feedback
salvacorts 4088112
Avoid allocations for empty labels
salvacorts 0b0af55
Fix json encoding and add tests
salvacorts d4e311c
Change error message
salvacorts 10d404e
Add more labels to tests cases
salvacorts fcd1e66
Fix encode and add more tests
salvacorts 64d3d6c
Do not use struct
salvacorts 96c804d
Merge branch 'main' into salvacorts/metadata-push-payload
sandeepsukhani 7f25bb8
remove a TODO
sandeepsukhani 752ae6b
rename to NonIndexedLabels
salvacorts 4b67145
Add missing protos updates
salvacorts aa58916
Update vendor
salvacorts 4c60a9e
Update after mod vendor
salvacorts 4028758
Use slice of labels for json and proto structures
salvacorts 8c76150
Fix format
salvacorts fb505b4
Move LabelsAdapter to push pkg
salvacorts ccaf192
Use same prometheus version in push pkg
salvacorts fb42e9c
Merge branch 'main' into salvacorts/metadata-push-payload
salvacorts eaf235c
Update vendor/github.com/grafana/loki/pkg/push/types.go
salvacorts 7438809
Fix tests
salvacorts f6e6918
Don't use yolostring when deserializing push request
salvacorts f8c33aa
Remove yolostring
salvacorts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Previously this stored a pointer, now it stores a struct. Not sure we want this (would need to be tested independently for performance)
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.
This comes from this PR:
#1145
The only reason why I think this is a pointer is so we don't make a copy of the stream when calling NewStream which receives a ptr to
loghttp.Stream
https://github.com/grafana/loki/pull/1145/files#diff-71619e1c80a73b34eade235a55d012a0ddbb3375b8d4ac89c1f4fd672145b915R34
With Sandeep's changes, we no longer use that since now we decode from json to
loghttp.PushRequest
to then cast it tologproto.PushRequest
loki/pkg/util/unmarshal/unmarshal.go
Line 22 in 44b0932
So having that as a ptr or not shouldn't make much difference.