Search in sources :

Example 1 with JaegerGrpcCollectorHandler

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)");
}
Also used : JaegerGrpcCollectorHandler(com.wavefront.agent.listeners.tracing.JaegerGrpcCollectorHandler) ReportPoint(wavefront.report.ReportPoint) ConfigurationException(com.wavefront.agent.config.ConfigurationException) BindException(java.net.BindException)

Aggregations

ConfigurationException (com.wavefront.agent.config.ConfigurationException)1 JaegerGrpcCollectorHandler (com.wavefront.agent.listeners.tracing.JaegerGrpcCollectorHandler)1 BindException (java.net.BindException)1 ReportPoint (wavefront.report.ReportPoint)1