Emit v2 metric for drops at sink insertion
package groupedsinks
import (
+ "metric"
"sync"
"doppler/internal/groupedsinks/firehose_group"
@@ -99,6 +100,10 @@ func (group *GroupedSinks) Broadcast(appId string, msg *events.Envelope) {
// metric-documentation-v1: (sinks.dropped) Number of envelopes dropped
// while inserting envelope into sink.
group.batcher.BatchIncrementCounter("sinks.dropped")
+
+ // metric-documentation-v2: (loggregator.doppler.sinks.dropped)
+ // Number of envelopes dropped while inserting envelope into sink.
+ metric.IncCounter("sinks.dropped", metric.WithVersion(2, 0))
}
}
@@ -117,6 +122,10 @@ func (group *GroupedSinks) BroadcastError(appId string, errorMsg *events.Envelop
// metric-documentation-v1: (sinks.errors.dropped) Number of errors dropped
// while inserting error into sink.
group.batcher.BatchIncrementCounter("sinks.errors.dropped")
+
+ // metric-documentation-v2: (loggregator.doppler.sinks.errors.dropped)
+ // Number of errors dropped while inserting error into sink.
+ metric.IncCounter("sinks.errors.dropped", metric.WithVersion(2, 0))
}
}
}
