pinpoint-apm/pinpoint · error · IllegalArgumentException

Unknown InstrumentEngine:${instrumentEngine}

Error message

Unknown InstrumentEngine:${instrumentEngine}

What it means

InstrumentEngineProvider.get() selects the bytecode instrumentation engine; only ASM (and the legacy JAVASSIST branch earlier in the method) is recognized. Any other configured engine logs a warning and throws IllegalArgumentException('Unknown InstrumentEngine:<value>').

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/provider/InstrumentEngineProvider.java:82

    }

    public InstrumentEngine get() {
        final String instrumentEngine = instrumentConfig.getProfileInstrumentEngine().toUpperCase();
        if (InstrumentConfig.INSTRUMENT_ENGINE_ASM.equals(instrumentEngine)) {
            logger.info("ASM InstrumentEngine");

            // WARNING must be singleton
            final InterceptorDefinitionFactory interceptorDefinitionFactory = new InterceptorDefinitionFactory();
            // WARNING must be singleton
            final ScopeFactory scopeFactory = new ScopeFactory();
            EngineComponent engineComponent = new DefaultEngineComponent(objectBinderFactory, interceptorDefinitionFactory, apiMetaDataServiceProvider, scopeFactory, interceptorHolderIdGenerator);
            DefineClass defineClass = DefineClassFactory.getDefineClass();
            return new ASMEngine(instrumentation, engineComponent, defineClass);

        } else {
            logger.warn("Unknown InstrumentEngine:{}", instrumentEngine);

            throw new IllegalArgumentException("Unknown InstrumentEngine:" + instrumentEngine);
        }
    }
}

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Set profiler.instrument.engine=ASM (or JAVASSIST if using the legacy engine)
  2. Check exact spelling/case against the enum constant the config is parsed into
  3. Upgrade the agent if you need an engine introduced in a newer Pinpoint release
  4. Review the preceding WARN log line which echoes the invalid value

Example fix

// before
profiler.instrument.engine=ByteBuddy
// after
profiler.instrument.engine=ASM
Defensive patterns

Strategy: validation

Validate before calling

String engine = config.readString("profiler.instrument.engine", "ASM");
if (!engine.equals("ASM") && !engine.equals("JAVASSIST")) {
    throw new IllegalArgumentException("profiler.instrument.engine must be ASM or JAVASSIST, got: " + engine);
}

Try / catch

try { engineProvider.get(); } catch (IllegalArgumentException e) { logger.error("Fix profiler.instrument.engine; {} is unsupported", engineValue); }

Prevention

When it happens

Trigger: The profiler.instrument.engine config value is neither 'ASM' nor 'JAVASSIST' (case-sensitively matched), reaching the else branch during agent module configuration.

Common situations: Typo such as 'asm' in lowercase when matching is case-sensitive, copying config from another agent (e.g. 'bytebuddy'), or experimenting with an engine this Pinpoint version does not ship.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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