Skip to content

Commit 387f86e

Browse files
committed
more
1 parent fbc8a26 commit 387f86e

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

instrumentation/armeria/armeria-1.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/armeria/v1_3/ArmeriaHttp2Test.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_PROTOCOL_VERSION;
1717
import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS;
1818
import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT;
19+
import static io.opentelemetry.semconv.incubating.PeerIncubatingAttributes.PEER_SERVICE;
1920
import static io.opentelemetry.semconv.UrlAttributes.URL_FULL;
2021
import static io.opentelemetry.semconv.UrlAttributes.URL_PATH;
2122
import static io.opentelemetry.semconv.UrlAttributes.URL_SCHEME;
@@ -79,7 +80,8 @@ void testHello() throws Exception {
7980
equalTo(SERVER_ADDRESS, "127.0.0.1"),
8081
equalTo(SERVER_PORT, server2.httpPort()),
8182
equalTo(NETWORK_PEER_ADDRESS, "127.0.0.1"),
82-
satisfies(NETWORK_PEER_PORT, val -> val.isInstanceOf(Long.class))),
83+
satisfies(NETWORK_PEER_PORT, val -> val.isInstanceOf(Long.class)),
84+
equalTo(PEER_SERVICE, "test-peer-service")),
8385
span ->
8486
span.hasName("GET /")
8587
.hasKind(SpanKind.SERVER)
@@ -109,7 +111,8 @@ void testHello() throws Exception {
109111
equalTo(SERVER_ADDRESS, "127.0.0.1"),
110112
equalTo(SERVER_PORT, server1.httpPort()),
111113
equalTo(NETWORK_PEER_ADDRESS, "127.0.0.1"),
112-
satisfies(NETWORK_PEER_PORT, val -> val.isInstanceOf(Long.class))),
114+
satisfies(NETWORK_PEER_PORT, val -> val.isInstanceOf(Long.class)),
115+
equalTo(PEER_SERVICE, "test-peer-service")),
113116
span ->
114117
span.hasName("GET /")
115118
.hasKind(SpanKind.SERVER)

instrumentation/google-http-client-1.19/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/AbstractGoogleHttpClientTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS;
1616
import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT;
1717
import static io.opentelemetry.semconv.UrlAttributes.URL_FULL;
18+
import static io.opentelemetry.semconv.incubating.PeerIncubatingAttributes.PEER_SERVICE;
1819

1920
import com.google.api.client.http.GenericUrl;
2021
import com.google.api.client.http.HttpRequest;
@@ -111,7 +112,8 @@ void errorTracesWhenExceptionIsNotThrown() throws Exception {
111112
equalTo(URL_FULL, uri.toString()),
112113
equalTo(HTTP_REQUEST_METHOD, "GET"),
113114
equalTo(HTTP_RESPONSE_STATUS_CODE, 500),
114-
equalTo(ERROR_TYPE, "500")));
115+
equalTo(ERROR_TYPE, "500"),
116+
equalTo(PEER_SERVICE, "test-peer-service")));
115117

116118
testing.waitAndAssertTraces(
117119
trace ->

instrumentation/spring/spring-web/spring-web-3.1/testing/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ dependencies {
77

88
testInstrumentation(project(":instrumentation:http-url-connection:javaagent"))
99
}
10+
11+
tasks.withType<Test>().configureEach {
12+
systemProperty("otel.instrumentation.common.peer-service-mapping", "localhost=test-peer-service,127.0.0.1=test-peer-service,192.0.2.1=test-peer-service")
13+
}

instrumentation/vertx/vertx-rx-java-3.5/javaagent/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ tasks {
9797
}
9898
}
9999

100+
withType<Test>().configureEach {
101+
systemProperty("otel.instrumentation.common.peer-service-mapping", "127.0.0.1=test-peer-service,localhost=test-peer-service,192.0.2.1=test-peer-service")
102+
}
103+
100104
check {
101105
dependsOn(testing.suites)
102106
}

0 commit comments

Comments
 (0)