Skip to content

Commit a49044a

Browse files
committed
Fix
1 parent 883f1cb commit a49044a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal-api/src/main/java/datadog/trace/api/gateway/InferredProxySpan.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)