This module provides metrics Timer
instrumentation for:
- all context snapshots that are created with
ContextSnapshot.capture()
- all context snapshots that are reactivated with
ContextSnapshot.reactivate()
- for each specific
ContextManager
:- calls to
ContextManager.getActiveContext
and - calls to
ContextManager.initializeNewContext
- calls to
All you need to do is add it to your classpath:
<dependency>
<groupId>nl.talsmasoftware.context</groupId>
<artifactId>context-propagation-metrics</artifactId>
<version>[see Maven badge above]</version>
</dependency>
That will add Timer
metrics to the default shared MetricRegistry
.
For more details on the metrics library, please see its documentation.