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

feat: add DD trace id to the logs #3107

Merged
merged 2 commits into from
Oct 15, 2024
Merged

feat: add DD trace id to the logs #3107

merged 2 commits into from
Oct 15, 2024

Conversation

stuartwdouglas
Copy link
Collaborator

Only works for the go runtime at the moment, as the JVM logging needs to be cleaned up to match the go format.

fixes: #3105

Only works for the go runtime at the moment, as the JVM logging needs
to be cleaned up to match the go format.
@stuartwdouglas stuartwdouglas requested review from a team and alecthomas as code owners October 14, 2024 05:36
@stuartwdouglas stuartwdouglas requested review from a team and wesbillman and removed request for a team October 14, 2024 05:36
This was referenced Oct 14, 2024
func wrapLogger(ctx context.Context, sc trace.SpanContext) context.Context {
logger := log.FromContext(ctx)
attributes := map[string]string{}
if sc.HasSpanID() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess an open question here is if we should be hard coding DD specific attributes. I don't think it matters for now, but we may need to revisit in future.

@stuartwdouglas stuartwdouglas merged commit 097415d into main Oct 15, 2024
95 checks passed
@stuartwdouglas stuartwdouglas deleted the stuartwdouglas/3105 branch October 15, 2024 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs should include span/trace IDs in JSON
2 participants