use of com.navercorp.pinpoint.grpc.trace.PJvmInfo in project pinpoint by naver.
the class GrpcAgentInfoMessageConverter method convertJvmInfo.
private PJvmInfo convertJvmInfo(final JvmInformation jvmInformation) {
final PJvmInfo.Builder builder = PJvmInfo.newBuilder();
builder.setVmVersion(jvmInformation.getJvmVersion());
PJvmGcType gcType = this.jvmGcTypeMessageConverter.toMessage(jvmInformation.getJvmGcType());
builder.setGcType(gcType);
return builder.build();
}
use of com.navercorp.pinpoint.grpc.trace.PJvmInfo in project pinpoint by naver.
the class GrpcAgentInfoMessageConverter method convertAgentInfo.
public PAgentInfo convertAgentInfo(final AgentInfo agentInfo) {
final AgentInformation agentInformation = agentInfo.getAgentInformation();
final PAgentInfo.Builder builder = PAgentInfo.newBuilder();
builder.setIp(agentInformation.getHostIp());
builder.setHostname(agentInformation.getMachineName());
builder.setPorts("");
builder.setContainer(agentInformation.isContainer());
builder.setPid(agentInformation.getPid());
builder.setServiceType(agentInformation.getServerType().getCode());
builder.setVmVersion(agentInformation.getJvmVersion());
builder.setAgentVersion(Version.VERSION);
final ServerMetaData serverMetaData = agentInfo.getServerMetaData();
if (serverMetaData != null) {
final PServerMetaData tServerMetaData = convertServerMetaData(agentInfo.getServerMetaData());
builder.setServerMetaData(tServerMetaData);
}
final JvmInformation jvmInformation = agentInfo.getJvmInfo();
if (jvmInformation != null) {
final PJvmInfo tJvmInfo = convertJvmInfo(agentInfo.getJvmInfo());
builder.setJvmInfo(tJvmInfo);
}
return builder.build();
}
use of com.navercorp.pinpoint.grpc.trace.PJvmInfo in project pinpoint by naver.
the class GrpcAgentInfoBoMapper method map.
public AgentInfoBo map(final PAgentInfo agentInfo, final Header header) {
final String agentId = header.getAgentId();
final String agentName = header.getAgentName();
final String applicationName = header.getApplicationName();
final long startTime = header.getAgentStartTime();
final String hostName = agentInfo.getHostname();
final String ip = agentInfo.getIp();
final String ports = agentInfo.getPorts();
final short serviceType = (short) agentInfo.getServiceType();
final int pid = agentInfo.getPid();
final String vmVersion = agentInfo.getVmVersion();
final String agentVersion = agentInfo.getAgentVersion();
final long endTimeStamp = agentInfo.getEndTimestamp();
final int endStatus = agentInfo.getEndStatus();
final boolean container = agentInfo.getContainer();
final AgentInfoBo.Builder builder = new AgentInfoBo.Builder();
builder.setHostName(hostName);
builder.setIp(ip);
builder.setPorts(ports);
builder.setAgentId(agentId);
builder.setAgentName(agentName);
builder.setApplicationName(applicationName);
builder.setServiceTypeCode(serviceType);
builder.setPid(pid);
builder.setVmVersion(vmVersion);
builder.setAgentVersion(agentVersion);
builder.setStartTime(startTime);
builder.setEndTimeStamp(endTimeStamp);
builder.setEndStatus(endStatus);
builder.isContainer(container);
if (agentInfo.hasServerMetaData()) {
final PServerMetaData serverMetaData = agentInfo.getServerMetaData();
builder.setServerMetaData(this.serverMetaDataBoMapper.map(serverMetaData));
}
if (agentInfo.hasJvmInfo()) {
final PJvmInfo jvmInfo = agentInfo.getJvmInfo();
builder.setJvmInfo(this.jvmInfoBoMapper.map(jvmInfo));
}
return builder.build();
}
Aggregations