pinpoint-apm/pinpoint · error · UnsupportedOperationException
unknown version :${version}
Error message
unknown version :${version} What it means
GrpcSpanProcessorProvider.get() only supports TraceDataFormatVersion.V2 and throws UnsupportedOperationException('unknown version') for any other version. It selects the SpanProcessor that converts span/span-chunk builders into gRPC protocol buffers; without a matching version there is no safe processor to return. The fail-fast throw prevents silently emitting incorrectly encoded span data to the collector.
Source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/provider/grpc/GrpcSpanProcessorProvider.java:43
import com.navercorp.pinpoint.profiler.context.compress.SpanProcessor;
import java.util.Objects;
public class GrpcSpanProcessorProvider implements Provider<SpanProcessor<PSpan.Builder, PSpanChunk.Builder>> {
private final TraceDataFormatVersion version;
@Inject
public GrpcSpanProcessorProvider(TraceDataFormatVersion version) {
this.version = Objects.requireNonNull(version, "version");
}
@Override
public SpanProcessor<PSpan.Builder, PSpanChunk.Builder> get() {
if (version == TraceDataFormatVersion.V2) {
return new GrpcSpanProcessorV2();
}
throw new UnsupportedOperationException("unknown version :" + version);
}
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Set the trace data format version to V2 in the profiler configuration (profiler.traceformat=v2)
- Upgrade the agent version so V2 is the supported format and remove legacy V1 settings
- If a new version is needed, implement a GrpcSpanProcessor for it and add a branch in get()
- Check the TraceDataFormatVersion provider wiring to ensure it only resolves supported versions
Example fix
// before
if (version == TraceDataFormatVersion.V2) {
return new GrpcSpanProcessorV2();
}
throw new UnsupportedOperationException("unknown version :" + version);
// after
if (version == TraceDataFormatVersion.V2) {
return new GrpcSpanProcessorV2();
}
if (version == TraceDataFormatVersion.V1) {
logger.info("TraceDataFormatVersion V1 is deprecated; falling back to V2 processor");
return new GrpcSpanProcessorV2();
}
throw new UnsupportedOperationException("unknown version :" + version); Defensive patterns
Strategy: validation
Validate before calling
if (version != TraceDataFormatVersion.V2) {
throw new IllegalArgumentException("Only TraceDataFormatVersion.V2 is supported for gRPC span processing, got: " + version);
} Type guard
boolean isV2(TraceDataFormatVersion v) { return v == TraceDataFormatVersion.V2; } Try / catch
try {
SpanProcessor<?, ?> processor = grpcSpanProcessorProvider.get();
} catch (UnsupportedOperationException e) {
logger.error("Unsupported trace data format version configured: {}", e.getMessage());
throw e;
} Prevention
- Always configure profiler.traceformat=v2 when using the gRPC transport
- Remove legacy V1 trace format settings after upgrading to a gRPC-based agent
- Add a startup check that validates the configured version before wiring span processing
When it happens
Trigger: get() is called while the injected version field is not TraceDataFormatVersion.V2 — e.g. a different TraceDataFormatVersion enum value (or V1/null) was resolved by the corresponding provider based on profiler configuration.
Common situations: Setting an unsupported trace data format version in pinpoint config (profiler.traceformat), running an agent built for V1 data format, or version mismatch after upgrading Pinpoint where a legacy format is still configured.
Related errors
- unsupported ObjectType:${objectName}
- list size not same
- spanEventList is empty.
- first SpanEvent is null
- unsupported type:${dataType}
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/fa61f267cd44710c.
Report an issue: GitHub.