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
offer TracedContext(ctx context.Context) bool func #5348
Labels
Comments
There is some benchmark result about trace func:
But if we using this method to infer traceable:
|
You're looking for trace.SpanFromContext. if trace.SpanFromContext(ctx).IsRecording() {
// Parent span is recording
// Which does not mean a newly created one will be recording too. Sampling decisions could be made differently.
} |
Closing as this appears to answer this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have tried some way to infer if we should trace the request before using tracer.Start method.
But currentSpanKey is not exposed. How about expose func to do this?
The text was updated successfully, but these errors were encountered: