grafana / tempo

Grafana Tempo is a high volume, minimal dependency distributed tracing backend.
https://grafana.com/oss/tempo/
GNU Affero General Public License v3.0
3.93k stars 509 forks source link

Tempo flipping boolean attributes from spans and storing wrong value #2343

Closed lucasoares closed 1 year ago

lucasoares commented 1 year ago

Describe the bug I have an application sending trace data to Tempo and I notice few spans showing a wrong attribute value in Tempo's traces panel. It was randomly showing true for few attributes that I was sure the application exported as false.

To debug it I setup an otel-collector with a logging exporter and otlp exporter to redirect trace data to tempo's distributor. For a specific span in the otel-collector perspective (logging exporter) the attribute is false, but Tempo shows it as true.

This is hapenning very often and I have many spans with incorrect boolean attributes. The problem is not only in the rendering since querying a TraceQL also brings inconsistent results.

Example:

image

This is not hapenning only for this has_passkey attribute, I saw it hapenning with other boolean attributes I have.

To Reproduce

I honestly don't know how to reproduce it because it is really random. Sometimes it is correct, sometimes it is not.

I also only looked for some boolean attributes I have, I didn't look for non-boolean attributes and now I'm really afraid of the consistency of the Tempo's data in general.

Expected behavior

Attributes should be consistent.

Environment:

Additional Context

Slack thread we talked about this issue: https://grafana.slack.com/archives/C01D981PEE5/p1681506001786699

We are using Tempo's parquet and GCS as backend for storage.

joe-elliott commented 1 year ago

Thank you for this issue. I have now been able to reproduce it using the otel-cli. It only seems to occur if you have multiple booleans in the same span some of which are true and some of which are false.

This does not repro the issue:

otel-cli exec --service my-service --name "curl google" curl https://google.com --attrs b=false,c=false,d=false,e=false

This does:

otel-cli exec --service my-service --name "curl google" curl https://google.com --attrs b=false,c=false,d=true,e=false

I have seen attributes b, c and e occassionally be set to true. I will continue to dig on this.

joe-elliott commented 1 year ago

This is an issue with our parquet-go library. We are actively working on it: https://github.com/segmentio/parquet-go/issues/501

joe-elliott commented 1 year ago

We have filed a fix based on my understanding of the issue:

https://github.com/segmentio/parquet-go/pull/503

Let's see what the maintainers say.