// zipkin2.reporter.AsyncReporter
try { sender.sendSpans(nextMessage).execute(); } catch (IOException | RuntimeException | Error t) { // In failure case, we increment messages and spans dropped. int count = nextMessage.size(); Call.propagateIfFatal(t); metrics.incrementMessagesDropped(t); metrics.incrementSpansDropped(count); if (logger.isLoggable(FINE)) { logger.log(FINE, format("Dropped %s spans due to %s(%s)", count, t.getClass().getSimpleName(), t.getMessage() == null ? "" : t.getMessage()), t); } // Raise in case the sender was closed out-of-band. if (t instanceof IllegalStateException) throw (IllegalStateException) t; } }
> To unsubscribe from this group and stop receiving emails from it, send an email to zipki...@googlegroups.com.
in case it wasn't obvious what I meant about making a logging metrics
handler if you don't have a metrics system and really want things at
severe level. It would look like this:
reporter = AsyncReporter.builder(yourSender)
.metrics(new ReporterMetrics() {
@Override public void incrementMessages() {
}
@Override public void incrementMessagesDropped(Throwable cause) {
mylogger.severe("dropped message due to "+ cause.getMessage());
}
@Override public void incrementSpans(int quantity) {
}
@Override public void incrementSpanBytes(int quantity) {
}
@Override public void incrementMessageBytes(int quantity) {
}
@Override public void incrementSpansDropped(int quantity) {
mylogger.severe("dropped "+quantity+" spans");
}
@Override public void updateQueuedSpans(int update) {
}
@Override public void updateQueuedBytes(int update) {
}
})..
To unsubscribe from this group and stop receiving emails from it, send an email to zipkin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zipkin-user/fb23704d-3065-43e9-b1d1-04177fec098a%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to zipkin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zipkin-user/32bc6649-9e34-47ad-8e9f-c86eac6c23fd%40googlegroups.com.
> > To unsubscribe from this group and stop receiving emails from it, send an email to zipkin-user+unsubscribe@googlegroups.com.