Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Create a Go execution tracer task for each span #715

Merged
merged 1 commit into from
Apr 18, 2018

Conversation

rakyll
Copy link
Contributor

@rakyll rakyll commented Apr 18, 2018

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.

Copy link
Contributor

@semistrict semistrict left a 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() {
Copy link
Contributor

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?

Copy link
Contributor Author

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.
@rakyll
Copy link
Contributor Author

rakyll commented Apr 18, 2018

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.

@rakyll rakyll merged commit 3edd780 into census-instrumentation:master Apr 18, 2018
@rakyll rakyll deleted the exec-tracer branch April 18, 2018 20:52
)

func startExecutionTracerSpan(ctx context.Context, name string) (context.Context, func()) {
return t.NewContext(ctx, name)
Copy link

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants