Change keyvalue name to http.url in server observations
This commit changes the new high cardinality key value from "uri.expanded" to "http.url" in order to align with the OTel specification, since there is no need for backwards compatibility on this new metadata. Closes gh-29254
This commit is contained in:
@@ -71,7 +71,7 @@ class DefaultClientHttpObservationConventionTests {
|
||||
.contains(KeyValue.of("exception", "none"), KeyValue.of("method", "GET"), KeyValue.of("uri", "/resource/{id}"),
|
||||
KeyValue.of("status", "200"), KeyValue.of("outcome", "SUCCESS"));
|
||||
assertThat(this.observationConvention.getHighCardinalityKeyValues(context)).hasSize(2)
|
||||
.contains(KeyValue.of("client.name", "none"), KeyValue.of("uri.expanded", "/resource/42"));
|
||||
.contains(KeyValue.of("client.name", "none"), KeyValue.of("http.url", "/resource/42"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -81,7 +81,7 @@ class DefaultClientHttpObservationConventionTests {
|
||||
assertThat(this.observationConvention.getLowCardinalityKeyValues(context))
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "none"));
|
||||
assertThat(this.observationConvention.getHighCardinalityKeyValues(context)).hasSize(2)
|
||||
.contains(KeyValue.of("uri.expanded", "/resource/42"));
|
||||
.contains(KeyValue.of("http.url", "/resource/42"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -66,7 +66,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "POST"), KeyValue.of("uri", "UNKNOWN"), KeyValue.of("status", "200"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "SUCCESS"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(this.context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/resource"));
|
||||
.contains(KeyValue.of("http.url", "/test/resource"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -79,7 +79,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "/test/{name}"), KeyValue.of("status", "200"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "SUCCESS"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(this.context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/resource"));
|
||||
.contains(KeyValue.of("http.url", "/test/resource"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -93,7 +93,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "UNKNOWN"), KeyValue.of("status", "500"),
|
||||
KeyValue.of("exception", "IllegalArgumentException"), KeyValue.of("outcome", "SERVER_ERROR"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(this.context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/resource"));
|
||||
.contains(KeyValue.of("http.url", "/test/resource"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -107,7 +107,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "REDIRECTION"), KeyValue.of("status", "302"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "REDIRECTION"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(this.context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/redirect"));
|
||||
.contains(KeyValue.of("http.url", "/test/redirect"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -120,7 +120,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "NOT_FOUND"), KeyValue.of("status", "404"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "CLIENT_ERROR"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(this.context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/notFound"));
|
||||
.contains(KeyValue.of("http.url", "/test/notFound"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "POST"), KeyValue.of("uri", "UNKNOWN"), KeyValue.of("status", "201"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "SUCCESS"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/resource"));
|
||||
.contains(KeyValue.of("http.url", "/test/resource"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -82,7 +82,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "/test/{name}"), KeyValue.of("status", "200"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "SUCCESS"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/resource"));
|
||||
.contains(KeyValue.of("http.url", "/test/resource"));
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "UNKNOWN"), KeyValue.of("status", "500"),
|
||||
KeyValue.of("exception", "IllegalArgumentException"), KeyValue.of("outcome", "SERVER_ERROR"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/resource"));
|
||||
.contains(KeyValue.of("http.url", "/test/resource"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -111,7 +111,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "REDIRECTION"), KeyValue.of("status", "302"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "REDIRECTION"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/redirect"));
|
||||
.contains(KeyValue.of("http.url", "/test/redirect"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -124,7 +124,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "NOT_FOUND"), KeyValue.of("status", "404"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "CLIENT_ERROR"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/notFound"));
|
||||
.contains(KeyValue.of("http.url", "/test/notFound"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -138,7 +138,7 @@ class DefaultHttpRequestsObservationConventionTests {
|
||||
.contains(KeyValue.of("method", "GET"), KeyValue.of("uri", "UNKNOWN"), KeyValue.of("status", "UNKNOWN"),
|
||||
KeyValue.of("exception", "none"), KeyValue.of("outcome", "UNKNOWN"));
|
||||
assertThat(this.convention.getHighCardinalityKeyValues(context)).hasSize(1)
|
||||
.contains(KeyValue.of("uri.expanded", "/test/resource"));
|
||||
.contains(KeyValue.of("http.url", "/test/resource"));
|
||||
}
|
||||
|
||||
private static PathPattern getPathPattern(String pattern) {
|
||||
|
||||
Reference in New Issue
Block a user