use of com.navercorp.pinpoint.profiler.metadata.AgentInfo in project pinpoint by naver.
the class AgentInfoFactory method createAgentInfo.
public AgentInfo createAgentInfo() {
final ServerMetaData serverMetaData = serverMetaDataRegistryService.getServerMetaData();
final AgentInfo agentInfo = new AgentInfo(agentInformation, serverMetaData, jvmInformation);
return agentInfo;
}
use of com.navercorp.pinpoint.profiler.metadata.AgentInfo 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);
}
use of com.navercorp.pinpoint.profiler.metadata.AgentInfo in project pinpoint by naver.
the class AgentGrpcDataSenderTestMain method request.
public void request() throws Exception {
MessageConverter<MetaDataType, GeneratedMessageV3> messageConverter = new GrpcMetadataMessageConverter();
HeaderFactory headerFactory = new AgentHeaderFactory(AGENT_ID, AGENT_NAME, APPLICATION_NAME, SERVICE_TYPE, START_TIME);
DnsExecutorServiceProvider dnsExecutorServiceProvider = new DnsExecutorServiceProvider();
GrpcNameResolverProvider grpcNameResolverProvider = new GrpcNameResolverProvider(dnsExecutorServiceProvider);
NameResolverProvider nameResolverProvider = grpcNameResolverProvider.get();
ChannelFactoryBuilder channelFactoryBuilder = new DefaultChannelFactoryBuilder("TestAgentGrpcDataSender");
channelFactoryBuilder.setHeaderFactory(headerFactory);
channelFactoryBuilder.setNameResolverProvider(nameResolverProvider);
channelFactoryBuilder.setClientOption(new ClientOption());
ChannelFactory channelFactory = channelFactoryBuilder.build();
AgentGrpcDataSender<MetaDataType> sender = new AgentGrpcDataSender<>("localhost", 9997, 1, messageConverter, reconnectExecutor, scheduledExecutorService, channelFactory, null);
AgentInfo agentInfo = newAgentInfo();
sender.request(agentInfo);
TimeUnit.SECONDS.sleep(60);
sender.stop();
}
Aggregations