pinpoint-apm/pinpoint · warning

No methods are intercepted. target

Error message

No methods are intercepted. target:{}, interceptor:{}, methodFilter:{}

What it means

An overload of ASMClass's interceptor-adding API (taking a raw MethodFilter object) logs this warning when the supplied filter rejects every declared method of the class, leaving interceptorId at -1. As with the name-based variant, no interception point was installed for the target class and the plugin's interceptor never runs.

Solutions

  1. Debug the filter's accept() against the class's declared method list (classNode.methods)
  2. Relax overly strict modifier/descriptor conditions in the filter
  3. Confirm the transformer is applied to the class that actually declares the method, not a subclass
  4. Add a test that asserts interceptorId != -1 for the target class to catch regressions

Example fix

// before
if (Modifier.isPublic(opcodes) && method.getName().equals("execute") && method.getParameterTypes().isEmpty()) { ... }
// after
if (method.getName().equals("execute")) { ... } // drop the parameter-types clause that never matched
Defensive patterns

Strategy: validation

Validate before calling

boolean anyMatched = Arrays.stream(targetClass.getDeclaredMethods()).anyMatch(m -> methodFilter.accept(wrap(m))); if (!anyMatched) { /* loosen filter before instrumentation */ }

Type guard

function filterMatchesAny(clazz, filter) { return clazz.getDeclaredMethods().some(m => { try { return filter.accept(m); } catch (e) { return false; } }); }

Try / catch

if (interceptorId == -1) { logger.warn("No methods are intercepted. target:{}, interceptor:{}, methodFilter:{}", internalName, interceptorClass, filter.getClass().getName()); }

Prevention

When it happens

Trigger: Programmatic plugin API addInterceptor(methodFilter, ...) / addScopedInterceptor invoked against a class whose declared methods all fail the custom filter's accept() predicate.

Common situations: Custom MethodFilter written against the wrong target class; filter conditions (modifiers, descriptors, annotations) too strict; target class refactored so its methods no longer match.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/06f705a30b1d65e1. Report an issue: GitHub.

Appendix: source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java:623

        Objects.requireNonNull(constructorArgs, "constructorArgs");
        Objects.requireNonNull(interceptorScope, "interceptorScope");
        Objects.requireNonNull(executionPolicy, "executionPolicy");
        return addScopedInterceptor0(filter, interceptorClass, constructorArgs, interceptorScope, executionPolicy);
    }

    private int addScopedInterceptor0(MethodFilter filter, Class<? extends Interceptor> interceptorClass, Object[] constructorArgs, InterceptorScope interceptorScope, ExecutionPolicy executionPolicy) throws InstrumentException {
        int interceptorId = -1;
        for (InstrumentMethod m : getDeclaredMethods(filter)) {
            if (interceptorId != -1) {
                m.addInterceptor(interceptorId);
            } else {
                // TODO casting fix
                interceptorId = ((ASMMethod) m).addInterceptorInternal(interceptorClass, constructorArgs, interceptorScope, executionPolicy);
            }
        }

        if (interceptorId == -1) {
            logger.warn("No methods are intercepted. target:{}, interceptor:{}, methodFilter:{}", this.classNode.getInternalName(), interceptorClass, filter.getClass().getName());
        }

        return interceptorId;
    }

    @Override
    public List<InstrumentClass> getNestedClasses(ClassFilter filter) {
        Objects.requireNonNull(filter, "filter");

        final List<InstrumentClass> nestedClasses = new ArrayList<>();
        for (ASMClassNodeAdapter innerClassNode : this.classNode.getInnerClasses()) {
            final ASMNestedClass nestedClass = new ASMNestedClass(engineComponent, this.pluginContext, innerClassNode);
            if (filter.accept(nestedClass)) {
                nestedClasses.add(nestedClass);
            }
        }

        return nestedClasses;

View on GitHub (pinned to 744c3d3075)