Skip to content

Commit 5832a44

Browse files
authored
drop unnecessary metric attribute (#16045)
1 parent 674d722 commit 5832a44

5 files changed

Lines changed: 0 additions & 5 deletions

File tree

pkg/activator/handler/concurrency_reporter.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ func (cr *ConcurrencyReporter) reportToMetricsBackend(key types.NamespacedName,
228228
metrics.ConfigurationNameKey.With(configurationName),
229229
metrics.RevisionNameKey.With(revName),
230230
metrics.K8sNamespaceKey.With(ns),
231-
metrics.ActivatorKeyValue,
232231
)),
233232
)
234233
}

pkg/activator/handler/concurrency_reporter_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,6 @@ func TestMetricsReported(t *testing.T) {
565565
metrics.ConfigurationNameKey.With("config-"+rev1.Name),
566566
metrics.RevisionNameKey.With(rev1.Name),
567567
metrics.K8sNamespaceKey.With(rev1.Namespace),
568-
metrics.ActivatorKeyValue,
569568
)
570569

571570
metricstest.AssertMetrics(

pkg/activator/handler/metric_handler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ func (h *MetricHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
5252
metrics.ConfigurationNameKey.With(configurationName),
5353
metrics.RevisionNameKey.With(rev.Name),
5454
metrics.K8sNamespaceKey.With(rev.Namespace),
55-
metrics.ActivatorKeyValue,
5655
)
5756

5857
h.nextHandler.ServeHTTP(w, r)

pkg/activator/handler/metric_handler_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ func TestRequestMetricHandler(t *testing.T) {
9696
metrics.ConfigurationNameKey.With(rev.Labels[serving.ConfigurationLabelKey]),
9797
metrics.RevisionNameKey.With(rev.Name),
9898
metrics.K8sNamespaceKey.With(rev.Namespace),
99-
metrics.ActivatorKeyValue,
10099
}
101100

102101
if diff := cmp.Diff(want, got, cmpOpts...); diff != "" {

pkg/metrics/key.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ var (
2828
RouteTagNameKey = attributekey.String("kn.route.tag")
2929
K8sNamespaceKey = attributekey.String("k8s.namespace.name")
3030
K8sPodIPKey = attributekey.String("k8s.pod.ip")
31-
ActivatorKeyValue = attributekey.Bool("kn.activator.proxy").With(true)
3231
)

0 commit comments

Comments
 (0)