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");
}
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");
}
Aggregations