-
Notifications
You must be signed in to change notification settings - Fork 327
Create a Go execution tracer task for each span #715
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible to have a test and/or example of how to use this?
trace/trace.go
Outdated
@@ -259,6 +266,7 @@ func (s *Span) End() { | |||
return | |||
} | |||
s.exportOnce.Do(func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we rename this Once
now that it covers strictly more than just exporting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it to endOnce.
This allows us to associate OpenCensus spans with execution tracer tasks and allow users to have fine-grained details about the runtime events happened in the lifetime of a distributed tracing span.
I will write a blog post to give an example. The runtime/trace APIs are still not finalized, so we shouldn't create too much documentation at this point. |
) | ||
|
||
func startExecutionTracerSpan(ctx context.Context, name string) (context.Context, func()) { | ||
return t.NewContext(ctx, name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer builds as of https://golang.org/cl/112198.
(CC: @hyangah @pjweinbgo)
This allows us to associate OpenCensus spans with execution
tracer tasks and allow users to have fine-grained details
about the runtime events happened in the lifetime of a
distributed tracing span.