opentracing / opentracing-java

OpenTracing API for Java. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io
Apache License 2.0
1.68k stars 344 forks source link

Initial implementation of a no-op active Span. #320

Closed carlosalberto closed 5 years ago

carlosalberto commented 5 years ago

Hey all,

I decided to test out, as a prototype, a no-op active Scope/Span for the current api. This had been suggested (or at least mentioned) in the past. And it could probably help with features such as #319

Advantages:

Potential issues:

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 ;)

sjoerdtalsma commented 5 years ago

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 Optional result from the active.. methods. To me, it is much clearer about what is happening.

sjoerdtalsma commented 5 years ago

Accidentally closed this pull request, sorry!

carlosalberto commented 5 years ago

Hey @sjoerdtalsma

Is it a scope? Is it an empty scope? If so, would that be a better name? What is no-op scope precisely?

I'd say it's both an empty scope and an empty span, that basically do nothing. We could probably change the name?

The Optional is another possibility to consider, but we don't support Java 8 yet ;)

carlosalberto commented 5 years ago

Oh, btw, this is related ;) https://github.com/opentracing/specification/issues/116

carlosalberto commented 5 years ago

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 ;)