Initial implementation of a no-op active Span.#320
Initial implementation of a no-op active Span.#320carlosalberto wants to merge 1 commit intoopentracing:v0.32.0from
Conversation
|
Conceptually, I would have a little trouble understanding what a no-op scope is. Is it a scope? Is it an empty scope? If so, would that be a better name? What is no-op scope precisely? Ideally, I would prefer to receive an |
|
Accidentally closed this pull request, sorry! |
|
Hey @sjoerdtalsma
I'd say it's both an empty scope and an empty span, that basically do nothing. We could probably change the name? The |
|
Oh, btw, this is related ;) opentracing/specification#116 |
|
After the lack of interest, I'm closing this PR. We can definitely re-open or create a new ticket if/when this feature is needed ;) |
Hey all,
I decided to test out, as a prototype, a no-op active
Scope/Spanfor the current api. This had been suggested (or at least mentioned) in the past. And it could probably help with features such as #319Advantages:
ScopeManager.active()norScopeManager.activeSpan().Potential issues:
MockTracerwhich will check againstNoopSpanContext, and which case it will ignore it as potential parent when creating newSpans.assertEquals(NoopScope.INSTANCE, scopeManager.active())instead ofassertNull(scopeManager.active()).Thoughts?
@yurishkuro @felixbarny @tedsuo @sjoerdtalsma @tylerbenson @opentracing/opentracing-java-maintainers
PS - Did not update the testbed module. Will do that later if we decide to go on and merge this change ;)