-
Notifications
You must be signed in to change notification settings - Fork 4
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
Propagate tenant ID #10
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.
Looks good to me! Hopefully Jacob can cast a more experienced eye over things.
I'm interested in how we implement the order verification of message entries. Would simply storing the previous message timestamp and doing a comparison on each receive be enough?
func NewJSONSerializer() *JSONSerializer { | ||
return &JSONSerializer{} | ||
type Sample struct { | ||
Value model.SamplePair `json:"value"` |
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.
Would using Sample
instead of Value
as the struct field prevent the stuttering in "value": s.Value.Value.String(),
?
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.
I get your point, but I think I probably would prefer to use the same name here that is used in the JSON annotation field how it defined upstream:
https://github.com/prometheus/common/blob/217fd62d44a79db8f842113234ae9383b8374983/model/value.go#L115
https://github.com/prometheus/common/blob/217fd62d44a79db8f842113234ae9383b8374983/model/value.go#L144
This add support for optional tenant IDs. It can recognize them both from the Basic Auth and the X-Scope-OrgID headers. The propagation is supported in all serialization formats using an optional fields.
8c99b37
to
5dccb4e
Compare
5dccb4e
to
415a686
Compare
Download modules through `go mod download` first.
3ed3b9d
to
0888f23
Compare
This add support for optional tenant IDs. It can recognize them both from the Basic Auth and the X-Scope-OrgID headers. The propagation is supported in all serialization formats using an optional fields. (This fixes #4 in most parts).
I have written some integration tests, which require a pulsar endpoint to target. I will investigate how we can run that as part of CI
@jtlisi if you get the chance, take a look happy to get some review esp. for the non integration test part of it.