Skip to content

Commit c26ade2

Browse files
committed
Use processing-latency histogram for task-ack path
Address review feedback by removing task_latency_ns histogram and using ExponentialTaskProcessingLatency in task_ack_manager. Also remove stale histogram-migration allowlist entries for task_latency/task_latency_ns. Signed-off-by: zawadzki <zawadzki@uber.com>
1 parent cef3eb5 commit c26ade2

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

common/metrics/config.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ func (h *HistogramMigration) UnmarshalYAML(read func(any) error) error {
4141
// This is likely best done in an `init` func, to ensure it happens early enough
4242
// and does not race with config reading.
4343
var HistogramMigrationMetrics = map[string]struct{}{
44-
// History task generation latency (replication task-ack path).
45-
// Dual-emitted as timer + histogram.
46-
"task_latency": {},
47-
"task_latency_ns": {},
48-
4944
"task_latency_processing": {},
5045
"task_latency_processing_ns": {},
5146

common/metrics/defs.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,7 +2480,6 @@ const (
24802480
const (
24812481
TaskRequests = iota + NumCommonMetrics
24822482
TaskLatency
2483-
ExponentialTaskLatency
24842483
TaskFailures
24852484
TaskDiscarded
24862485
TaskAttemptTimer
@@ -3314,7 +3313,6 @@ var MetricDefs = map[ServiceIdx]map[MetricIdx]metricDefinition{
33143313
History: {
33153314
TaskRequests: {metricName: "task_requests", metricType: Counter},
33163315
TaskLatency: {metricName: "task_latency", metricType: Timer},
3317-
ExponentialTaskLatency: {metricName: "task_latency_ns", metricType: Histogram, exponentialBuckets: Low1ms100s},
33183316
TaskAttemptTimer: {metricName: "task_attempt", metricType: Timer},
33193317
TaskFailures: {metricName: "task_errors", metricType: Counter},
33203318
TaskDiscarded: {metricName: "task_errors_discarded", metricType: Counter},

service/history/replication/task_ack_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (t *TaskAckManager) getTasks(ctx context.Context, pollingCluster string, la
136136
taskGeneratedTimer := t.scope.StartTimer(metrics.TaskLatency)
137137
defer taskGeneratedTimer.Stop()
138138
defer func() {
139-
t.scope.ExponentialHistogram(metrics.ExponentialTaskLatency, t.timeSource.Since(taskGeneratedStart))
139+
t.scope.ExponentialHistogram(metrics.ExponentialTaskProcessingLatency, t.timeSource.Since(taskGeneratedStart))
140140
}()
141141

142142
batchSize := t.dynamicTaskBatchSizer.value()

0 commit comments

Comments
 (0)