Skip to content

Commit

Permalink
Make replication tasks units 'dimensionless'
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSnowden committed Jun 16, 2023
1 parent acb9e0a commit a63f3f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ func NewDimensionlessHistogramDef(name string) metricDefinition {
return metricDefinition{name: name, unit: Dimensionless}
}

func NewTimeHistogramDef(name string) metricDefinition {
return metricDefinition{name: name, unit: Milliseconds}
}

func NewCounterDef(name string) metricDefinition {
return metricDefinition{name: name}
}
Expand Down
6 changes: 2 additions & 4 deletions common/metrics/metric_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1462,11 +1462,9 @@ var (
ReplicationTasksFailed = NewCounterDef("replication_tasks_failed")
// ReplicationTasksLag is a heuristic for how far behind the remote DC is for a given cluster. It measures the
// difference between task IDs so its unit should be "tasks".
// It currently has units of "ms", which is incorrect. See https://github.com/temporalio/temporal/issues/4483.
ReplicationTasksLag = NewTimeHistogramDef("replication_tasks_lag")
ReplicationTasksLag = NewDimensionlessHistogramDef("replication_tasks_lag")
// ReplicationTasksFetched records the number of tasks fetched by the poller.
// It has the same unit issue as ReplicationTasksLag.
ReplicationTasksFetched = NewTimeHistogramDef("replication_tasks_fetched")
ReplicationTasksFetched = NewDimensionlessHistogramDef("replication_tasks_fetched")
ReplicationLatency = NewTimerDef("replication_latency")
ReplicationTasksAppliedLatency = NewTimerDef("replication_tasks_applied_latency")
ReplicationDLQFailed = NewCounterDef("replication_dlq_enqueue_failed")
Expand Down

0 comments on commit a63f3f2

Please sign in to comment.