Skip to content

Commit b4fe32c

Browse files
committed
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]>
1 parent 3f26848 commit b4fe32c

File tree

1 file changed

+45
-11
lines changed

1 file changed

+45
-11
lines changed

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

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,53 @@ connection closes (`tcp_close_total`):
268268
* `identity_cert_refresh_count`: A counter of the total number of times the
269269
proxy's mTLS identity certificate has been refreshed by the Identity service.
270270

271-
## Outbound `xRoute` Metrics
271+
## Endpoint Metrics
272272

273273
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.
274+
per-route backend configurations. See the Authorization Policy
275+
[overview](../features/server-policy.md) and
276+
[reference](./authorization-policy.md) pages for more information on how to
277+
configure policy-based routing.
278+
279+
The Linkerd proxy emits metrics that provide visibility into authorized HTTP
280+
and gRPC traffic. Route-level metrics measure traffic for all of a policy's
281+
associated backends, while backend-level metrics measure the traffic
282+
distributed to individual endpoints.
283+
284+
The outbound proxy records the following metrics:
285+
286+
* `outbound_http_route_request_duration_seconds`: A histogram measuring the
287+
time between HTTP request initialization and HTTP response completion.
288+
* `outbound_http_route_request_statuses_total`: A counter tracking HTTP
289+
response status codes for HTTP traffic sent to a route.
290+
* `outbound_http_route_request_frame_size_bytes`: A histogram measuring the
291+
sizes of `DATA` frames in HTTP response bodies for a route.
292+
* `outbound_grpc_route_request_duration_seconds`: A histogram measuring the
293+
time between gRPC request initialization and gRPC response completion.
294+
* `outbound_grpc_route_request_statuses_total`: A counter tracking gRPC
295+
response status codes for gRPC traffic sent to a GRPCRoute.
296+
* `outbound_grpc_route_request_frame_size_bytes`: A histogram measuring the
297+
sizes of `DATA` frames in gRPC response bodies for a route.
298+
* `outbound_http_route_backend_requests_total`: A counter tracking the total
299+
number of outbound HTTP requests dispatched to a particular backend.
300+
* `outbound_http_route_backend_response_duration_seconds`: A histogram
301+
measuring the time in seconds between the HTTP request completing and HTTP
302+
response completing, for a particular backend.
303+
* `outbound_http_route_backend_response_statuses_total`: A counter tracking
304+
HTTP responses from a particular backend, labeled by status code.
305+
* `outbound_http_route_backend_response_frame_size_bytes`: A histogram
306+
measuring the sizes of `DATA` frames in HTTP response bodies from a particular
307+
backend.
308+
* `outbound_grpc_route_backend_requests_total`: A counter tracking the total
309+
number of outbound gRPC requests dispatched to a particular backend.
310+
* `outbound_grpc_route_backend_response_duration_seconds`: A histogram
311+
measuring the time in seconds between the gRPC request completing and gRPC
312+
response completing, for traffic dispatched to a particular backend.
313+
* `outbound_grpc_route_backend_response_statuses_total`: A counter tracking
314+
gRPC responses from a particular backend, labeled by the `grpc-status` code.
315+
* `outbound_grpc_route_backend_response_frame_size_bytes`: A histogram
316+
measuring the sizes of `DATA` frames in gRPC response bodies from a particular
317+
backend.
284318

285319
### Labels
286320

0 commit comments

Comments
 (0)