예제 #1
0
  @Around(
      value =
          "(execution(@HistogramMetric * * (..)) || initialization(@HistogramMetric new(..))) && @annotation(histogramMetric)",
      argNames = "thisJoinPoint, histogramMetric")
  public Object aroundHistogramMetricMethod(
      ProceedingJoinPoint thisJoinPoint, HistogramMetric histogramMetric) throws Throwable {

    return engage(
        thisJoinPoint,
        histogramMetric.value(),
        histogramMetric.alias(),
        Metrics.buildHistogram(histogramMetric.samples()));
  }