Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.63 KB

File metadata and controls

24 lines (16 loc) · 1.63 KB

Observability

Observability is the ability to observe the internal state of a running system from the outside. It consists of the three pillars logging, metrics and traces.

For metrics and traces, Spring Boot uses Micrometer Observation. To create your own observations (which will lead to metrics and traces), you can inject an ObservationRegistry.

code:MyCustomObservation

Note
Low cardinality tags will be added to metrics and traces, while high cardinality tags will only be added to traces.

Beans of type ObservationPredicate, GlobalObservationConvention and ObservationHandler will be automatically registered on the ObservationRegistry. You can additionally register any number of ObservationRegistryCustomizer beans to further configure the registry.

For more details please see the Micrometer Observation documentation.

Tip
Observability for JDBC and R2DBC can be configured using separate projects.
For JDBC, Datasource Micrometer project provides a Spring Boot starter which automatically creates observations when JDBC operations are invoked. Read more about it in the reference documentation.
For R2DBC, Spring Boot Auto Configuration for R2DBC Observation gives observations for R2DBC query invocations.

The next sections will provide more details about logging, metrics and traces.