diff --git a/web/src/main/java/com/microsoft/applicationinsights/web/internal/correlation/TraceContextCorrelation.java b/web/src/main/java/com/microsoft/applicationinsights/web/internal/correlation/TraceContextCorrelation.java index d9e61655f8f..f9391cbdb00 100644 --- a/web/src/main/java/com/microsoft/applicationinsights/web/internal/correlation/TraceContextCorrelation.java +++ b/web/src/main/java/com/microsoft/applicationinsights/web/internal/correlation/TraceContextCorrelation.java @@ -370,7 +370,7 @@ public static String generateChildDependencyTarget(String requestContext) { String[] keyValue = requestContext.split("="); String headerAppID = null; - if (keyValue[0].equals(REQUEST_CONTEXT_HEADER_APPID_KEY)) { + if (keyValue.length == 2 && keyValue[0].equals(REQUEST_CONTEXT_HEADER_APPID_KEY)) { headerAppID = keyValue[1]; }