From 6a790e2df202337b3b4ed0f5164fbb4a808b5571 Mon Sep 17 00:00:00 2001 From: Lukasz Dziedziak Date: Tue, 10 Dec 2024 16:50:59 +0100 Subject: [PATCH] feat(meshmetrics): add dns metrics to basic profile Signed-off-by: Lukasz Dziedziak --- app/kuma-dp/pkg/dataplane/metrics/profiles.go | 10 ++++++++++ .../testdata/profiles/basic_and_none.golden | 15 +++++++++++++++ .../metrics/testdata/profiles/basic_and_none.in | 15 +++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/app/kuma-dp/pkg/dataplane/metrics/profiles.go b/app/kuma-dp/pkg/dataplane/metrics/profiles.go index 80a9bd93c172..fa39964583e5 100644 --- a/app/kuma-dp/pkg/dataplane/metrics/profiles.go +++ b/app/kuma-dp/pkg/dataplane/metrics/profiles.go @@ -152,6 +152,16 @@ var basicProfile = []selectorFunction{ Match: "envoy_cluster_membership_total", }), // end of dashboards + // start of dns stats + selectorToFilterFunction(v1alpha1.Selector{ + Type: v1alpha1.PrefixSelectorType, + Match: "envoy_dns_filter", + }), + selectorToFilterFunction(v1alpha1.Selector{ + Type: v1alpha1.PrefixSelectorType, + Match: "envoy_dns_cares", + }), + // end of dns stats } var basicProfileLabels = []selectorFunction{ diff --git a/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.golden b/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.golden index 66a07c4530c6..b9508f0751f2 100644 --- a/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.golden +++ b/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.golden @@ -106,3 +106,18 @@ envoy_server_memory_heap_size{envoy_cluster_name="example"} 1 # TYPE envoy_server_uptime counter envoy_server_uptime{envoy_cluster_name="example"} 1 +# TYPE envoy_dns_cares_not_found counter +envoy_dns_cares_not_found 1 + +# TYPE envoy_dns_cares_resolve_total counter +envoy_dns_cares_resolve_total 1 + +# TYPE envoy_dns_filter_srv_record_queries counter +envoy_dns_filter_srv_record_queries{envoy_dns_filter_prefix="kuma_dns"} 1 + +# TYPE envoy_dns_filter_unanswered_queries counter +envoy_dns_filter_unanswered_queries{envoy_dns_filter_prefix="kuma_dns"} 1 + +# TYPE envoy_dns_filter_unsupported_queries counter +envoy_dns_filter_unsupported_queries{envoy_dns_filter_prefix="kuma_dns"} 1 + diff --git a/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.in b/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.in index cbf5f9680498..7ae9594df3a6 100644 --- a/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.in +++ b/app/kuma-dp/pkg/dataplane/metrics/testdata/profiles/basic_and_none.in @@ -109,3 +109,18 @@ envoy_server_memory_heap_size{envoy_cluster_name="example"} 1 # TYPE envoy_server_uptime counter envoy_server_uptime{envoy_cluster_name="example"} 1 + +# TYPE envoy_dns_cares_not_found counter +envoy_dns_cares_not_found{} 1 + +# TYPE envoy_dns_cares_resolve_total counter +envoy_dns_cares_resolve_total{} 1 + +# TYPE envoy_dns_filter_srv_record_queries counter +envoy_dns_filter_srv_record_queries{envoy_dns_filter_prefix="kuma_dns"} 1 + +# TYPE envoy_dns_filter_unanswered_queries counter +envoy_dns_filter_unanswered_queries{envoy_dns_filter_prefix="kuma_dns"} 1 + +# TYPE envoy_dns_filter_unsupported_queries counter +envoy_dns_filter_unsupported_queries{envoy_dns_filter_prefix="kuma_dns"} 1