-
Notifications
You must be signed in to change notification settings - Fork 5
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
Example/test for catching Span close when using ScopeManager.Active #3
Comments
work in progress in this test : https://github.com/opentracing-contrib/csharp-decorators/blob/dev/test/OpenTracing.Contrib.Decorators.Tests/Examples/SpanCounterExample.cs For example I have to figure out how to propagate the information that the scope won't finish the span on dispose (if needed) |
I requested a change to the OT spec due to the impossibility of doing this, but the only ways I think you can do are
opentracing/opentracing-csharp#95 relates to this item |
@ndrwrbgs I finally dropped to enable any method decoration, but based on the example provided by @cwe1ss in opentracing/opentracing-csharp#95, i finally had all span/scope close/finish/dispose scenarios working |
Be sure to test with an implementation that expects the types to match it's implementation type (e.g. Jaeger I believe does this, based on recommendations they gave me). E.g. I don't think the comment here is valid for implementations
|
ooo, nice that they didn't do what they recommended me to do (which was really bad design :-( ). I'd still want to ensure if possible that a tracer that expects it's own type will get it back, but as it won't affect anyone other than me it seems I can take on looking into that later :) |
Closed out thanks! |
This was a problem I hit when trying to implement a similar library and from what I can see I believe we may have it here also (I’ll update for sure later).
If the user wants to decorate span closes, eg to emit metrics, but accesses the span from IScopeManager.Active, at that hook point we cannot know if the IScope returned should close its contained span or not (and the IScope returned from the impl manager won’t be our decorator type).
The text was updated successfully, but these errors were encountered: