Only report an ingestion error if the trace was not rejected
This should relieve the lightstep (and other "real") span sink from
drowning in errors of its own making.
@@ -5,6 +5,7 @@ import (
"time"
"github.com/sirupsen/logrus"
+ "github.com/stripe/veneur/protocol"
"github.com/stripe/veneur/samplers"
"github.com/stripe/veneur/sinks"
"github.com/stripe/veneur/ssf"
@@ -378,6 +379,7 @@ func (tw *SpanWorker) Work() {
for _, s := range tw.sinks {
err := s.Ingest(m)
if err != nil {
+ if _, isNoTrace := err.(*protocol.InvalidTrace); !isNoTrace {
// If a sink goes wacko and errors a lot, we stand to emit a
// loooot of metrics towards all span workers here since
// span ingest rates can be very high. C'est la vie.
@@ -387,6 +389,7 @@ func (tw *SpanWorker) Work() {
}
}
}
+}
// Flush invokes flush on each sink.
func (tw *SpanWorker) Flush() {
