Comments (7)
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?
from petabridge.tracing.zipkin.
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.
from petabridge.tracing.zipkin.
Dispose on the Span
object itself calls Finish
Petabridge.Tracing.Zipkin/src/Petabridge.Tracing.Zipkin/Span.cs
Lines 102 to 105 in 6a7e6d5
Maybe the issue is what's happening inside the Scope
object - I don't believe we have a reproduction for that, so we can take a look.
from petabridge.tracing.zipkin.
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
var sb = _tracer.BuildSpan("no-op").WithTag("empty", true);
var span = sb.Start();
await Task.Delay(1000);
span.Finish();
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.
from petabridge.tracing.zipkin.
@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.
If you agree, I will submit small PR for that, with reproducing spec
from petabridge.tracing.zipkin.
from petabridge.tracing.zipkin.
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.
from petabridge.tracing.zipkin.
Related Issues (20)
- Need to update to latest Confluent.Kafka driver
- Update the screenshot? HOT 1
- Bug: Initial tags created by IZipkinSpanBuilder aren't actually passed to span
- Perf: limit degree of concurrency on ZipkinHttpReporter
- Use ApprovalTests to verify serializer output
- Throttle rate of Zipkin error messages
- Upgrade to OpenTracing 0.12.0 HOT 1
- Implement missing OpenTracing v0.1.2 Span APIs
- B3Propagator.Extract always returns a span context even when one isn't present HOT 3
- Calling ITracer.Inject with a NoOp span context causes cast exception HOT 1
- Add Google.Protobuf Codec Support HOT 1
- implement "b3 single" header format HOT 5
- B3 Propagation header extraction is case sensitive
- Support for "true" value on sampling state HOT 2
- Add strong-naming and code-signing HOT 2
- Sampling isn't being propagated correctly HOT 1
- Open Kafka Producer for Reporting HOT 2
- FileLoadException when running Petabridge.Tracing.Zipkin in existing project that uses Akka 1.3.11 HOT 2
- Request for preview release: Upgrade to Akka v1.4.0-beta1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from petabridge.tracing.zipkin.