Skip to content

Commit 9069325

Browse files
cstyanyurishkuro
authored andcommitted
Remove ErrorBusy metric since it duplicates SpansDropped (#1091)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
1 parent 296181e commit 9069325

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

cmd/collector/app/metrics.go

-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ type SpanProcessorMetrics struct {
4040
BatchSize metrics.Gauge // size of span batch
4141
// QueueLength measures the size of the internal span queue
4242
QueueLength metrics.Gauge
43-
// ErrorBusy counts number of return ErrServerBusy
44-
ErrorBusy metrics.Counter
4543
// SavedOkBySvc contains span and trace counts by service
4644
SavedOkBySvc metricsBySvc // spans actually saved
4745
SavedErrBySvc metricsBySvc // spans failed to save
@@ -87,7 +85,6 @@ func NewSpanProcessorMetrics(serviceMetrics metrics.Factory, hostMetrics metrics
8785
SpansDropped: hostMetrics.Counter(metrics.Options{Name: "spans.dropped", Tags: nil}),
8886
BatchSize: hostMetrics.Gauge(metrics.Options{Name: "batch-size", Tags: nil}),
8987
QueueLength: hostMetrics.Gauge(metrics.Options{Name: "queue-length", Tags: nil}),
90-
ErrorBusy: hostMetrics.Counter(metrics.Options{Name: "error.busy", Tags: nil}),
9188
SavedOkBySvc: newMetricsBySvc(serviceMetrics.Namespace(metrics.NSOptions{Name: "", Tags: map[string]string{"result": "ok"}}), "saved-by-svc"),
9289
SavedErrBySvc: newMetricsBySvc(serviceMetrics.Namespace(metrics.NSOptions{Name: "", Tags: map[string]string{"result": "err"}}), "saved-by-svc"),
9390
spanCounts: spanCounts,

cmd/collector/app/span_processor.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,5 @@ func (sp *spanProcessor) enqueueSpan(span *model.Span, originalFormat string) bo
140140
queuedTime: time.Now(),
141141
span: span,
142142
}
143-
addedToQueue := sp.queue.Produce(item)
144-
if !addedToQueue {
145-
sp.metrics.ErrorBusy.Inc(1)
146-
}
147-
return addedToQueue
143+
return sp.queue.Produce(item)
148144
}

cmd/collector/app/span_processor_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ func TestBySvcMetrics(t *testing.T) {
136136
// we defined the queue capacity as 0, all submitted items are dropped.
137137
// The debug spans are always accepted.
138138
expected = append(expected, metricstest.ExpectedMetric{
139-
Name: "host.error.busy", Value: 2,
140-
}, metricstest.ExpectedMetric{
141139
Name: "host.spans.dropped", Value: 2,
142140
})
143141
} else {

0 commit comments

Comments
 (0)