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

Add /query trace spans and update SDK #58

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Conversation

codedmart
Copy link
Collaborator

@codedmart codedmart commented Apr 26, 2024

Describe your changes

Add tracing spans and update to the latest SDK

Issue ticket number and link

MDB-131

@codedmart codedmart requested a review from hallettj April 26, 2024 23:06
@codedmart codedmart changed the title Add tracing spans and update SDK Add /query trace spans and update SDK Apr 26, 2024
Copy link
Collaborator

@hallettj hallettj left a comment

Choose a reason for hiding this comment

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

Looks good!

})
})
}
.instrument(tracing::info_span!("/query", internal.visibility = "user"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this instrumentation applies to the effectively the entire function, I think another way to do this would be to modify the #[instrument] annotation on the function. Currently it's configured to only emit traces on errors, but it can be configured to do other things. One thing to watch out for is that using #[instrument] on a function captures argument values unless you opt out - the skip_all option excludes all arguments from the trace.

But this way works just as well.

@codedmart codedmart merged commit ea3cba7 into main Apr 27, 2024
1 check passed
@codedmart codedmart deleted the codedmart/trace-spans branch April 27, 2024 00:48
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.

None yet

2 participants