Skip to content

Commit 495aa48

Browse files
committed
test: add full url testing to showcase
1 parent ff0cf54 commit 495aa48

File tree

1 file changed

+6
-0
lines changed
  • sdk-platform-java/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it

1 file changed

+6
-0
lines changed

sdk-platform-java/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelTracing.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class ITOtelTracing {
7272
private static final long SHOWCASE_SERVER_PORT = 7469;
7373
private static final String SHOWCASE_REPO = "googleapis/sdk-platform-java";
7474
private static final String SHOWCASE_ARTIFACT = "com.google.cloud:gapic-showcase";
75+
private static final String SHOWCASE_USER_URL = "http://localhost:7469/v1beta1/users/";
7576

7677
private InMemorySpanExporter spanExporter;
7778
private OpenTelemetrySdk openTelemetrySdk;
@@ -231,6 +232,11 @@ void testTracing_successfulIdentityGetUser_httpjson() throws Exception {
231232
.getAttributes()
232233
.get(AttributeKey.stringKey(ObservabilityAttributes.HTTP_URL_TEMPLATE_ATTRIBUTE)))
233234
.isEqualTo("v1beta1/{name=users/*}");
235+
assertThat(
236+
attemptSpan
237+
.getAttributes()
238+
.get(AttributeKey.stringKey(ObservabilityAttributes.HTTP_URL_FULL_ATTRIBUTE)))
239+
.isEqualTo(SHOWCASE_USER_URL + "test-user");
234240
assertThat(
235241
attemptSpan
236242
.getAttributes()

0 commit comments

Comments
 (0)