use of com.navercorp.pinpoint.collector.receiver.grpc.PinpointGrpcServer in project pinpoint by naver.
the class GrpcCommandService method commandStreamActiveThreadCount.
@Override
public StreamObserver<PCmdActiveThreadCountRes> commandStreamActiveThreadCount(StreamObserver<Empty> streamConnectionManagerObserver) {
final Long transportId = getTransportId();
PinpointGrpcServer pinpointGrpcServer = grpcServerRepository.get(transportId);
if (pinpointGrpcServer == null) {
logger.info("{} => local. Can't find PinpointGrpcServer(transportId={})", getAgentInfo().getAgentKey(), transportId);
streamConnectionManagerObserver.onError(new StatusException(Status.NOT_FOUND));
return DisabledStreamObserver.instance();
}
try {
return activeThreadCountService.handle(pinpointGrpcServer, streamConnectionManagerObserver);
} catch (IllegalArgumentException e) {
logger.warn("Failed to handle activeThreadCountService. agentKey={}, transportId={}", getAgentInfo().getAgentKey(), transportId, e);
streamConnectionManagerObserver.onError(Status.INTERNAL.withDescription("Internal Server Error").asException());
return DisabledStreamObserver.instance();
}
}
Aggregations