diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java index bc5a2dea4b6..27ef5de0d61 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java @@ -603,6 +603,9 @@ public static String getHttpUrlFromServerSpan(Attributes attributes) { return null; } String host = attributes.get(SemanticAttributes.NET_HOST_NAME); + if (host == null) { + return null; + } Long port = attributes.get(SemanticAttributes.NET_HOST_PORT); String target = attributes.get(SemanticAttributes.HTTP_TARGET); if (target == null) { diff --git a/smoke-tests/apps/WebFlux/src/smokeTest/resources/applicationinsights.json b/smoke-tests/apps/WebFlux/src/smokeTest/resources/applicationinsights.json deleted file mode 100644 index 3c170aa1b64..00000000000 --- a/smoke-tests/apps/WebFlux/src/smokeTest/resources/applicationinsights.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "role": { - "name": "testrolename", - "instance": "testroleinstance" - }, - "sampling": { - "percentage": 100 - }, - "selfDiagnostics": { - "level": "debug" - } -}