Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ErrorBusy, it essentially duplicates SpansDropped #1091

Merged
merged 1 commit into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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