You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/versioned/serving/observability/metrics/serving-metrics.md
+66-5Lines changed: 66 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,27 +13,63 @@ Administrators can monitor Serving control plane based on the metrics exposed by
13
13
14
14
These metrics may change as we flush out our migration from OpenCensus to OpenTelemetry
15
15
16
-
## Queue Proxy
16
+
## Workload Metrics
17
17
18
-
The queue proxy is the per-pod sidecar that enforces container concurrency and provides metrics to the autoscaler. The following metrics provide you insights into queued
18
+
Each workload pod has a sidecar that enforces container concurrency and provides metrics to the autoscaler. The following OTel metrics provide you insights into queued
19
19
requests and user-container behavior.
20
20
21
-
### `kn.queueproxy.depth`
21
+
The following attributes are included with workload metrics
22
+
23
+
Name | Type | Description
24
+
-|-|-
25
+
`container.name` | string | Name of the container emit metrics. This is hardcoded to `queue-proxy`.
26
+
`k8s.namespace.name` | string | Namespace of the workload
27
+
`k8s.pod.name` | string | Name of the workload pod
28
+
`service.version` | string | Version of the sidecar emitting metrics
29
+
`service.name` | string | Either the name of the Knative Service, Configuration or Revision.
30
+
`service.instance.id` | string | Identifier of the instance which is the same as the `k8s.pod.name`
31
+
`kn.service.name` | string | Knative Service name associated with this Revision
32
+
`kn.configuration.name` | string | Knative Configuration name associated with this Revision
33
+
`kn.revision.name` | string | The name of the Revision
34
+
35
+
### `kn.serving.queue.depth`
22
36
23
37
**Instrument Type:** Int64Gauge
24
38
25
39
**Unit ([UCUM](https://ucum.org)):** {request}
26
40
27
41
**Description:** Number of current items in the queue proxy queue
28
42
29
-
### `kn.queueproxy.app.duration`
43
+
### `kn.serving.invocation.duration`
30
44
31
45
**Instrument Type:** Float64Histogram
32
46
33
47
**Unit ([UCUM](https://ucum.org)):** s
34
48
35
49
**Description:** The duration of the task execution
36
50
51
+
The following attributes are included with the metric
52
+
53
+
Name | Type | Description
54
+
-|-|-
55
+
`http.response.status_code` | int | Status code of the duration
56
+
57
+
### HTTP metrics
58
+
59
+
Since the sidecar receives and forwards requests to the user container it has both HTTP server and client metrics.
60
+
61
+
#### HTTP Server Metrics
62
+
63
+
Knative implements the [semantic conventions for HTTP Servers](https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#http-server) using the OpenTelemetry [otel-go/otelhttp](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) package.
64
+
65
+
Please refer to the [OpenTelemetry docs](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) for details about the HTTP Server metrics it exports.
66
+
67
+
#### HTTP Client Metrics
68
+
69
+
Knative implements the [semantic conventions for HTTP Clients](https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#http-client) using the OpenTelemetry [otel-go/otelhttp](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) package.
70
+
71
+
Please refer to the [OpenTelemetry docs](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) for details about the HTTP Client metrics it exports.
72
+
37
73
## Activator
38
74
39
75
The following metrics can help you to understand how an application responds when traffic passes through the activator. For example, when scaling from zero, high request latency might mean that requests are taking too much time to be fulfilled.
@@ -51,10 +87,35 @@ The following attributes are included with the metric
51
87
52
88
Name | Type | Description
53
89
-|-|-
54
-
`k8s.namespace.name` | string | Namespace of the Revision
90
+
`k8s.namespace.name` | string | Namespace of the resource
91
+
`kn.service.name` | string | Knative Service name associated with this Revision
92
+
`kn.configuration.name` | string | Knative Configuration name associated with this Revision
93
+
`kn.revision.name` | string | The name of the Revision
94
+
95
+
### HTTP metrics
96
+
97
+
Since the activator receives and forwards requests to the user workload it has both HTTP server and client metrics.
98
+
99
+
#### HTTP Server Metrics
100
+
101
+
Knative implements the [semantic conventions for HTTP Servers](https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#http-server) using the OpenTelemetry [otel-go/otelhttp](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) package.
102
+
103
+
Please refer to the [OpenTelemetry docs](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) for details about the HTTP Server metrics it exports.
104
+
105
+
The following attributes are included in the server metrics
106
+
107
+
Name | Type | Description
108
+
-|-|-
55
109
`kn.service.name` | string | Knative Service name associated with this Revision
56
110
`kn.configuration.name` | string | Knative Configuration name associated with this Revision
57
111
`kn.revision.name` | string | The name of the Revision
112
+
`k8s.namespace.name` | string | Namespace of the resource
113
+
114
+
#### HTTP Client Metrics
115
+
116
+
Knative implements the [semantic conventions for HTTP Clients](https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#http-client) using the OpenTelemetry [otel-go/otelhttp](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) package.
117
+
118
+
Please refer to the [OpenTelemetry docs](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) for details about the HTTP Client metrics it exports.
0 commit comments