Skip to content

Commit

Permalink
Netty connection failure span only when first operation fails (open-t…
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored and robododge committed Jun 17, 2021
1 parent e0e61cc commit 2c0e587
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ public static Scope activateScope(@Advice.Argument(0) ChannelFuture future) {
- To return scope only if we have captured it.
- To capture scope only in case of error.
*/
Throwable cause = future.cause();
if (cause == null) {
return null;
}
Context parentContext = future.channel().attr(AttributeKeys.CONNECT_CONTEXT).getAndRemove();
if (parentContext == null) {
return null;
}
Throwable cause = future.cause();
if (cause == null) {
return null;
}

Scope parentScope = parentContext.makeCurrent();
if (tracer().shouldStartSpan(parentContext)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public static Scope activateScope(@Advice.Argument(0) ChannelFuture future) {
- To return scope only if we have captured it.
- To capture scope only in case of error.
*/
Throwable cause = future.cause();
if (cause == null) {
return null;
}
Context parentContext = future.channel().attr(AttributeKeys.CONNECT_CONTEXT).getAndRemove();
if (parentContext == null) {
return null;
}
Throwable cause = future.cause();
if (cause == null) {
return null;
}

Scope parentScope = parentContext.makeCurrent();
if (tracer().shouldStartSpan(parentContext, SpanKind.CLIENT)) {
Expand Down

0 comments on commit 2c0e587

Please sign in to comment.