Annotation Interface APMIgnore


@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented public @interface APMIgnore
应用性能监控忽略注解

标记不需要进行性能监控的类或方法

使用场景: 1. 健康检查接口(如/actuator/health) 2. 高频调用的简单方法(如getter/setter) 3. 不需要记录审计日志的内部方法

优先级: - 当类和方法同时标记时,方法级别的注解优先 - 如果类标记了@APM,但某个方法标记了@APMIgnore,则该方法不会被监控

使用示例:

@APM
public class MyService {

    public void monitoredMethod() {
        // 此方法会被监控
    }

    @APMIgnore
    public void ignoredMethod() {
        // 此方法不会被监控
    }
}
Author:
Kerbores(kerbores@riemann.tech)