Search in sources :

Example 1 with JvmInformation

use of com.navercorp.pinpoint.profiler.JvmInformation 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();
}
Also used : PJvmInfo(com.navercorp.pinpoint.grpc.trace.PJvmInfo) AgentInformation(com.navercorp.pinpoint.profiler.AgentInformation) ServerMetaData(com.navercorp.pinpoint.bootstrap.context.ServerMetaData) PServerMetaData(com.navercorp.pinpoint.grpc.trace.PServerMetaData) PAgentInfo(com.navercorp.pinpoint.grpc.trace.PAgentInfo) PServerMetaData(com.navercorp.pinpoint.grpc.trace.PServerMetaData) JvmInformation(com.navercorp.pinpoint.profiler.JvmInformation)

Example 2 with JvmInformation

use of com.navercorp.pinpoint.profiler.JvmInformation in project pinpoint by naver.

the class AgentGrpcDataSenderTestMain method newAgentInfo.

private AgentInfo newAgentInfo() {
    AgentInformation agentInformation = new DefaultAgentInformation(AGENT_ID, AGENT_NAME, APPLICATION_NAME, true, START_TIME, 99, "", "", ServiceType.TEST_STAND_ALONE, "1.0", "1.0");
    JvmInformation jvmInformation = new JvmInformation("1.0", JvmGcType.G1);
    ServerMetaData serverInfo = new DefaultServerMetaData("serverInfo", Collections.<String>emptyList(), Collections.<Integer, String>emptyMap(), Collections.<ServiceInfo>emptyList());
    return new AgentInfo(agentInformation, serverInfo, jvmInformation);
}
Also used : AgentInformation(com.navercorp.pinpoint.profiler.AgentInformation) DefaultAgentInformation(com.navercorp.pinpoint.profiler.DefaultAgentInformation) AgentInfo(com.navercorp.pinpoint.profiler.metadata.AgentInfo) DefaultAgentInformation(com.navercorp.pinpoint.profiler.DefaultAgentInformation) DefaultServerMetaData(com.navercorp.pinpoint.profiler.context.DefaultServerMetaData) ServerMetaData(com.navercorp.pinpoint.bootstrap.context.ServerMetaData) DefaultServerMetaData(com.navercorp.pinpoint.profiler.context.DefaultServerMetaData) JvmInformation(com.navercorp.pinpoint.profiler.JvmInformation)

Aggregations

ServerMetaData (com.navercorp.pinpoint.bootstrap.context.ServerMetaData)2 AgentInformation (com.navercorp.pinpoint.profiler.AgentInformation)2 JvmInformation (com.navercorp.pinpoint.profiler.JvmInformation)2 PAgentInfo (com.navercorp.pinpoint.grpc.trace.PAgentInfo)1 PJvmInfo (com.navercorp.pinpoint.grpc.trace.PJvmInfo)1 PServerMetaData (com.navercorp.pinpoint.grpc.trace.PServerMetaData)1 DefaultAgentInformation (com.navercorp.pinpoint.profiler.DefaultAgentInformation)1 DefaultServerMetaData (com.navercorp.pinpoint.profiler.context.DefaultServerMetaData)1 AgentInfo (com.navercorp.pinpoint.profiler.metadata.AgentInfo)1