You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see your overall intent seems to be to connect spans to logs, we do have an integration for logrus already that may simplify that case here: https://github.com/DataDog/dd-trace-go/tree/main/contrib/sirupsen/logrus (or you can look at the source code for some inspiration on how to do something similar for zap. (And if you do and are interested in contributing it to this repository we're open to contributions! 😄 )
As for connecting the log entry to a span you should only need the trace_id and span_id.
How do one get hold of
service
,env
,trace id
andspan id
from the current span?tracer.span
implementsfmt.Formatter
which builds a string of the mentioned fields, but I need to get hold of a map, or struct containing the fields.The end goal is to pass the fields to our (zap or logrus) logger, i.e
The text was updated successfully, but these errors were encountered: