-
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
feat: Introduce special header that tells Loki not to modify query results #12327
Conversation
pkg/loki/modules.go
Outdated
@@ -404,7 +404,7 @@ func (t *Loki) initQuerier() (services.Service, error) { | |||
toMerge := []middleware.Interface{ | |||
httpreq.ExtractQueryMetricsMiddleware(), | |||
httpreq.ExtractQueryTagsMiddleware(), | |||
httpreq.PropagateHeadersMiddleware(httpreq.LokiEncodingFlagsHeader), | |||
httpreq.PropagateHeadersMiddleware(httpreq.LokiEncodingFlagsHeader, httpreq.LokiOriginalQueryResultsHeader), |
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 think the querier change here only handles requests directly made to queriers http endpoint.
for requests that pass through schedulers, i believe we are encoding these headers within the request itself.
for protobuf encoding and json encoding
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.
ty, good catch
Hello @MasslessParticle!
Please, if the current pull request addresses a bug fix, label it with the |
This PR must be merged before a backport PR will be created. |
This PR introduces the new
LokiOriginalResults
header and ensures it's propagated to any component that could modify query results.