-
Notifications
You must be signed in to change notification settings - Fork 39
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
BraveScopeManager.active() and opentracing-jaxrs #82
Comments
please file a bug to the jaxrs code. not only is that style of inteception
problematic (why brave moved to servlet filter + decoration for jax-rs),
but it is also unnecessary to use implicits to close a scope. using an
attribute is more reliable.
|
Here's the last code we used to ensure you don't have to use implicits
to close a scope
openzipkin/brave@9d98d56#diff-27b317da912256b195ad886eac72f9f1L72
and here's why we removed that code in general
https://github.com/openzipkin/brave/tree/master/instrumentation/jaxrs2#why-dont-we-use-containerresponsefilter
|
Agree that it's safer to pass the span around in attribute. Actually the scope in this case. Is there any reason why |
This is also related to opentracing/opentracing-java#267 and |
the opentracing api is both wrong and underspecified.
refer to reactive streams for an example of a properly specified api. it
should be a bug to close a scope from an alternate thread. the api is wrong
as it encourages doing this.
|
while still thrashing there seems to be some hope that the api will be corrected opentracing/opentracing-java#267 (comment) |
Hi guys, I'd like to add to this issue both to try to understand an issue I'm facing, and to figure out a proper fix for that. Do you have suggestions on that? Can I achieve the same result without overriding their interceptor, or perhaps there's a better way to handle that? Thanks. |
file a bug on their side. opentracing isn't a real spec
… |
sadly it looks like 0.32 still exposes (hence implies tracking of) the current scope instance opentracing/opentracing-java#267 |
opentracing 0.33 removes this method |
Hi there,
We're having some issues with closing Scopes / Spans with opentracing-jaxrs. This is related to opentracing-contrib/java-jaxrs#87 and I'm hoping to get your input on the issue with respect to BrowserScopeManager / BrowserScopeManager.active()
At a high level (more details in referenced issue) the JAXRS filter tries to close the current scope at the end of the request and it grabs the current scope from the BraveTracer's BraveScopeManager here.
It then attempts to close the scope however the Scope returned from the BraveScopeManager has a noop close method. This results in the scope not being closed and being used across requests.
Is this the expected behavior of active() (seems to be given the comment on the method)? If so what is the best way to get the active scope and close it in this context?
The text was updated successfully, but these errors were encountered: