Skip to content

Commit ce76741

Browse files
authored
fix metric names (#16290)
1 parent c7794be commit ce76741

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/queue/request_metric.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func NewAppRequestMetricsHandler(
5959
)
6060

6161
handler.duration, err = meter.Float64Histogram(
62-
"kn.queueproxy.app.duration",
62+
"kn.serving.invocation.duration",
6363
metric.WithDescription("The duration of task execution"),
6464
metric.WithUnit("s"),
6565
metric.WithExplicitBucketBoundaries(latencyBounds...),
@@ -69,7 +69,7 @@ func NewAppRequestMetricsHandler(
6969
}
7070

7171
handler.queueLen, err = meter.Int64Gauge(
72-
"kn.queueproxy.depth",
72+
"kn.serving.queue.depth",
7373
metric.WithDescription("Number of current requests in the queue"),
7474
metric.WithUnit("{request}"),
7575
)

pkg/queue/request_metric_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func assertMetrics(t *testing.T, reader *metric.ManualReader, status int) {
115115
metricstest.MetricsEqual(
116116
scopeName,
117117
metricdata.Metrics{
118-
Name: "kn.queueproxy.depth",
118+
Name: "kn.serving.queue.depth",
119119
Unit: "{request}",
120120
Description: "Number of current requests in the queue",
121121
Data: metricdata.Gauge[int64]{
@@ -125,7 +125,7 @@ func assertMetrics(t *testing.T, reader *metric.ManualReader, status int) {
125125
},
126126
},
127127
metricdata.Metrics{
128-
Name: "kn.queueproxy.app.duration",
128+
Name: "kn.serving.invocation.duration",
129129
Unit: "s",
130130
Description: "The duration of task execution",
131131
Data: metricdata.Histogram[float64]{

0 commit comments

Comments
 (0)