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 tracer.NewChildSpanFromContext #66

Merged
merged 3 commits into from
May 12, 2017
Merged

Add tracer.NewChildSpanFromContext #66

merged 3 commits into from
May 12, 2017

Conversation

elijahandrews
Copy link
Contributor

@elijahandrews elijahandrews commented May 12, 2017

This PR addresses #65

I've created tracer.Span, which is allows us to replace:

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

with:

span, ctx := tracer.NewChildSpanWithContext("name", ctx)

@elijahandrews
Copy link
Contributor Author

Hm, from the build:

tracer/example_context_test.go:18: too many arguments to conversion to tracer.Span: tracer.Span("filestore.saveFile", ctx)

Looks like the function is colliding with the Span type. What should we do about that? Do we need to hack something with DefaultTracer to get this working?

@elijahandrews elijahandrews changed the title Add tracer.Span Add tracer.NewChildSpanFromContext May 12, 2017
@clutchski
Copy link
Contributor

+1

@clutchski clutchski merged commit d42fcc5 into master May 12, 2017
@palazzem palazzem deleted the elijah/span-ctx branch May 15, 2017 07:27
@ufoot ufoot added this to the 0.5.0 milestone Jun 19, 2017
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.

3 participants