Class MonitoredEndpointAspect

java.lang.Object
com.nmontytskyi.monitoring.starter.aspect.MonitoredEndpointAspect

public class MonitoredEndpointAspect extends Object
AOP aspect that intercepts methods annotated with MonitoredEndpoint and records a MetricSnapshot for each invocation.

For every matched method call the aspect measures wall-clock response time, captures the resulting HealthStatus (UP on success, DOWN on exception), and hands the snapshot to the shared MetricsBuffer for asynchronous delivery to the monitoring server.

This aspect is registered only when monitoring.enabled=true (the default). It complements AllEndpointsAspect, which covers all @RestController methods when monitoring.track-all-endpoints=true.

Author:
Nazar Montytskyi
See Also:
  • Constructor Details

    • MonitoredEndpointAspect

      public MonitoredEndpointAspect()
  • Method Details