-
Notifications
You must be signed in to change notification settings - Fork 100
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
Observers cannot access native zipkin span instance #156
Comments
Interesting, so your use case is to access the list of unfinished spans, any particular reason?. While I think about it I will friendly ping @adriancole to see if there is such use cases somewhere else. For now I can mention that in libraries like zipkin-js after some due time we flush unfinished spans to the server with a annotation called |
Yes, I have use-case of flushing unfinished spans, when span is covering long-running operation, such as incoming bidirectional GRPC stream with events going both ways and each possibly causing child spans of execution. In this case, stream may very well last for many hours or even days, so any sampling information may easily get lost unless span is regularly flushed. In my target use-case I intend flushing on every child span finish and with configurable rates/intervals. While library itself might benefit from global flush timeout specifically, I still think it would be best to allow for implementation of custom flushing policies using observers as well. |
Because opentracing observers are passed private spanImpl wrapper, there is no way for observer to extract native zipkin span instance.
As such, it is impossible to implement e.g. centralized unfinished spans flushing using current state of the library.
Also SpanObserver interface does not provide methods for log/annotation changes.
To address both issues, I suggest introducing new interfaces
And new tracer option
The text was updated successfully, but these errors were encountered: