|
17 | 17 | import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS; |
18 | 18 | import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT; |
19 | 19 | import static io.opentelemetry.semconv.UrlAttributes.URL_FULL; |
| 20 | +import static io.opentelemetry.semconv.incubating.PeerIncubatingAttributes.PEER_SERVICE; |
20 | 21 | import static org.assertj.core.api.Assertions.assertThat; |
21 | 22 | import static org.assertj.core.api.Assertions.catchThrowable; |
22 | 23 |
|
|
28 | 29 | import io.opentelemetry.instrumentation.testing.junit.http.HttpClientTestOptions; |
29 | 30 | import io.opentelemetry.sdk.testing.assertj.AttributeAssertion; |
30 | 31 | import io.opentelemetry.sdk.trace.data.StatusData; |
31 | | -import io.opentelemetry.semconv.incubating.PeerIncubatingAttributes; |
32 | 32 | import java.io.DataOutputStream; |
33 | 33 | import java.io.IOException; |
34 | 34 | import java.io.InputStream; |
@@ -132,7 +132,7 @@ public void traceRequest(boolean useCache) throws IOException { |
132 | 132 | equalTo(URL_FULL, url.toString()), |
133 | 133 | equalTo(HTTP_REQUEST_METHOD, "GET"), |
134 | 134 | equalTo(HTTP_RESPONSE_STATUS_CODE, STATUS), |
135 | | - equalTo(PeerIncubatingAttributes.PEER_SERVICE, "test-peer-service"))); |
| 135 | + equalTo(PEER_SERVICE, "test-peer-service"))); |
136 | 136 |
|
137 | 137 | testing.waitAndAssertTraces( |
138 | 138 | trace -> |
@@ -178,7 +178,7 @@ public void testBrokenApiUsage() throws IOException { |
178 | 178 | equalTo(URL_FULL, url.toString()), |
179 | 179 | equalTo(HTTP_REQUEST_METHOD, "GET"), |
180 | 180 | equalTo(HTTP_RESPONSE_STATUS_CODE, STATUS), |
181 | | - equalTo(PeerIncubatingAttributes.PEER_SERVICE, "test-peer-service"))); |
| 181 | + equalTo(PEER_SERVICE, "test-peer-service"))); |
182 | 182 |
|
183 | 183 | testing.waitAndAssertTraces( |
184 | 184 | trace -> |
@@ -230,7 +230,7 @@ public void testPostRequest() throws IOException { |
230 | 230 | equalTo(URL_FULL, url.toString()), |
231 | 231 | equalTo(HTTP_REQUEST_METHOD, "POST"), |
232 | 232 | equalTo(HTTP_RESPONSE_STATUS_CODE, STATUS), |
233 | | - equalTo(PeerIncubatingAttributes.PEER_SERVICE, "test-peer-service"))); |
| 233 | + equalTo(PEER_SERVICE, "test-peer-service"))); |
234 | 234 |
|
235 | 235 | testing.waitAndAssertTraces( |
236 | 236 | trace -> |
@@ -284,7 +284,7 @@ public void getOutputStreamShouldTransformGetIntoPost() throws IOException { |
284 | 284 | equalTo(URL_FULL, url.toString()), |
285 | 285 | equalTo(HTTP_REQUEST_METHOD, "POST"), |
286 | 286 | equalTo(HTTP_RESPONSE_STATUS_CODE, STATUS), |
287 | | - equalTo(PeerIncubatingAttributes.PEER_SERVICE, "test-peer-service"))); |
| 287 | + equalTo(PEER_SERVICE, "test-peer-service"))); |
288 | 288 |
|
289 | 289 | testing.waitAndAssertTraces( |
290 | 290 | trace -> |
@@ -327,7 +327,7 @@ public void traceRequestWithConnectionFailure(String scheme) { |
327 | 327 | equalTo(URL_FULL, uri), |
328 | 328 | equalTo(HTTP_REQUEST_METHOD, "GET"), |
329 | 329 | equalTo(ERROR_TYPE, "java.net.ConnectException"), |
330 | | - equalTo(PeerIncubatingAttributes.PEER_SERVICE, "test-peer-service"))); |
| 330 | + equalTo(PEER_SERVICE, "test-peer-service"))); |
331 | 331 |
|
332 | 332 | testing.waitAndAssertTraces( |
333 | 333 | trace -> |
|
0 commit comments