Advice for tracing spans?

What are some good practices for using spans in tracing? To be specific:

  1. When is it appropriate to manually set the parent of a span?
  2. If I manually set the parent of a span bar to foo, do I need to enter foo before entering bar? What happens if I enter bar while inside a different span baz?
  3. What functions should and should not be instrumented?
3 Likes

Additional questions:

  • Shall I Span all the things, so that each log event looks like a mini-backtrace? Or shall I use spans sparingly, only to avoid events from parallel processes intermixing with each other?
  • Do I correctly assume that Spans only affect performance when logs are enabled and become no-op with the logging off?
  • How Span's logging level and event's own logging level interact? Do WARNs evernts attached to a DEBUG span simply lose span contexct when DEBUG logs are not enabled?
1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.