pinpoint-apm/pinpoint · warning · UnsupportedOperationException

UNSUPPORTED_OPERATION

Error message

UNSUPPORTED_OPERATION

What it means

DisableSpanEventRecorder is a no-op recorder used when a span event is disabled (e.g. asynchronous/optional recording that should do nothing). Frame object storage is intentionally unsupported, so getFrameObject() always throws UnsupportedOperationException. Hitting it means code called a storage method on a disabled recorder that can never hold frame state.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/recorder/DisableSpanEventRecorder.java:234

    @Override
    public void recordAttribute(String key, List<AttributeValue> values) {

    }

    @Override
    public void recordAttribute(String key, Map<String, AttributeValue> values) {

    }

    @Override
    public Object attachFrameObject(Object frameObject) {
        return null;
    }

    @Override
    public Object getFrameObject() {
        throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);
    }

    @Override
    public Object detachFrameObject() {
        throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);
    }


}

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Check whether the trace/recorder is disabled before calling frame object APIs
  2. Use a recorder that supports frame objects (SpanEventRecorder from an active trace) when frame state is needed
  3. Rework interceptor logic so frame object attach/get/detach is skipped for disabled traces
  4. Report to the plugin author that it must handle DisableSpanEventRecorder

Example fix

// before
Object prev = recorder.getFrameObject();
// after
if (!(recorder instanceof DisableSpanEventRecorder)) {
    Object prev = recorder.getFrameObject();
}
Defensive patterns

Strategy: type-guard

Type guard

boolean supportsFrameObjects(SpanEventRecorder r) {
    return !(r instanceof DisableSpanEventRecorder);
}

Try / catch

try {
    Object frame = recorder.getFrameObject();
} catch (UnsupportedOperationException e) {
    logger.debug("Frame objects unsupported on this recorder");
    return null;
}

Prevention

When it happens

Trigger: Any code path that calls getFrameObject() on a DisableSpanEventRecorder — typically when the active trace is a DisableTrace and someone still invokes frame-object APIs on the SpanEventRecorder.

Common situations: A plugin/interceptor that unconditionally stores and reads frame objects (e.g. for async invocation tracking) but runs on a disabled trace; plugin code not checking whether recording is enabled before using frame objects.

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/47a1ec5ca9dfa972. Report an issue: GitHub.