Change the description for the uri client request observation
This commit describes what parts that are removed from the URI template keyvalue. Closes: gh-34116 Signed-off-by: Mattias-Sehlstedt <60173714+Mattias-Sehlstedt@users.noreply.github.com>
This commit is contained in:
committed by
Brian Clozel
parent
a985b73939
commit
50b1fb0b15
@@ -88,6 +88,17 @@ class DefaultClientRequestObservationConventionTests {
|
||||
assertThat(this.observationConvention.getHighCardinalityKeyValues(context)).contains(KeyValue.of("http.url", "https://example.org/resource/42"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void addsKeyValuesForRequestWithUriTemplateWithHostAndQuery() {
|
||||
ClientRequestObservationContext context = createContext(
|
||||
new MockClientHttpRequest(HttpMethod.GET, "https://example.org/resource/{id}?queryKey={queryValue}", 42, "Query"), response);
|
||||
context.setUriTemplate("https://example.org/resource/{id}?queryKey={queryValue}");
|
||||
assertThat(this.observationConvention.getLowCardinalityKeyValues(context))
|
||||
.contains(KeyValue.of("exception", "none"), KeyValue.of("method", "GET"), KeyValue.of("uri", "/resource/{id}?queryKey={queryValue}"),
|
||||
KeyValue.of("status", "200"), KeyValue.of("client.name", "example.org"), KeyValue.of("outcome", "SUCCESS"));
|
||||
assertThat(this.observationConvention.getHighCardinalityKeyValues(context)).contains(KeyValue.of("http.url", "https://example.org/resource/42?queryKey=Query"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void addsKeyValuesForRequestWithUriTemplateWithoutPath() {
|
||||
ClientRequestObservationContext context = createContext(
|
||||
|
||||
Reference in New Issue
Block a user