Search in sources :

Example 1 with PThreadLightDump

use of com.navercorp.pinpoint.grpc.trace.PThreadLightDump in project pinpoint by naver.

the class GrpcActiveThreadLightDumpService method createActiveThreadDump.

private PActiveThreadLightDump createActiveThreadDump(ThreadDump threadDump) {
    final ActiveTraceSnapshot activeTraceInfo = threadDump.getActiveTraceSnapshot();
    final ThreadInfo threadInfo = threadDump.getThreadInfo();
    PThreadLightDump pThreadLightDump = createPThreadLightDump(threadInfo);
    PActiveThreadLightDump.Builder builder = PActiveThreadLightDump.newBuilder();
    builder.setStartTime(activeTraceInfo.getStartTime());
    builder.setLocalTraceId(activeTraceInfo.getLocalTransactionId());
    builder.setThreadDump(pThreadLightDump);
    if (activeTraceInfo.isSampled()) {
        builder.setSampled(true);
        builder.setTransactionId(activeTraceInfo.getTransactionId());
        builder.setEntryPoint(activeTraceInfo.getEntryPoint());
    }
    return builder.build();
}
Also used : ThreadInfo(java.lang.management.ThreadInfo) PActiveThreadLightDump(com.navercorp.pinpoint.grpc.trace.PActiveThreadLightDump) ActiveTraceSnapshot(com.navercorp.pinpoint.profiler.context.active.ActiveTraceSnapshot) PThreadLightDump(com.navercorp.pinpoint.grpc.trace.PThreadLightDump)

Aggregations

PActiveThreadLightDump (com.navercorp.pinpoint.grpc.trace.PActiveThreadLightDump)1 PThreadLightDump (com.navercorp.pinpoint.grpc.trace.PThreadLightDump)1 ActiveTraceSnapshot (com.navercorp.pinpoint.profiler.context.active.ActiveTraceSnapshot)1 ThreadInfo (java.lang.management.ThreadInfo)1