use of com.wavefront.agent.listeners.tracing.JaegerGrpcCollectorHandler in project java by wavefrontHQ.
the class PushAgent method startTraceJaegerGrpcListener.
protected void startTraceJaegerGrpcListener(final String strPort, ReportableEntityHandlerFactory handlerFactory, @Nullable WavefrontSender wfSender, SpanSampler sampler) {
if (tokenAuthenticator.authRequired()) {
logger.warning("Port: " + strPort + " is not compatible with HTTP authentication, ignoring");
return;
}
final int port = Integer.parseInt(strPort);
startAsManagedThread(port, () -> {
activeListeners.inc();
try {
io.grpc.Server server = NettyServerBuilder.forPort(port).addService(new JaegerGrpcCollectorHandler(strPort, handlerFactory, wfSender, () -> entityProps.get(ReportableEntityType.TRACE).isFeatureDisabled(), () -> entityProps.get(ReportableEntityType.TRACE_SPAN_LOGS).isFeatureDisabled(), preprocessors.get(strPort), sampler, proxyConfig.getTraceJaegerApplicationName(), proxyConfig.getTraceDerivedCustomTagKeys())).build();
server.start();
} catch (Exception e) {
logger.log(Level.SEVERE, "Jaeger gRPC trace collector exception", e);
} finally {
activeListeners.dec();
}
}, "listener-jaeger-grpc-" + strPort);
logger.info("listening on port: " + strPort + " for trace data " + "(Jaeger Protobuf format over gRPC)");
}
Aggregations