File tree Expand file tree Collapse file tree
internal-api/src/main/java/datadog/trace/api/gateway Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public AgentSpanContext start(AgentSpanContext extracted) {
111111 domainName != null && !domainName .isEmpty () ? "https://" + domainName + path : path );
112112
113113 // Http.route - value of x-dd-proxy-resource-path (or x-dd-proxy-path as fallback)
114- span .setTag (HTTP_ROUTE , resourcePath != null ? resourcePath : path );
114+ span .setTag (HTTP_ROUTE , resourcePath != null && ! resourcePath . isEmpty () ? resourcePath : path );
115115
116116 // "stage" - value of x-dd-proxy-stage
117117 span .setTag ("stage" , header (STAGE ));
@@ -146,7 +146,7 @@ public AgentSpanContext start(AgentSpanContext extracted) {
146146 // Resource Name: <Method> <Route> when route available, else <Method> <Path>
147147 // Prefer x-dd-proxy-resource-path (route) over x-dd-proxy-path (path)
148148 // Use MANUAL_INSTRUMENTATION priority to prevent TagInterceptor from overriding
149- String routeOrPath = resourcePath != null ? resourcePath : path ;
149+ String routeOrPath = resourcePath != null && ! resourcePath . isEmpty () ? resourcePath : path ;
150150 String resourceName =
151151 httpMethod != null && routeOrPath != null ? httpMethod + " " + routeOrPath : null ;
152152 if (resourceName != null ) {
You can’t perform that action at this time.
0 commit comments