|
83 | 83 | import dev.failsafe.Failsafe; |
84 | 84 | import dev.failsafe.RetryPolicy; |
85 | 85 |
|
86 | | -import java.io.Closeable; |
87 | 86 | import java.io.UncheckedIOException; |
88 | 87 | import java.net.URI; |
89 | 88 | import java.time.Duration; |
|
92 | 91 | import java.util.HashMap; |
93 | 92 | import java.util.List; |
94 | 93 | import java.util.Map; |
95 | | -import java.util.Optional; |
96 | 94 | import java.util.Set; |
97 | 95 | import java.util.concurrent.ConcurrentHashMap; |
98 | 96 | import java.util.concurrent.Executor; |
|
102 | 100 | import java.util.concurrent.locks.Lock; |
103 | 101 | import java.util.concurrent.locks.ReadWriteLock; |
104 | 102 | import java.util.concurrent.locks.ReentrantReadWriteLock; |
105 | | -import java.util.function.Function; |
106 | 103 | import java.util.logging.Level; |
107 | 104 | import java.util.logging.Logger; |
108 | 105 | import java.util.stream.Collectors; |
@@ -596,18 +593,15 @@ public Either<SessionNotCreatedException, CreateSessionResponse> newSession(Sess |
596 | 593 | AttributeKey.EXCEPTION_MESSAGE.getKey(), |
597 | 594 | EventAttribute.setValue("Will retry session " + request.getRequestId())); |
598 | 595 |
|
599 | | - span.setAttribute(AttributeKey.ERROR.getKey(), true); |
600 | | - span.setStatus(Status.ABORTED); |
601 | | - span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap); |
602 | 596 | } else { |
603 | 597 | EXCEPTION.accept(attributeMap, lastFailure); |
604 | 598 | attributeMap.put(AttributeKey.EXCEPTION_MESSAGE.getKey(), |
605 | 599 | EventAttribute.setValue("Unable to create session: " + lastFailure.getMessage())); |
606 | 600 |
|
607 | | - span.setAttribute(AttributeKey.ERROR.getKey(), true); |
608 | | - span.setStatus(Status.ABORTED); |
609 | | - span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap); |
610 | 601 | } |
| 602 | + span.setAttribute(AttributeKey.ERROR.getKey(), true); |
| 603 | + span.setStatus(Status.ABORTED); |
| 604 | + span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap); |
611 | 605 | return Either.left(lastFailure); |
612 | 606 | } catch (SessionNotCreatedException e) { |
613 | 607 | span.setAttribute(AttributeKey.ERROR.getKey(), true); |
|
0 commit comments