aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/instrumentation/AspectJWeaverMissingWarning.scala
blob: 5ca4481ef5c38c5a775b7bf956bf5cae84f48377 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package kamon.instrumentation

import _root_.akka.event.EventStream
import org.aspectj.lang.ProceedingJoinPoint
import org.aspectj.lang.annotation.{ Around, Pointcut, Aspect }

@Aspect
class AspectJWeaverMissingWarning {

  @Pointcut("execution(* kamon.metric.MetricsExtension.printInitializationMessage(..)) && args(eventStream, *)")
  def printInitializationMessage(eventStream: EventStream): Unit = {}

  @Around("printInitializationMessage(eventStream)")
  def aroundPrintInitializationMessage(pjp: ProceedingJoinPoint, eventStream: EventStream): Unit = {
    pjp.proceed(Array[AnyRef](eventStream, Boolean.box(true)))
  }
}