Package com.netflix.genie.web.aspects
Class HealthCheckMetricsAspect
java.lang.Object
com.netflix.genie.web.aspects.HealthCheckMetricsAspect
Aspect around Spring Boot 'HealthIndicator' to publish metrics for status of individual indicator, as well as their
turnaround time.
- Since:
- 3.2.4
-
Constructor Summary
ConstructorsConstructorDescriptionHealthCheckMetricsAspect(io.micrometer.core.instrument.MeterRegistry registry) Autowired constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.boot.actuate.health.HealtharoundHealthIndicatorGetHealth(org.aspectj.lang.ProceedingJoinPoint joinPoint) Aspect around join point forHealthIndicator::getHealth(..).voidPointcut that matches invocations ofHealthIndicator::getHealth(..).
-
Constructor Details
-
HealthCheckMetricsAspect
public HealthCheckMetricsAspect(io.micrometer.core.instrument.MeterRegistry registry) Autowired constructor.- Parameters:
registry- metrics registry
-
-
Method Details
-
healthIndicatorGetHealth
public void healthIndicatorGetHealth()Pointcut that matches invocations ofHealthIndicator::getHealth(..). -
aroundHealthIndicatorGetHealth
public org.springframework.boot.actuate.health.Health aroundHealthIndicatorGetHealth(org.aspectj.lang.ProceedingJoinPoint joinPoint) throws Throwable Aspect around join point forHealthIndicator::getHealth(..). Measures the turnaround time for the indicator call and publishes it as metric, tagged with indicator class and the status reported.- Parameters:
joinPoint- the join point- Returns:
- health as reported by the indicator
- Throws:
Throwable- in case of exception in the join point
-