Refer to external docs for observability support

This commit removes the `KeyValues` listed in the Spring Boot reference
documentation, since now support is implemented in Spring projects
directly and documentation is maintained there.

This change adds links to the relevant sections in the Spring Framework
and Spring for GraphQL reference docs.
pull/33838/head
Brian Clozel 2 years ago
parent c1ca05d99d
commit febca4aa5e

@ -742,31 +742,12 @@ Metrics are tagged by the name of the executor, which is derived from the bean n
[[actuator.metrics.supported.spring-mvc]]
==== Spring MVC Metrics
Auto-configuration enables the instrumentation of all requests handled by Spring MVC controllers and functional handlers.
By default, metrics are generated with the name, `http.server.requests`.
You can customize the name by setting the configprop:management.observations.http.server.requests.name[] property.
By default, Spring MVC related metrics are tagged with the following information:
|===
| Tag | Description
| `exception`
| The simple class name of any exception that was thrown while handling the request.
| `method`
| The request's method (for example, `GET` or `POST`)
| `outcome`
| The request's outcome, based on the status code of the response.
1xx is `INFORMATIONAL`, 2xx is `SUCCESS`, 3xx is `REDIRECTION`, 4xx is `CLIENT_ERROR`, and 5xx is `SERVER_ERROR`
| `status`
| The response's HTTP status code (for example, `200` or `500`)
| `uri`
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|===
See the {spring-framework-docs}/integration.html#integration.observability.http-server.servlet[Spring Framework reference documentation for more information on produced observations].
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.observation` package.
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
@ -786,27 +767,7 @@ Auto-configuration enables the instrumentation of all requests handled by Spring
By default, metrics are generated with the name, `http.server.requests`.
You can customize the name by setting the configprop:management.observations.http.server.requests.name[] property.
By default, WebFlux related metrics are tagged with the following information:
|===
| Tag | Description
| `exception`
| The simple class name of any exception that was thrown while handling the request.
| `method`
| The request's method (for example, `GET` or `POST`)
| `outcome`
| The request's outcome, based on the status code of the response.
1xx is `INFORMATIONAL`, 2xx is `SUCCESS`, 3xx is `REDIRECTION`, 4xx is `CLIENT_ERROR`, and 5xx is `SERVER_ERROR`
| `status`
| The response's HTTP status code (for example, `200` or `500`)
| `uri`
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|===
See the {spring-framework-docs}/integration.html#integration.observability.http-server.reactive[Spring Framework reference documentation for more information on produced observations].
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.reactive.observation` package.
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
@ -861,27 +822,7 @@ You can also manually apply the customizers responsible for this instrumentation
By default, metrics are generated with the name, `http.client.requests`.
You can customize the name by setting the configprop:management.observations.http.client.requests.name[] property.
By default, metrics generated by an instrumented client are tagged with the following information:
|===
| Tag | Description
| `clientName`
| The host portion of the URI
| `method`
| The request's method (for example, `GET` or `POST`)
| `outcome`
| The request's outcome, based on the status code of the response.
1xx is `INFORMATIONAL`, 2xx is `SUCCESS`, 3xx is `REDIRECTION`, 4xx is `CLIENT_ERROR`, and 5xx is `SERVER_ERROR`. Otherwise, it is `UNKNOWN`.
| `status`
| The response's HTTP status code if available (for example, `200` or `500`) or `IO_ERROR` in case of I/O issues. Otherwise, it is `CLIENT_ERROR`.
| `uri`
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|===
See the {spring-framework-docs}/integration.html#integration.observability.http-client[Spring Framework reference documentation for more information on produced observations].
To customize the tags when using `RestTemplate`, provide a `@Bean` that implements `ClientRequestObservationConvention` from the `org.springframework.http.client.observation` package.
To customize the tags when using `WebClient`, provide a `@Bean` that implements `ClientRequestObservationConvention` from the `org.springframework.web.reactive.function.client` package.
@ -919,53 +860,8 @@ A `CacheMetricsRegistrar` bean is made available to make that process easier.
[[actuator.metrics.supported.spring-graphql]]
==== Spring GraphQL Metrics
Auto-configuration enables the instrumentation of GraphQL queries, for any supported transport.
Spring Boot records a `graphql.request` timer with:
[cols="1,2,2"]
|===
|Tag | Description| Sample values
|outcome
|Request outcome
|"SUCCESS", "ERROR"
|===
A single GraphQL query can involve many `DataFetcher` calls, so there is a dedicated `graphql.datafetcher` timer:
[cols="1,2,2"]
|===
|Tag | Description| Sample values
|path
|data fetcher path
|"Query.project"
|outcome
|data fetching outcome
|"SUCCESS", "ERROR"
|===
The `graphql.request.datafetch.count` https://micrometer.io/docs/concepts#_distribution_summaries[distribution summary] counts the number of non-trivia
This metric is useful for detecting "N+1" data fetching issues and considering batch loading; it provides the `"TOTAL"` number of data fetcher calls ma
More options are available for <<application-properties#application-properties.actuator.management.metrics.distribution.maximum-expected-value, configu
A single response can contain many GraphQL errors, counted by the `graphql.error` counter:
[cols="1,2,2"]
|===
|Tag | Description| Sample values
|errorType
|error type
|"DataFetchingException"
|errorPath
|error JSON Path
|"$.project"
|===
See the {spring-graphql-docs}[Spring GraphQL reference documentation].
[[actuator.metrics.supported.jdbc]]

Loading…
Cancel
Save