use of com.wavefront.ingester.ReportPointDecoder in project java by wavefrontHQ.
the class InteractivePreprocessorTester method interactiveTest.
@Override
public boolean interactiveTest() {
String line = stdin.nextLine();
if (entityType == ReportableEntityType.TRACE) {
ReportableEntityHandler<Span, String> handler = factory.getHandler(entityType, port);
SpanUtils.preprocessAndHandleSpan(line, SPAN_DECODER, handler, handler::report, preprocessorSupplier, null, x -> true);
} else {
ReportableEntityHandler<ReportPoint, String> handler = factory.getHandler(entityType, port);
ReportableEntityDecoder<String, ReportPoint> decoder;
if (DataFormat.autodetect(line) == DataFormat.HISTOGRAM) {
decoder = new ReportPointDecoderWrapper(new HistogramDecoder());
} else {
decoder = new ReportPointDecoder(() -> "unknown", customSourceTags);
}
WavefrontPortUnificationHandler.preprocessAndHandlePoint(line, decoder, handler, preprocessorSupplier, null, "");
}
return stdin.hasNext();
}
Aggregations