Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support statsmatch from proxy metric #1826

Merged
merged 13 commits into from
Sep 13, 2023
Prev Previous commit
Next Next commit
fix coverage test
Signed-off-by: zhaonan <zhaonan06@corp.netease.com>
zhaonan committed Sep 4, 2023
commit 3058c4cdd0aeb7506c6a1d59dc26c94c2a99daf3
Original file line number Diff line number Diff line change
@@ -472,4 +472,4 @@
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -21,10 +21,10 @@ envoyProxy:
stats_matcher:
inclusion_list:
patterns:
- prefix: "cluster_manager"
- prefix: "listener_manager"
- prefix: "server"
- prefix: "cluster.xds-grpc"
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
Original file line number Diff line number Diff line change
@@ -920,4 +920,4 @@
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -496,4 +496,4 @@
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -49,6 +49,14 @@ spec:
socket_address:
address: 127.0.0.1
port_value: 19000
stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
Original file line number Diff line number Diff line change
@@ -47,6 +47,14 @@ spec:
socket_address:
address: 127.0.0.1
port_value: 19000
stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
Original file line number Diff line number Diff line change
@@ -45,6 +45,14 @@ spec:
socket_address:
address: 127.0.0.1
port_value: 19000
stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
Original file line number Diff line number Diff line change
@@ -49,6 +49,14 @@ spec:
socket_address:
address: 127.0.0.1
port_value: 19000
stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
Original file line number Diff line number Diff line change
@@ -47,6 +47,14 @@ spec:
socket_address:
address: 127.0.0.1
port_value: 19000
stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
Original file line number Diff line number Diff line change
@@ -47,6 +47,14 @@ spec:
socket_address:
address: 127.0.0.1
port_value: 19000
stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
6 changes: 3 additions & 3 deletions internal/xds/bootstrap/bootstrap.yaml.tpl
Original file line number Diff line number Diff line change
@@ -13,15 +13,15 @@ stats_config:
inclusion_list:
patterns:
{{- range $a, $s := .StatsMatcher.Prefixs }}
tmsnan marked this conversation as resolved.
Show resolved Hide resolved
- prefix: "{{$s}}"
- prefix: {{$s}}
{{- end}}
{{- range $a, $s := .StatsMatcher.Suffixs }}
- suffix: "{{$s}}"
- suffix: {{$s}}
{{- end}}
{{- range $a, $s := .StatsMatcher.RegularExpressions }}
- safe_regex:
google_re2: {}
regex: "{{js $s}}"
regex: {{js $s}}
{{- end}}
dynamic_resources:
ads_config:
16 changes: 8 additions & 8 deletions internal/xds/bootstrap/testdata/custom-stats-matcher.yaml
Original file line number Diff line number Diff line change
@@ -12,16 +12,16 @@ stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: "cluster_manager"
- prefix: "listener_manager"
- prefix: "server"
- prefix: "cluster.xds-grpc"
- prefix: "http"
- prefix: "cluster"
- suffix: "upstream_rq"
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
- prefix: http
- prefix: cluster
- suffix: upstream_rq
- safe_regex:
google_re2: {}
regex: "virtual.*"
regex: virtual.*
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
8 changes: 4 additions & 4 deletions internal/xds/bootstrap/testdata/default.yaml
Original file line number Diff line number Diff line change
@@ -12,10 +12,10 @@ stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: "cluster_manager"
- prefix: "listener_manager"
- prefix: "server"
- prefix: "cluster.xds-grpc"
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
8 changes: 4 additions & 4 deletions internal/xds/bootstrap/testdata/enable-prometheus.yaml
Original file line number Diff line number Diff line change
@@ -12,10 +12,10 @@ stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: "cluster_manager"
- prefix: "listener_manager"
- prefix: "server"
- prefix: "cluster.xds-grpc"
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC
8 changes: 4 additions & 4 deletions internal/xds/bootstrap/testdata/otel-metrics.yaml
Original file line number Diff line number Diff line change
@@ -12,10 +12,10 @@ stats_config:
stats_matcher:
inclusion_list:
patterns:
- prefix: "cluster_manager"
- prefix: "listener_manager"
- prefix: "server"
- prefix: "cluster.xds-grpc"
- prefix: cluster_manager
- prefix: listener_manager
- prefix: server
- prefix: cluster.xds-grpc
dynamic_resources:
ads_config:
api_type: DELTA_GRPC