@Override
    public GeneratedMessageV3 toMessage(SpanType message) {
        if (message instanceof SpanChunk) {
            final SpanChunk spanChunk = (SpanChunk) message;
            return buildPSpanChunk(spanChunk);
        }
        if (message instanceof Span) {
            final Span span = (Span) message;
            return buildPSpan(span);
        }
        return null;
    }
Not thread safe

@author Woonduk Kang(emeroad)
agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/grpc/GrpcSpanMessageConverter.java