55import io .apitally .common .LogAppender ;
66import io .apitally .common .RequestLogger ;
77import io .apitally .common .RequestLoggingConfig ;
8- import io .apitally .common .SpanCollector ;
98import io .apitally .common .dto .Consumer ;
109import io .apitally .common .dto .Header ;
1110import io .apitally .common .dto .LogRecord ;
@@ -82,8 +81,6 @@ protected void doFilterInternal(
8281 LogAppender .startCapture ();
8382 }
8483
85- final SpanCollector .SpanHandle spanHandle = shouldCaptureSpans ? client .spanCollector .startCollection () : null ;
86-
8784 try {
8885 filterChain .doFilter (
8986 cachingRequest != null ? cachingRequest : request ,
@@ -96,20 +93,6 @@ protected void doFilterInternal(
9693 final long responseTimeInMillis = System .currentTimeMillis () - startTime ;
9794 final String path = (String ) request .getAttribute (HandlerMapping .BEST_MATCHING_PATTERN_ATTRIBUTE );
9895
99- // End span collection and get spans
100- List <SpanData > spans = null ;
101- String traceId = null ;
102- if (spanHandle != null ) {
103- Object handler = request .getAttribute (HandlerMapping .BEST_MATCHING_HANDLER_ATTRIBUTE );
104- if (handler instanceof HandlerMethod handlerMethod ) {
105- String controllerName = handlerMethod .getBeanType ().getSimpleName ();
106- String methodName = handlerMethod .getMethod ().getName ();
107- spanHandle .setName (controllerName + "." + methodName );
108- }
109- spans = spanHandle .end ();
110- traceId = spanHandle .getTraceId ();
111- }
112-
11396 // End log capture and get logs
11497 final List <LogRecord > capturedLogs = shouldCaptureLogs ? LogAppender .endCapture () : null ;
11598
@@ -180,9 +163,7 @@ protected void doFilterInternal(
180163 responseSize ,
181164 responseBody ),
182165 exception ,
183- capturedLogs ,
184- spans ,
185- traceId );
166+ capturedLogs );
186167 }
187168
188169 // Add validation error to counter
0 commit comments