Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(di): make correlation IDs optional #10442

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ddtrace/debugging/_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,18 @@ def _build_log_track_payload(
"debugger": {"snapshot": signal.snapshot},
"host": host,
"logger": _logs_track_logger_details(signal.thread, signal.frame),
"dd.trace_id": str(context.trace_id) if context else None,
"dd.span_id": str(context.span_id) if context else None,
"ddsource": "dd_debugger",
"message": signal.message,
"timestamp": int(signal.timestamp * 1e3), # milliseconds,
}

# Add the correlation IDs if available
if context is not None:
payload["dd.trace_id"] = str(context.trace_id)
payload["dd.span_id"] = str(context.span_id)

add_tags(payload)

return payload


Expand Down
Loading