diagrid metrics app
Show the traffic, resource use and restarts of a Dapr app
Description
Show the metrics of a Dapr app and its sidecar. Without --metric it shows traffic in both directions, resource use, restarts, crash loops and Dapr error codes.
Metric shortcodes for --metric: Sidecar w0 uptime HTTP w1/w2/w3 app to Dapr p95 latency, rate, errors; w4/w5/w6 Dapr to app gRPC w7/w8/w9 app to Dapr; w10/w11/w12 Dapr to app App resources w13 CPU, w14 CPU % of request, w38 CPU % of limit, w15 memory, w16 memory % of limit Dapr resources w17 CPU, w18 CPU % of request, w39 CPU % of limit, w19 memory, w20 memory % of limit Components w21 active count, w22 active, w23 rate, w24 p95 latency, w25 errors Pod w26 uptime, w27/w28 app/Dapr restarts, w29/w30 app/Dapr crash loop Resiliency w31 policies, w32 health checks, w33 circuit breaker state, w34/w35/w36 circuit breaker/retry/timeout activations Errors w37 Dapr error codes Actors odd codes a1 to a33
Some metrics need a minimum Dapr version and are skipped on older sidecars.
diagrid metrics app <cluster-id> <app-id> [flags]
Examples
# Latency, throughput, errors, resource use and restarts over the last hour
diagrid metrics app <cluster-id> checkout --namespace shop
# Only the sidecar's CPU and memory, over six hours
diagrid metrics app <cluster-id> checkout -n shop --metric w17,w19 --since 6h
Options
--all Show every metric the server has for this target
--api-key string Diagrid Cloud API key
-h, --help help for app
-m, --metric strings Metric shortcodes to show, comma separated (see the list above)
-n, --namespace string Kubernetes namespace the app runs in (default "default")
-o, --output string Output format, supported [table, yaml, json] (default "table")
--raw Print the API response with every sample, as JSON unless -o yaml is set
--since duration How far back to look, up to 720h (30 days) (default 1h0m0s)
--step duration Resolution of each series, between 5s and 2h (default: chosen from --since)
SEE ALSO
- diagrid metrics - Show the metrics collected from connected clusters