@@ -62,42 +62,14 @@ public void processTags(
6262 return ;
6363 }
6464
65- // Extract HTTP tags
66- Object httpMethodObj = unsafeTags .get (HTTP_METHOD );
67- Object httpRouteObj = unsafeTags .get (HTTP_ROUTE );
68- Object httpUrlObj = unsafeTags .get (HTTP_URL );
69-
70- log .debug (
71- "Processing tags for span {}: httpMethod={}, httpRoute={}, httpUrl={}" ,
72- spanContext .getSpanId (),
73- httpMethodObj ,
74- httpRouteObj ,
75- httpUrlObj );
76-
77- if (httpMethodObj == null ) {
78- // Not an HTTP span, skip processing
79- log .debug ("No HTTP method found, skipping HTTP endpoint post processing" );
65+ if (unsafeTags .getObject (HTTP_METHOD ) == null ) {
8066 return ;
8167 }
8268
8369 try {
84- String httpMethod = httpMethodObj .toString ();
85- String httpRoute = httpRouteObj != null ? httpRouteObj .toString () : null ;
86- String httpUrl = httpUrlObj != null ? httpUrlObj .toString () : null ;
87-
88- // Resolve endpoint using EndpointResolver
89- // Pass unsafeTags directly - it's safe to use at this point since span is finished
90- String endpoint = endpointResolver .resolveEndpoint (unsafeTags , httpRoute , httpUrl );
91-
92- if (endpoint != null ) {
93- log .debug (
94- "Resolved endpoint '{}' for span {} (method={}, route={}, url={})" ,
95- endpoint ,
96- spanContext .getSpanId (),
97- httpMethod ,
98- httpRoute ,
99- httpUrl );
100- }
70+ String httpRoute = unsafeTags .getString (HTTP_ROUTE );
71+ String httpUrl = unsafeTags .getString (HTTP_URL );
72+ endpointResolver .resolveEndpoint (unsafeTags , httpRoute , httpUrl );
10173 } catch (Throwable t ) {
10274 log .debug ("Error processing HTTP endpoint for span {}" , spanContext .getSpanId (), t );
10375 }
0 commit comments