You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the trace code is borrowed from here. Note: the code there uses context lookups to find the associated span, which has a performance penalty. This code uses a closure so callers don't need to keep track of the span.
It's probably worth discussing how we want to name our traces, too, because they'll become part of the public API in effect. As a result, I've not used concrete type names for internal tracing, just so we can move the internals around without issue in the future.
Are these exported all the time? What if someone wants to export somewhere specific (aka not Cloud Logging)?
The tracing is enabled only if a client has used OpenCensus to register an exporter. With no exporter registered, these traces become no-ops. Also, the client can choose their exporter as the tracing here is agnostic.
Are these exported all the time? What if someone wants to export somewhere specific (aka not Cloud Logging)?
The tracing is enabled only if a client has used OpenCensus to register an exporter. With no exporter registered, these traces become no-ops. Also, the client can choose their exporter as the tracing here is agnostic.
Let's include instructions in the README for this.
kurtisvg
changed the title
feat: add tracing for Dial and Refresh with child spans
feat: add initial support for tracing
Jul 28, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is what the Dial trace looks like:
This is what the Refresh trace looks like:
Some of the trace code is borrowed from here. Note: the code there uses context lookups to find the associated span, which has a performance penalty. This code uses a closure so callers don't need to keep track of the span.
Related to #15.
It's probably worth discussing how we want to name our traces, too, because they'll become part of the public API in effect. As a result, I've not used concrete type names for internal tracing, just so we can move the internals around without issue in the future.