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

Exposing tracer property on spans #5

Closed
hekike opened this issue May 23, 2019 · 3 comments
Closed

Exposing tracer property on spans #5

hekike opened this issue May 23, 2019 · 3 comments
Labels
up-for-grabs Good for taking. Extra help will be provided by maintainers

Comments

@hekike
Copy link
Member

hekike commented May 23, 2019

Span has a private tracer property, NoRecordSpan doesn't. I'd prefer to make tracer always available on Span like in OpenTracing. Coming from OpenTracing, I found it challenging not having tracer available on spans, especially that first I assumed it is and started to use it, then my code broke one NoRecordSpan(s).

@SergeyKanzhelev
Copy link
Member

What do you need a tracer for? Is it because multiple apps can be hosted in a single process and you need app-specific tracer? Or because of this: census-instrumentation/opencensus-specs#249 - ability to restore the scope without holding on to scope object?

@hekike
Copy link
Member Author

hekike commented May 24, 2019

None of them. We prefer manual instrumentation without CLS overhead and it’s easier to start a child span if we don’t need to pass both tracer and root span around. Alternative could be:
span.startChildSpan().startChildSpan()...

@mayurkale22
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
up-for-grabs Good for taking. Extra help will be provided by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants