Span not finished when subscription is cancelled
See original GitHub issueHello!
In the TracingOperator
component is there any good reason the not finish the span when the wrapped source has been canceled?
I would change
class TracingOperator extends MonoOperator<Void, Void> {
@Override
public void subscribe(final CoreSubscriber<? super Void> subscriber) {
// ...
try (final Scope scope = tracer.scopeManager().activate(span)) {
exchange.getAttributes().put(TracingWebFilter.SERVER_SPAN_CONTEXT, span.context());
source.subscribe(new TracingSubscriber(subscriber, exchange, context, span, spanDecorators));
}
}
To
class TracingOperator extends MonoOperator<Void, Void> {
@Override
public void subscribe(final CoreSubscriber<? super Void> subscriber) {
// ...
try (final Scope scope = tracer.scopeManager().activate(span)) {
exchange.getAttributes().put(TracingWebFilter.SERVER_SPAN_CONTEXT, span.context());
source.doOnCancel(() -> span.finish())
.subscribe(new TracingSubscriber(subscriber, exchange, context, span, spanDecorators));
}
}
Happy to contribute if needed!
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Bug: Span has already been finished; will not be reported ...
This cancel event is picked up in the TracingClientResponseSubscriber subscription here. The end result is that the span is "finished" twice ...
Read more >Terms of Service - Span Health
You may cancel your Subscription renewal either through your online account management page or by contacting Span Health Limited customer support team. A...
Read more >How to cancel a PlayStation Store subscription
Go to Settings > Users and Accounts. · Select Account > Payment and Subscriptions > Subscriptions. · Select a service > Cancel Subscription....
Read more >Cancel subscriptions | Stripe Documentation
After all settings are finalized, click Cancel subscription. By default, the cancellation takes effect immediately. As soon the subscription cancels, no ...
Read more >TAP vs. SPAN: Which Option is Right for You? - Gigamon
Both situations can lead to dropped packets. SPANs work best for ad hoc monitoring of low volumes of data in locations where TAPs...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the new release!
Thanks for reminding me! Just launched it