Defining what is measured means to define the bounds of the measurement. In other words, when the metric starts and when the metric ends. This can sound simple to do, but don't forget we work in a multi-layer environment and that you can miss some layers if your monitoring is not well defined.
Here are some examples, based on our quote-manager application, where not defining the bounds of the metric well enough can lead to incorrectly validating the application:
- Measuring an endpoint execution duration with a CDI interceptor: You miss the JAX-RS layer
- Measuring an endpoint execution duration with a JAX-RS filter: You miss the servlet layer
- Measuring an endpoint execution duration with a servlet filter if the metric is ...