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

Return context when creating a span #65

Closed
elijahandrews opened this issue May 11, 2017 · 1 comment
Closed

Return context when creating a span #65

elijahandrews opened this issue May 11, 2017 · 1 comment

Comments

@elijahandrews
Copy link
Contributor

elijahandrews commented May 11, 2017

I often find myself writing:

span := tracer.NewChildSpanFromContext("name", ctx)
ctx = span.Context(ctx)

I would love a version of tracer.NewChildSpanFromContext that also returns a context with the created span:

span, ctx := tracer.Span("name", ctx) // name tbd
@elijahandrews
Copy link
Contributor Author

Fixed via #66

jdgordon pushed a commit to jdgordon/dd-trace-go that referenced this issue May 31, 2022
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

No branches or pull requests

1 participant