Skip to content

Commit

Permalink
Update ResponseFilter.java
Browse files Browse the repository at this point in the history
  • Loading branch information
vikasojha0536 authored Nov 14, 2024
1 parent 23693b7 commit ecc8f85
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/jumper/filter/ResponseFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public GatewayFilter apply(Config config) {
(exchange, chain) ->
chain
.filter(exchange)
.then(
Mono.fromRunnable(
() ->
.doOnTerminate(() -> {
if (exchange.getResponse().isCommitted()) {
return;
}
WebFluxSleuthOperators.withSpanInScope(
tracer,
currentTraceContext,
Expand Down Expand Up @@ -90,7 +91,8 @@ public GatewayFilter apply(Config config) {
}

span.event("jrpf");
}))),
});
}),
RequestFilter.REQUEST_FILTER_ORDER);
}

Expand Down

0 comments on commit ecc8f85

Please sign in to comment.