Hi guys!
# spicedb
t
Hi guys! Is there a way I can propagate a traceId into the requests and have them appear inside the logs?
y
not currently, no. is there something that you're trying to assess that normal traces don't provide for?
t
I would like to correlate logs of the same traceId, so I can query logs from my service + logs from spicedb for a given traceId
y
yeah. what particular thing are you trying to diagnose? i ask because spicedb doesn't actually provide that much useful context in logs (something that we're aware of and would like to improve)
or is it more just to have that correlation available to you?
t
No particular thing. Just to better debug my application requests when needed
Just to make sure, if I enable the otel flag, will it correlate the traces with my application traces as well?
j
yes
or more accurately, the OTEL traces contain the trace ID for the request
t
Thanks! I'll try it out! What are the otel env variable names?
My exporter endpoint should be on OTEL_EXPORTER_OTLP_ENDPOINT?
y
sec, i think i have an example somewhere
Copy code
{ "name" : "SPICEDB_OTEL_PROVIDER", "value" : "otlpgrpc" },
    { "name" : "OTEL_EXPORTER_OTLP_ENDPOINT", "value" : "http://localhost:4317" },
that should be enough to get you off the ground
and yeah you use
OTEL_
flags for otel configuration and
SPICEDB_
flags for spicedb configuration
t
Awesome! Thanks!