Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

Datadog distributed tracing

This is for ddtrace v1.1

See also Distributed tracing docs

  • Might need to use continue tracing when spawning threads or other weird scenarios like continuing tracing for background job processing.
  • Need to use a TraceDigest object which is a wrapper for trace properties. If needed this can easily be serialized as JSON and later parsed to re-instantiate a TraceDigest object. Example…
# Cache the trace digest as JSON string
current_trace = Datadog::Tracing.active_trace
trace_digest_json = current_trace&.to_digest&.to_json

# Later re-instantiate a TraceDigest with parsed digest properties and continue trace
if trace_digest_json
  trace_digest =**JSON.parse(trace_digest_json).symbolize_keys)

  Datadog::Tracing.trace('foo', resource: 'bar', continue_from: trace_digest) do
    # do stuff

Search Results