{"record":{"id":"d6d44ce12633225f","repo":"pinpoint-apm/pinpoint","slug":"unsupported-operation-d6d44c","errorCode":null,"errorMessage":"UNSUPPORTED_OPERATION","messagePattern":"UNSUPPORTED_OPERATION","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"warning","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/recorder/DisableSpanRecorder.java","lineNumber":272,"sourceCode":"        return getShared().setUriTemplate(uriTemplateFilter.filter(uriTemplate), force);\n    }\n\n    @Override\n    public boolean recordUriHttpMethod(String httpMethod) {\n        return getShared().setHttpMethods(httpMethod);\n    }\n\n    @Override\n    public void recordParentServiceName(String parentServiceName) {\n    }\n\n    private Shared getShared() {\n        return traceRoot.getShared();\n    }\n\n    @Override\n    public Object attachFrameObject(Object frameObject) {\n        throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);\n    }\n\n    @Override\n    public Object getFrameObject() {\n        throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);\n    }\n\n    @Override\n    public Object detachFrameObject() {\n        throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);\n    }\n}\n","sourceCodeStart":254,"sourceCodeEnd":285,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/recorder/DisableSpanRecorder.java#L254-L285","documentation":"DisableSpanRecorder is the no-op span recorder for disabled traces; attachFrameObject() always throws UnsupportedOperationException because no span is recorded and no per-span frame state can be stored. Hitting it means a caller attempted to attach state to a span that is intentionally not being recorded.","triggerScenarios":"Calling attachFrameObject(frameObject) on a DisableSpanRecorder — e.g. an interceptor that stores request-scoped state in the span recorder while the current trace is disabled.","commonSituations":"Plugins or instrumentation code written for normal traces being executed when profiling is disabled for the request (e.g. sampling turned off); missing checks for DisableTrace/DisableSpanRecorder before frame-object use.","solutions":["Check whether the recorder is a DisableSpanRecorder before attaching frame objects","Store frame state in an application-level context instead of the span recorder when tracing is disabled","Ensure interceptors short-circuit their work when the trace is disabled","Use SpanRecorder APIs that are safe on disabled traces (the no-op ones)"],"exampleFix":"// before\nrecorder.attachFrameObject(myState);\n// after\nif (!(recorder instanceof DisableSpanRecorder)) {\n    recorder.attachFrameObject(myState);\n}","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"boolean supportsFrameObjects(SpanRecorder r) {\n    return !(r instanceof DisableSpanRecorder);\n}","tryCatchPattern":"try {\n    recorder.attachFrameObject(state);\n} catch (UnsupportedOperationException e) {\n    logger.debug(\"Disabled span recorder; state not stored\");\n}","preventionTips":["Check trace.enabled()/recorder type before storing request state in spans","Keep interceptor state in an app-level context rather than the span recorder","Include disabled-trace scenarios in interceptor unit tests"],"tags":["pinpoint-profiler","noop-recorder","unsupported-api"],"backgroundTag":"unsupported-operation","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}