question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecate or remove `ScopeManager.active()`

See original GitHub issue

ScopeManager.active is documented as a feature used to get the current span. Perhaps it is a relic from the previous design. It tempts people to call close on it eventhough ScopeManager is pretty clear that scopes should be managed directly.

I would remove this api, possibly for ScopeManager.activeSpan if that’s the intended use case to serve. Otherwise, please clarify the documentation that calls to close are undefined.

If folks are doing things like subclassing, you can deprecate the api, and they can still offer “advanced” things as they exist today as their subtype would still be able to offer that functionality regardless of it it exists on a supertype.

https://github.com/openzipkin-contrib/brave-opentracing/pull/74#issuecomment-380382654

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:38 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
carlosalbertocommented, Jul 27, 2018

Hey @adriancole

I’m not sure why there is a concept of removing active scope in favor of span… why this is somehow experimental. This was in use in brave and also census for quite a long time. Retrieving the scope is the thing that causes issues

So, if I understood correctly, you would like ScopeManager.active() to go in favor of ScopeManager.activeSpan() and keep the notion of Scope (through startActive()) otherwise? That sounds fine (by me, at least 😉 )

So the testbed notion is precisely for testing how API changes could impact different use cases. The change for active() -> activeSpan() is not that complex, so it wouldn’t require as many iterations in that regard (and I can do a PR myself for that); but if we decide to try to change the Scope notion, well, that would require more effort on that front, for good or bad 😉

Nevertheless, I can definitely help with that as needed.

1reaction
CodingFabiancommented, Jun 4, 2018

Well there is this spec proposal to give access to span id for example, so implementations need to provide a way to access the instance anyway. We currently have no problem with this API.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecated List (OpenTracing API 0.32.0 API) - Javadoc.io
Returns a newly started and activated Scope . SpanBuilder#startActive() is a shorthand for tracer.scopeManager().activate(spanBuilder.start()) . The returned ...
Read more >
Removed or deprecated platform features | Dynamics 365
This article describes features that have been removed, or that are planned for removal in platform updates of finance and operations apps.
Read more >
Chapter 1. New features and enhancements Red Hat JBoss ...
MicroProfile Metrics is being deprecated because it might be removed or updated by ... Scope = ScopeManager.active(); Scope = ScopeManager.activate (Span, ...
Read more >
I-Index (Eclipse Platform API Specification) - Eclipse Help
Deprecated, for removal: This API element is subject to removal in a future ... Interface for an action that is contributed into an...
Read more >
How and When to Deprecate APIs - Oracle Help Center
Java provides a way to express deprecation because, as a class evolves, its API (application ... new and better methods are added, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found