Ensure reactor netty spans are ended in the order they were started (#9203)
This commit is contained in:
parent
31b90b1463
commit
82118868bf
|
@ -52,7 +52,10 @@ final class InstrumentationContexts {
|
|||
return context;
|
||||
}
|
||||
|
||||
void endClientSpan(@Nullable HttpClientResponse response, @Nullable Throwable error) {
|
||||
// we are synchronizing here to ensure that spans are ended in the oder they are read from the
|
||||
// queue
|
||||
synchronized void endClientSpan(
|
||||
@Nullable HttpClientResponse response, @Nullable Throwable error) {
|
||||
RequestAndContext requestAndContext = clientContexts.poll();
|
||||
if (requestAndContext != null) {
|
||||
instrumenter().end(requestAndContext.context, requestAndContext.request, response, error);
|
||||
|
|
Loading…
Reference in New Issue