void afterTerminate ( HttpRequest < ? > request ) { Optional < Tracer . SpanInScope > scope = request . removeAttribute ( TraceRequestAttributes . CURRENT_SCOPE , Tracer . SpanInScope . class ) ; scope . ifPresent ( Tracer . SpanInScope :: close ) ; }
Closes the scope after terminating the request .