Skip to content

Commit 6f0a32c

Browse files
Copilottrask
andcommitted
Add missing operation name verification to HttpClients test for complete functional equivalence
Co-authored-by: trask <[email protected]>
1 parent 502cd58 commit 6f0a32c

File tree

1 file changed

+8
-4
lines changed
  • smoke-tests/apps/HttpClients/src/smokeTest/java/com/microsoft/applicationinsights/smoketest

1 file changed

+8
-4
lines changed

smoke-tests/apps/HttpClients/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/HttpClientTest.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ private static void verify(String successUrlWithQueryString) throws Exception {
8787
.hasSuccess(true)
8888
.hasProperty("_MS.ProcessedByMetricExtractors", "True")
8989
.hasNoParent()
90-
.hasNoSampleRate())
90+
.hasNoSampleRate()
91+
.hasTag("ai.operation.name", "GET /HttpClients/*"))
9192
.hasDependencySatisying(
9293
dependency ->
9394
dependency
@@ -99,7 +100,8 @@ private static void verify(String successUrlWithQueryString) throws Exception {
99100
.hasSuccess(true)
100101
.hasProperty("_MS.ProcessedByMetricExtractors", "True")
101102
.hasParent(trace.getRequestId(0))
102-
.hasNoSampleRate())
103+
.hasNoSampleRate()
104+
.hasTag("ai.operation.name", "GET /HttpClients/*"))
103105
.hasDependencySatisying(
104106
dependency ->
105107
dependency
@@ -111,7 +113,8 @@ private static void verify(String successUrlWithQueryString) throws Exception {
111113
.hasSuccess(false)
112114
.hasProperty("_MS.ProcessedByMetricExtractors", "True")
113115
.hasParent(trace.getRequestId(0))
114-
.hasNoSampleRate())
116+
.hasNoSampleRate()
117+
.hasTag("ai.operation.name", "GET /HttpClients/*"))
115118
.hasDependencySatisying(
116119
dependency ->
117120
dependency
@@ -123,7 +126,8 @@ private static void verify(String successUrlWithQueryString) throws Exception {
123126
.hasSuccess(false)
124127
.hasProperty("_MS.ProcessedByMetricExtractors", "True")
125128
.hasParent(trace.getRequestId(0))
126-
.hasNoSampleRate()));
129+
.hasNoSampleRate()
130+
.hasTag("ai.operation.name", "GET /HttpClients/*")));
127131
}
128132

129133
@Environment(TOMCAT_8_JAVA_8)

0 commit comments

Comments
 (0)