Class TrackMetricAspect
java.lang.Object
com.nmontytskyi.monitoring.starter.aspect.TrackMetricAspect
AOP aspect that intercepts methods annotated with
TrackMetric and records
execution timing and success/failure status into the MetricsBuffer.
Metrics are buffered and flushed in batches to the monitoring server, minimising per-call HTTP overhead compared to the individual-push model.
All exceptions are re-thrown after recording so business logic is unaffected.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaround(org.aspectj.lang.ProceedingJoinPoint pjp, TrackMetric trackMetric)
-
Constructor Details
-
TrackMetricAspect
public TrackMetricAspect()
-
-
Method Details
-
around
public Object around(org.aspectj.lang.ProceedingJoinPoint pjp, TrackMetric trackMetric) throws Throwable - Throws:
Throwable
-