File tree 1 file changed +2
-6
lines changed
arex-instrumentation/common/arex-common/src/main/java/io/arex/inst/common/util
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,9 @@ public Flux<T> apply(Flux<T> flux) {
30
30
AtomicInteger index = new AtomicInteger (1 );
31
31
String responseType = TypeUtil .getName (flux );
32
32
return flux .doOnNext (element -> {
33
- try (TraceTransmitter tm = traceTransmitter .transmit ()) {
34
- results .add (buildElementResult (index .getAndIncrement (), element ));
35
- }
33
+ results .add (buildElementResult (index .getAndIncrement (), element ));
36
34
}).doOnError (error -> {
37
- try (TraceTransmitter tm = traceTransmitter .transmit ()) {
38
- results .add (buildElementResult (index .getAndIncrement (), error ));
39
- }
35
+ results .add (buildElementResult (index .getAndIncrement (), error ));
40
36
}).doFinally (result -> {
41
37
try (TraceTransmitter tm = traceTransmitter .transmit ()) {
42
38
consumer .accept (new FluxResult (responseType , results ));
You can’t perform that action at this time.
0 commit comments