spicedb
spicedb copied to clipboard
Missing spans from trace for v1.PermissionsService/LookupResources
What platforms are affected?
linux
What architectures are affected?
amd64
What SpiceDB version are you using?
v1.27.0
Steps to Reproduce
- Make an authzed.api.v1.PermissionsService/LookupResources request
- Collect the traces from spicedb
Expected Result
All or most of the excution time should be accounted for, and should include the fan out via dispatch.
Actual Result
Approximately ~90% of the total execution time seems to be be missing
@wthornton1 can you specify which datastore are you using?
Currently using postgres 15.3 - I can edit the issue description if you want
@wthornton1 I've kind of reproduced this locally. It's the time spent streaming the various items back to the client. This is tricky to trace because it can generate a ton of traces (I tested it and my LookupResource call is filled with thousands of elements), and I'm not sure that's useful.
Is there anyway to put some kind of overarching parent trace? ie. collecting responses or something of ths sort
@wthornton1 I didn't spend a lot of time into it but I couldn't figure out a way to aggregate this in a visually-compelling way. Different parts of the reachability graph are evaluated concurrently and the whole pipeline works async, so responses are published as they become available. It always led to a completely unusable trace with lots of small pieces. I'm going to summon @josephschorr with the hope he can suggest an approach to make those traces more usable.
I've tried doing so myself, and run into the exact same problem
Edit: We either go super specific with lots of small pieces or we leave it very high level
Thank you both - having confirmation about what that blank time is is helpful.
We recently found that OTel client-side streaming interceptors weren't being installed, which meant that in an actual SpiceDB cluster spans from LookupResources traces wouldn't show up.
This has been fixed in https://github.com/authzed/spicedb/pull/1836, which instruments OTel using the new gRPC stats API for this.
fantastic, thanks!
Happily, spicedb has been rock solid for us since November. python gRPC, not so much.