Remove transitive runtime dependency on LatencyUtils by shakuzen · Pull Request #6883 · micrometer-metrics/micrometer (original) (raw)

Before this change, users depending on micrometer-core would get a transitive runtime dependency on LatencyUtils. After this change, that will no longer happen, reducing the number of dependencies brought in by micrometer-core.

For a very long time now, pause detection has been disabled by default, and accordingly users do not need the LatencyUtils dependency at runtime unless they enable pause detection in their application. This change checks if the ClockDriftPauseDetector is configured but LatencyUtils is not available. It will log a warning when this happens so users are aware while avoiding throwing a CNFE. Updates the documentation accordingly.

See #6863