Skip to content

Commit 172c361

Browse files
authored
feat(proxy-metrics): document outbound policy routing metrics (#2069)
* feat(proxy-metrics): document outbound policy routing metrics the documentation of our proxy metrics has not kept pace with all of the exciting telemetry that has been introduced since #1599 documented the state of our authorization policy metrics. this commit reworks the documentation to exhaustively document the families of metrics exported by the proxy. this commit does not introduce mention of the _inbound_ metrics that have been added, but does rename this section to "_Endpoint Metrics_" in order to be compatible with the future addition of `inbound_http_route_*`, `inbound_http_route_backend_*`, `inbound_grpc_route*`, and `inbound_grpc_route_backend_*` metrics. see: * linkerd/linkerd2-proxy#2377 * linkerd/linkerd2-proxy#2380 * linkerd/linkerd2-proxy#3086 * linkerd/linkerd2-proxy#3308 * linkerd/linkerd2-proxy#3334 Signed-off-by: katelyn martin <[email protected]> * chore(markdownlint): allow duplicate "labels" headers Signed-off-by: katelyn martin <[email protected]> --------- Signed-off-by: katelyn martin <[email protected]>
1 parent 3f26848 commit 172c361

File tree

1 file changed

+50
-12
lines changed

1 file changed

+50
-12
lines changed

linkerd.io/content/2-edge/reference/proxy-metrics.md

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ layer.
238238
* `inbound_tcp_authz_deny_total`: A counter of the total number of TCP
239239
connections that were denied
240240

241+
<!-- markdownlint-disable MD024 -->
241242
### Labels
243+
<!-- markdownlint-enable MD024 -->
242244

243245
Each of these metrics has the following labels:
244246

@@ -268,21 +270,57 @@ connection closes (`tcp_close_total`):
268270
* `identity_cert_refresh_count`: A counter of the total number of times the
269271
proxy's mTLS identity certificate has been refreshed by the Identity service.
270272

271-
## Outbound `xRoute` Metrics
273+
## Endpoint Metrics
272274

273275
When performing policy-based routing, proxies may dispatch requests through
274-
per-route backend configurations. In order to record how routing rules
275-
apply and how backend distributions are applied, the outbound proxy records the
276-
following metrics:
277-
278-
* `outbound_http_route_backend_requests_total`: A counter of the total number of
279-
outbound HTTP requests dispatched to a route-backend.
280-
* `outbound_grpc_route_backend_requests_total`: A counter of the total number of
281-
outbound gRPC requests dispatched to a route-backend.
282-
* `outbound_http_balancer_endpoints`: A gauge of the number of endpoints in an
283-
outbound load balancer.
284-
276+
per-route backend configurations. See the Authorization Policy
277+
[overview](../features/server-policy.md) and
278+
[reference](./authorization-policy.md) pages for more information on how to
279+
configure policy-based routing.
280+
281+
The Linkerd proxy emits metrics that provide visibility into authorized HTTP
282+
and gRPC traffic. Route-level metrics measure traffic for all of a policy's
283+
associated backends, while backend-level metrics measure the traffic
284+
distributed to individual endpoints.
285+
286+
The outbound proxy records the following metrics:
287+
288+
* `outbound_http_route_request_duration_seconds`: A histogram measuring the
289+
time between HTTP request initialization and HTTP response completion.
290+
* `outbound_http_route_request_statuses_total`: A counter tracking HTTP
291+
response status codes for HTTP traffic sent to a route.
292+
* `outbound_http_route_request_frame_size_bytes`: A histogram measuring the
293+
sizes of `DATA` frames in HTTP response bodies for a route.
294+
* `outbound_grpc_route_request_duration_seconds`: A histogram measuring the
295+
time between gRPC request initialization and gRPC response completion.
296+
* `outbound_grpc_route_request_statuses_total`: A counter tracking gRPC
297+
response status codes for gRPC traffic sent to a GRPCRoute.
298+
* `outbound_grpc_route_request_frame_size_bytes`: A histogram measuring the
299+
sizes of `DATA` frames in gRPC response bodies for a route.
300+
* `outbound_http_route_backend_requests_total`: A counter tracking the total
301+
number of outbound HTTP requests dispatched to a particular backend.
302+
* `outbound_http_route_backend_response_duration_seconds`: A histogram
303+
measuring the time in seconds between the HTTP request completing and HTTP
304+
response completing, for a particular backend.
305+
* `outbound_http_route_backend_response_statuses_total`: A counter tracking
306+
HTTP responses from a particular backend, labeled by status code.
307+
* `outbound_http_route_backend_response_frame_size_bytes`: A histogram
308+
measuring the sizes of `DATA` frames in HTTP response bodies from a particular
309+
backend.
310+
* `outbound_grpc_route_backend_requests_total`: A counter tracking the total
311+
number of outbound gRPC requests dispatched to a particular backend.
312+
* `outbound_grpc_route_backend_response_duration_seconds`: A histogram
313+
measuring the time in seconds between the gRPC request completing and gRPC
314+
response completing, for traffic dispatched to a particular backend.
315+
* `outbound_grpc_route_backend_response_statuses_total`: A counter tracking
316+
gRPC responses from a particular backend, labeled by the `grpc-status` code.
317+
* `outbound_grpc_route_backend_response_frame_size_bytes`: A histogram
318+
measuring the sizes of `DATA` frames in gRPC response bodies from a particular
319+
backend.
320+
321+
<!-- markdownlint-disable MD024 -->
285322
### Labels
323+
<!-- markdownlint-enable MD024 -->
286324

287325
Each of these metrics has the following common labels, which describe the
288326
Kubernetes resources to which traffic is routed by the proxy:

0 commit comments

Comments
 (0)