-
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
Frontend protobuf
encoding breaks X-Loki-Response-Encoding-Flags: categorize-labels
header
#14053
Comments
@salvacorts I know you worked on the header, and @jeschkies and @cstyan I think you two added the encoding flag. Any ideas on this one? |
From my investigation the response looked fine in the querier and was then corrupted in the frontend, which made me guess to toggle the encoding flag. |
I am reopening this because we haven't actually fixed the problem. We still don't know why the upgrade to grpc-go v1.66.0 causes this issue, and we can't block upgrading that dependency indefinitely... |
This was resolved by #14216 |
Describe the bug
A request to
/loki/api/v1/query_range
with the headerX-Loki-Response-Encoding-Flags: categorize-labels
has broken behavior whenfrontend.encoding
is set toprotobuf
.There are also reports of this being broken when using the default
json
encoding, though I was not able to reproduce that locally using4f962ef7af250fc347dbed15583787d0238f6e9f
.To Reproduce
Steps to reproduce the behavior:
main
@4f962ef7af250fc347dbed15583787d0238f6e9f
) using the config in./cmd/loki/loki-local-config.yaml
yarn generate-logs
{cluster="eu-west-1", namespace="tempo-dev", service_name="tempo-distributor", level="warn"}
, results are normal.{cluster="eu-west-1", namespace="tempo-dev", service_name="tempo-distributor", level="warn"}
withX-Loki-Response-Encoding-Flags: categorize-labels
, and there appears to be weird binary strings in thestructuredMetadata
of the categorized response, for example./cmd/loki/loki-local-config.yaml
to remove the configfrontend.encoding = protobuf
and restart Loki. This will cause the default JSON encoding to be used{cluster="eu-west-1", namespace="tempo-dev", service_name="tempo-distributor", level="warn"}
, results are normal.{cluster="eu-west-1", namespace="tempo-dev", service_name="tempo-distributor", level="warn"}
withX-Loki-Response-Encoding-Flags: categorize-labels
, results are normal, with labels correctly categorizedExpected behavior
I would expect the results to be the same when providing the
X-Loki-Repsonse-Encoding-Flags
using eitherprotobuf
orjson
encoding.Environment:
running locally, thought it has been reported on multiple cloud deployments as well
Screenshots, Promtail config, or terminal output
If applicable, add any output to help explain your problem.
The text was updated successfully, but these errors were encountered: