Package io.micrometer.observation
Class Observations
java.lang.Object
io.micrometer.observation.Observations
Generator of observations bound to a static global registry. For use especially in
places where dependency injection of
ObservationRegistry is not possible for an
instrumented type.- Since:
- 1.14.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObservationRegistryRetrieves the current global instance.static voidResets registry to the original, empty one.static voidsetRegistry(ObservationRegistry registry) Sets a registry as the global registry.
-
Method Details
-
setRegistry
Sets a registry as the global registry.- Parameters:
registry- Registry to set.
-
resetRegistry
public static void resetRegistry()Resets registry to the original, empty one. -
getGlobalRegistry
Retrieves the current global instance.- Returns:
- Global registry.
-