Skip to content

Commit

Permalink
Remove ErrorBusy metric since it duplicates SpansDropped (#1091)
Browse files Browse the repository at this point in the history
Signed-off-by: Callum Styan <callumstyan@gmail.com>
  • Loading branch information
cstyan authored and yurishkuro committed Jan 23, 2019
1 parent 296181e commit 9069325
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions cmd/collector/app/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ type SpanProcessorMetrics struct {
BatchSize metrics.Gauge // size of span batch
// QueueLength measures the size of the internal span queue
QueueLength metrics.Gauge
// ErrorBusy counts number of return ErrServerBusy
ErrorBusy metrics.Counter
// SavedOkBySvc contains span and trace counts by service
SavedOkBySvc metricsBySvc // spans actually saved
SavedErrBySvc metricsBySvc // spans failed to save
Expand Down Expand Up @@ -87,7 +85,6 @@ func NewSpanProcessorMetrics(serviceMetrics metrics.Factory, hostMetrics metrics
SpansDropped: hostMetrics.Counter(metrics.Options{Name: "spans.dropped", Tags: nil}),
BatchSize: hostMetrics.Gauge(metrics.Options{Name: "batch-size", Tags: nil}),
QueueLength: hostMetrics.Gauge(metrics.Options{Name: "queue-length", Tags: nil}),
ErrorBusy: hostMetrics.Counter(metrics.Options{Name: "error.busy", Tags: nil}),
SavedOkBySvc: newMetricsBySvc(serviceMetrics.Namespace(metrics.NSOptions{Name: "", Tags: map[string]string{"result": "ok"}}), "saved-by-svc"),
SavedErrBySvc: newMetricsBySvc(serviceMetrics.Namespace(metrics.NSOptions{Name: "", Tags: map[string]string{"result": "err"}}), "saved-by-svc"),
spanCounts: spanCounts,
Expand Down
6 changes: 1 addition & 5 deletions cmd/collector/app/span_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,5 @@ func (sp *spanProcessor) enqueueSpan(span *model.Span, originalFormat string) bo
queuedTime: time.Now(),
span: span,
}
addedToQueue := sp.queue.Produce(item)
if !addedToQueue {
sp.metrics.ErrorBusy.Inc(1)
}
return addedToQueue
return sp.queue.Produce(item)
}
2 changes: 0 additions & 2 deletions cmd/collector/app/span_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ func TestBySvcMetrics(t *testing.T) {
// we defined the queue capacity as 0, all submitted items are dropped.
// The debug spans are always accepted.
expected = append(expected, metricstest.ExpectedMetric{
Name: "host.error.busy", Value: 2,
}, metricstest.ExpectedMetric{
Name: "host.spans.dropped", Value: 2,
})
} else {
Expand Down

0 comments on commit 9069325

Please sign in to comment.