Search in sources :

Example 1 with AgentInfo

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;
}
Also used : AgentInfo(com.navercorp.pinpoint.profiler.metadata.AgentInfo) ServerMetaData(com.navercorp.pinpoint.bootstrap.context.ServerMetaData)

Example 2 with 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);
}
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)

Example 3 with AgentInfo

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();
}
Also used : NameResolverProvider(io.grpc.NameResolverProvider) GrpcNameResolverProvider(com.navercorp.pinpoint.profiler.context.provider.grpc.GrpcNameResolverProvider) HeaderFactory(com.navercorp.pinpoint.grpc.client.HeaderFactory) AgentHeaderFactory(com.navercorp.pinpoint.grpc.AgentHeaderFactory) ChannelFactory(com.navercorp.pinpoint.grpc.client.ChannelFactory) ChannelFactoryBuilder(com.navercorp.pinpoint.grpc.client.ChannelFactoryBuilder) DefaultChannelFactoryBuilder(com.navercorp.pinpoint.grpc.client.DefaultChannelFactoryBuilder) DefaultChannelFactoryBuilder(com.navercorp.pinpoint.grpc.client.DefaultChannelFactoryBuilder) MetaDataType(com.navercorp.pinpoint.profiler.metadata.MetaDataType) GrpcNameResolverProvider(com.navercorp.pinpoint.profiler.context.provider.grpc.GrpcNameResolverProvider) GrpcMetadataMessageConverter(com.navercorp.pinpoint.profiler.context.grpc.GrpcMetadataMessageConverter) AgentInfo(com.navercorp.pinpoint.profiler.metadata.AgentInfo) DnsExecutorServiceProvider(com.navercorp.pinpoint.profiler.context.provider.grpc.DnsExecutorServiceProvider) ClientOption(com.navercorp.pinpoint.grpc.client.config.ClientOption) GeneratedMessageV3(com.google.protobuf.GeneratedMessageV3) AgentHeaderFactory(com.navercorp.pinpoint.grpc.AgentHeaderFactory)

Aggregations

AgentInfo (com.navercorp.pinpoint.profiler.metadata.AgentInfo)3 ServerMetaData (com.navercorp.pinpoint.bootstrap.context.ServerMetaData)2 GeneratedMessageV3 (com.google.protobuf.GeneratedMessageV3)1 AgentHeaderFactory (com.navercorp.pinpoint.grpc.AgentHeaderFactory)1 ChannelFactory (com.navercorp.pinpoint.grpc.client.ChannelFactory)1 ChannelFactoryBuilder (com.navercorp.pinpoint.grpc.client.ChannelFactoryBuilder)1 DefaultChannelFactoryBuilder (com.navercorp.pinpoint.grpc.client.DefaultChannelFactoryBuilder)1 HeaderFactory (com.navercorp.pinpoint.grpc.client.HeaderFactory)1 ClientOption (com.navercorp.pinpoint.grpc.client.config.ClientOption)1 AgentInformation (com.navercorp.pinpoint.profiler.AgentInformation)1 DefaultAgentInformation (com.navercorp.pinpoint.profiler.DefaultAgentInformation)1 JvmInformation (com.navercorp.pinpoint.profiler.JvmInformation)1 DefaultServerMetaData (com.navercorp.pinpoint.profiler.context.DefaultServerMetaData)1 GrpcMetadataMessageConverter (com.navercorp.pinpoint.profiler.context.grpc.GrpcMetadataMessageConverter)1 DnsExecutorServiceProvider (com.navercorp.pinpoint.profiler.context.provider.grpc.DnsExecutorServiceProvider)1 GrpcNameResolverProvider (com.navercorp.pinpoint.profiler.context.provider.grpc.GrpcNameResolverProvider)1 MetaDataType (com.navercorp.pinpoint.profiler.metadata.MetaDataType)1 NameResolverProvider (io.grpc.NameResolverProvider)1