-
Notifications
You must be signed in to change notification settings - Fork 4
Traces not visible in Zipkin UI, when open tracing is used #95
Comments
We use the OpenTracing API for this heavily in https://phobos.petabridge.com - it works. Might be a configuration issue - are you still having this issue? |
Having the same issue. Seems the using(){} with finish on dispose is not functioning as expected. Running the same code but using span.Start() and span.Finish() works. |
Dispose on the Petabridge.Tracing.Zipkin/src/Petabridge.Tracing.Zipkin/Span.cs Lines 102 to 105 in 6a7e6d5
Maybe the issue is what's happening inside the |
Yes. My bad. Using statement has nothing to do with it. Indeed when using scopes via StartActive() it will no longer send traces. Another strange thing is that when I switch sample code to
on a simple GET method it will keep sending spans indefinitely cycling the same threads while it is not executing/reaching that code block multiple times. Though that seems to be a different issue (if not just my misunderstanding of what happens) and should not pollute this thread. |
@Aaronontheweb @bastijnv Currently there is no built-in implementation of As a quick solution you might consider using var tracer = new ZipkinTracer(new ZipkinTracerOptions(url, "ZipkinTest", debug: true)
{
ScopeManager = new AsyncLocalScopeManager()
}); @Aaronontheweb This is not clear from README, but what do you think about using |
Sounds like a good idea
…Sent from my iPhone
On Jan 29, 2020, at 6:30 AM, Igor Fedchenko ***@***.***> wrote:
@Aaronontheweb @bastijnv
The issue here is that ISpanBuilder.StartActive is using IScopeManager internally so keep track of active span (some details [here[(https://github.com/opentracing/opentracing-csharp#scopes-and-within-process-propagation)). You have to set ScopeManager property of ZipkinTracerOptions to have StartActive working.
Currently there is no built-in implementation of IScopeManager in Petabridge.Tracing.Zipkin, except NoopScopeManager class which always returnes NoopSpanBuilder, so basically ISpanBuilder.StartActive resolves to NoopSpan.Instance, which does nothing. That's why nothing is sent to Zipkin.
As a quick solution you might consider using AsyncLocalScopeManager implementation of IScopeManager that is built in OpenTracing package, like this:
var tracer = new ZipkinTracer(new ZipkinTracerOptions(url, "ZipkinTest", debug: true)
{
ScopeManager = new AsyncLocalScopeManager()
});
@Aaronontheweb This is not clear from README, but what do you think about using AsyncLocalScopeManager as a default scope manager instead of NoopScopeManager? This may help people have this StartActive method working out of the box.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
So the reason why I never ran into this bug - Phobos sets up a scope manager by default in its configuration. This is definitely an issue on our end. |
Hi,
I have written below code, to see if the opentracing api can be used with this driver. It does not seem to work as I don't see anything in the Zipkin UI. However, the sample code shown in the Readme works perfectly fine.
Am I missing anything?
The text was updated successfully, but these errors were encountered: