Search in sources :

Example 1 with SpanLogsDecoder

use of com.wavefront.ingester.SpanLogsDecoder in project java by wavefrontHQ.

the class PushAgent method startCustomTracingListener.

@VisibleForTesting
protected void startCustomTracingListener(final String strPort, ReportableEntityHandlerFactory handlerFactory, @Nullable WavefrontSender wfSender, SpanSampler sampler) {
    final int port = Integer.parseInt(strPort);
    registerPrefixFilter(strPort);
    registerTimestampFilter(strPort);
    if (proxyConfig.isHttpHealthCheckAllPorts())
        healthCheckManager.enableHealthcheck(port);
    WavefrontInternalReporter wfInternalReporter = null;
    if (wfSender != null) {
        wfInternalReporter = new WavefrontInternalReporter.Builder().prefixedWith("tracing.derived").withSource("custom_tracing").reportMinuteDistribution().build(wfSender);
        // Start the reporter
        wfInternalReporter.start(1, TimeUnit.MINUTES);
    }
    ChannelHandler channelHandler = new CustomTracingPortUnificationHandler(strPort, tokenAuthenticator, healthCheckManager, new SpanDecoder("unknown"), new SpanLogsDecoder(), preprocessors.get(strPort), handlerFactory, sampler, () -> entityProps.get(ReportableEntityType.TRACE).isFeatureDisabled(), () -> entityProps.get(ReportableEntityType.TRACE_SPAN_LOGS).isFeatureDisabled(), wfSender, wfInternalReporter, proxyConfig.getTraceDerivedCustomTagKeys(), proxyConfig.getCustomTracingApplicationName(), proxyConfig.getCustomTracingServiceName());
    startAsManagedThread(port, new TcpIngester(createInitializer(channelHandler, port, proxyConfig.getTraceListenerMaxReceivedLength(), proxyConfig.getTraceListenerHttpBufferSize(), proxyConfig.getListenerIdleConnectionTimeout(), getSslContext(strPort), getCorsConfig(strPort)), port).withChildChannelOptions(childChannelOptions), "listener-custom-trace-" + port);
    logger.info("listening on port: " + strPort + " for custom trace data");
}
Also used : SpanLogsDecoder(com.wavefront.ingester.SpanLogsDecoder) SpanDecoder(com.wavefront.ingester.SpanDecoder) WavefrontInternalReporter(com.wavefront.internal.reporter.WavefrontInternalReporter) ChannelHandler(io.netty.channel.ChannelHandler) CustomTracingPortUnificationHandler(com.wavefront.agent.listeners.tracing.CustomTracingPortUnificationHandler) ReportPoint(wavefront.report.ReportPoint) TcpIngester(com.wavefront.ingester.TcpIngester) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Example 2 with SpanLogsDecoder

use of com.wavefront.ingester.SpanLogsDecoder in project java by wavefrontHQ.

the class PushAgent method startTraceListener.

protected void startTraceListener(final String strPort, ReportableEntityHandlerFactory handlerFactory, SpanSampler sampler) {
    final int port = Integer.parseInt(strPort);
    registerPrefixFilter(strPort);
    registerTimestampFilter(strPort);
    if (proxyConfig.isHttpHealthCheckAllPorts())
        healthCheckManager.enableHealthcheck(port);
    ChannelHandler channelHandler = new TracePortUnificationHandler(strPort, tokenAuthenticator, healthCheckManager, new SpanDecoder("unknown"), new SpanLogsDecoder(), preprocessors.get(strPort), handlerFactory, sampler, () -> entityProps.get(ReportableEntityType.TRACE).isFeatureDisabled(), () -> entityProps.get(ReportableEntityType.TRACE_SPAN_LOGS).isFeatureDisabled());
    startAsManagedThread(port, new TcpIngester(createInitializer(channelHandler, port, proxyConfig.getTraceListenerMaxReceivedLength(), proxyConfig.getTraceListenerHttpBufferSize(), proxyConfig.getListenerIdleConnectionTimeout(), getSslContext(strPort), getCorsConfig(strPort)), port).withChildChannelOptions(childChannelOptions), "listener-plaintext-trace-" + port);
    logger.info("listening on port: " + strPort + " for trace data");
}
Also used : SpanLogsDecoder(com.wavefront.ingester.SpanLogsDecoder) TracePortUnificationHandler(com.wavefront.agent.listeners.tracing.TracePortUnificationHandler) SpanDecoder(com.wavefront.ingester.SpanDecoder) ChannelHandler(io.netty.channel.ChannelHandler) ReportPoint(wavefront.report.ReportPoint) TcpIngester(com.wavefront.ingester.TcpIngester)

Aggregations

SpanDecoder (com.wavefront.ingester.SpanDecoder)2 SpanLogsDecoder (com.wavefront.ingester.SpanLogsDecoder)2 TcpIngester (com.wavefront.ingester.TcpIngester)2 ChannelHandler (io.netty.channel.ChannelHandler)2 ReportPoint (wavefront.report.ReportPoint)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 CustomTracingPortUnificationHandler (com.wavefront.agent.listeners.tracing.CustomTracingPortUnificationHandler)1 TracePortUnificationHandler (com.wavefront.agent.listeners.tracing.TracePortUnificationHandler)1 WavefrontInternalReporter (com.wavefront.internal.reporter.WavefrontInternalReporter)1