diff --git a/docs/gitbook/how-it-works.md b/docs/gitbook/how-it-works.md index 2b325e50..b81b8900 100644 --- a/docs/gitbook/how-it-works.md +++ b/docs/gitbook/how-it-works.md @@ -56,14 +56,14 @@ spec: # canary increment step # percentage (0-100) stepWeight: 5 - # Istio Prometheus checks + # Prometheus checks metrics: - - name: istio_requests_total + - name: request-success-rate # minimum req success rate (non 5xx responses) # percentage (0-100) threshold: 99 interval: 1m - - name: istio_request_duration_seconds_bucket + - name: request-duration # maximum req duration P99 # milliseconds threshold: 500 @@ -398,14 +398,14 @@ Spec: ```yaml canaryAnalysis: metrics: - - name: istio_requests_total + - name: request-success-rate # minimum req success rate (non 5xx responses) # percentage (0-100) threshold: 99 interval: 1m ``` -Query: +Istio query: ```javascript sum( @@ -430,6 +430,29 @@ sum( ) ``` +App Mesh query: + +```javascript +sum( + rate( + envoy_cluster_upstream_rq{ + kubernetes_namespace="$namespace", + kubernetes_pod_name=~"$workload", + response_code!~"5.*" + }[$interval] + ) +) +/ +sum( + rate( + envoy_cluster_upstream_rq{ + kubernetes_namespace="$namespace", + kubernetes_pod_name=~"$workload" + }[$interval] + ) +) +``` + **HTTP requests milliseconds duration P99** Spec: @@ -437,14 +460,14 @@ Spec: ```yaml canaryAnalysis: metrics: - - name: istio_request_duration_seconds_bucket + - name: request-duration # maximum req duration P99 # milliseconds threshold: 500 interval: 1m ``` -Query: +Istio query: ```javascript histogram_quantile(0.99, @@ -460,6 +483,21 @@ histogram_quantile(0.99, ) ``` +App Mesh query: + +```javascript +histogram_quantile(0.99, + sum( + irate( + envoy_cluster_upstream_rq_time_bucket{ + kubernetes_pod_name=~"$workload", + kubernetes_namespace=~"$namespace" + }[$interval] + ) + ) by (le) +) +``` + > **Note** that the metric interval should be lower or equal to the control loop interval. ### Custom Metrics diff --git a/docs/gitbook/usage/ab-testing.md b/docs/gitbook/usage/ab-testing.md index e984e052..3014a794 100644 --- a/docs/gitbook/usage/ab-testing.md +++ b/docs/gitbook/usage/ab-testing.md @@ -80,12 +80,12 @@ spec: cookie: regex: "^(.*?;)?(type=insider)(;.*)?$" metrics: - - name: istio_requests_total + - name: request-success-rate # minimum req success rate (non 5xx responses) # percentage (0-100) threshold: 99 interval: 1m - - name: istio_request_duration_seconds_bucket + - name: request-duration # maximum req duration P99 # milliseconds threshold: 500 diff --git a/docs/gitbook/usage/appmesh-progressive-delivery.md b/docs/gitbook/usage/appmesh-progressive-delivery.md index 416671dc..02fe3c29 100644 --- a/docs/gitbook/usage/appmesh-progressive-delivery.md +++ b/docs/gitbook/usage/appmesh-progressive-delivery.md @@ -85,7 +85,7 @@ spec: stepWeight: 5 # App Mesh Prometheus checks metrics: - - name: envoy_cluster_upstream_rq + - name: request-success-rate # minimum req success rate (non 5xx responses) # percentage (0-100) threshold: 99 diff --git a/docs/gitbook/usage/progressive-delivery.md b/docs/gitbook/usage/progressive-delivery.md index c6ede76a..2bb25dcf 100644 --- a/docs/gitbook/usage/progressive-delivery.md +++ b/docs/gitbook/usage/progressive-delivery.md @@ -70,12 +70,12 @@ spec: # percentage (0-100) stepWeight: 10 metrics: - - name: istio_requests_total + - name: request-success-rate # minimum req success rate (non 5xx responses) # percentage (0-100) threshold: 99 interval: 1m - - name: istio_request_duration_seconds_bucket + - name: request-duration # maximum req duration P99 # milliseconds threshold: 500