From b09b64f80e72ab875aec44b4e3d6ec79f4a89922 Mon Sep 17 00:00:00 2001 From: steveny91 Date: Fri, 10 Feb 2023 15:26:04 -0500 Subject: [PATCH 1/8] new metric for envoy --- envoy/datadog_checks/envoy/metrics.py | 16 ++++++++++++++++ envoy/tests/fixtures/multiple_services | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/envoy/datadog_checks/envoy/metrics.py b/envoy/datadog_checks/envoy/metrics.py index b561889c68b49..2ce7079509942 100644 --- a/envoy/datadog_checks/envoy/metrics.py +++ b/envoy/datadog_checks/envoy/metrics.py @@ -3820,6 +3820,22 @@ ), 'method': 'monotonic_count', }, + 'access_logs.grpc_access_log.logs_dropped': { + 'tags': ( + (), + (), + (), + ), + 'method': 'monotonic_count', + }, + 'access_logs.grpc_access_log.logs_written': { + 'tags': ( + (), + (), + (), + ), + 'method': 'monotonic_count', + }, } # fmt: on diff --git a/envoy/tests/fixtures/multiple_services b/envoy/tests/fixtures/multiple_services index 2f3f383b718f2..34691bd1fbd55 100644 --- a/envoy/tests/fixtures/multiple_services +++ b/envoy/tests/fixtures/multiple_services @@ -4573,4 +4573,4 @@ wasm.envoy.wasm.runtime.null.active: 0 wasm.envoy.wasm.runtime.null.created: 0 wasm_vm.envoy.wasm.runtime.null.active: 0 wasm_vm.envoy.wasm.runtime.null.cloned: 0 -wasm_vm.envoy.wasm.runtime.null.created: 0 +wasm_vm.envoy.wasm.runtime.null.created: 0 \ No newline at end of file From b29b1bf6d06ed860ebeff1a8196409dd4e2df561 Mon Sep 17 00:00:00 2001 From: steveny91 Date: Fri, 10 Feb 2023 15:28:44 -0500 Subject: [PATCH 2/8] metadata entry --- envoy/metadata.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/envoy/metadata.csv b/envoy/metadata.csv index a3d233ba4bd41..7b87adc4e0377 100644 --- a/envoy/metadata.csv +++ b/envoy/metadata.csv @@ -944,3 +944,5 @@ envoy.cluster.zone.upstream_rq_time.99percentile,gauge,,millisecond,,[Legacy] Zo envoy.cluster.zone.upstream_rq_time.99_9percentile,gauge,,millisecond,,[Legacy] Zone request time in milliseconds 99.9-percentile,-1,envoy,, envoy.cluster.zone.upstream_rq_time.100percentile,gauge,,millisecond,,[Legacy] Zone request time in milliseconds 100-percentile,-1,envoy,, envoy.sds.key_rotation_failed,count,,,,[Legacy] [API v3 only] Total number of filesystem key rotations that failed outside of an SDS update.,-1,envoy,, +envoy.access_logs.grpc_access_log.logs_dropped,count,,,,[Legacy] Number of GRPC Access Logs dropped,,envoy,, +envoy.access_logs.grpc_access_log.logs_written,count,,,,[Legacy] Number of GRPC Access Logs written,,envoy,, \ No newline at end of file From ed1b47a338d5ca3409c27fa79451fd06960d6c72 Mon Sep 17 00:00:00 2001 From: steveny91 Date: Fri, 10 Feb 2023 15:31:00 -0500 Subject: [PATCH 3/8] add new metrics to fixture --- envoy/tests/fixtures/multiple_services | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/envoy/tests/fixtures/multiple_services b/envoy/tests/fixtures/multiple_services index 34691bd1fbd55..c62685234a9eb 100644 --- a/envoy/tests/fixtures/multiple_services +++ b/envoy/tests/fixtures/multiple_services @@ -4573,4 +4573,6 @@ wasm.envoy.wasm.runtime.null.active: 0 wasm.envoy.wasm.runtime.null.created: 0 wasm_vm.envoy.wasm.runtime.null.active: 0 wasm_vm.envoy.wasm.runtime.null.cloned: 0 -wasm_vm.envoy.wasm.runtime.null.created: 0 \ No newline at end of file +wasm_vm.envoy.wasm.runtime.null.created: 0 +access_logs.grpc_access_log.logs_dropped: 5 +access_logs.grpc_access_log.logs_written: 10 From 16249c27b49e30cd67efbe95ea875bc909c2dceb Mon Sep 17 00:00:00 2001 From: steveny91 Date: Mon, 13 Feb 2023 18:59:32 -0500 Subject: [PATCH 4/8] styling fix --- envoy/datadog_checks/envoy/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envoy/datadog_checks/envoy/metrics.py b/envoy/datadog_checks/envoy/metrics.py index 2ce7079509942..ab8da6b04449b 100644 --- a/envoy/datadog_checks/envoy/metrics.py +++ b/envoy/datadog_checks/envoy/metrics.py @@ -3820,7 +3820,7 @@ ), 'method': 'monotonic_count', }, - 'access_logs.grpc_access_log.logs_dropped': { + 'access_logs.grpc_access_log.logs_dropped': { 'tags': ( (), (), @@ -3828,7 +3828,7 @@ ), 'method': 'monotonic_count', }, - 'access_logs.grpc_access_log.logs_written': { + 'access_logs.grpc_access_log.logs_written': { 'tags': ( (), (), From b6d282a4faa9a57e82e2ccbda3b38e5280bc5408 Mon Sep 17 00:00:00 2001 From: steveny91 Date: Tue, 14 Feb 2023 01:16:35 -0500 Subject: [PATCH 5/8] metadata --- envoy/metadata.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envoy/metadata.csv b/envoy/metadata.csv index 7b87adc4e0377..edf4f4b5a7910 100644 --- a/envoy/metadata.csv +++ b/envoy/metadata.csv @@ -944,5 +944,5 @@ envoy.cluster.zone.upstream_rq_time.99percentile,gauge,,millisecond,,[Legacy] Zo envoy.cluster.zone.upstream_rq_time.99_9percentile,gauge,,millisecond,,[Legacy] Zone request time in milliseconds 99.9-percentile,-1,envoy,, envoy.cluster.zone.upstream_rq_time.100percentile,gauge,,millisecond,,[Legacy] Zone request time in milliseconds 100-percentile,-1,envoy,, envoy.sds.key_rotation_failed,count,,,,[Legacy] [API v3 only] Total number of filesystem key rotations that failed outside of an SDS update.,-1,envoy,, -envoy.access_logs.grpc_access_log.logs_dropped,count,,,,[Legacy] Number of GRPC Access Logs dropped,,envoy,, -envoy.access_logs.grpc_access_log.logs_written,count,,,,[Legacy] Number of GRPC Access Logs written,,envoy,, \ No newline at end of file +envoy.access_logs.grpc_access_log.logs_dropped,count,,,,[Legacy] Number of GRPC Access Logs dropped,-1,envoy,, +envoy.access_logs.grpc_access_log.logs_written,count,,,,[Legacy] Number of GRPC Access Logs written,-1,envoy,, \ No newline at end of file From 41d71cd326074fbbc3665ef12e8099402bbd3882 Mon Sep 17 00:00:00 2001 From: steveny91 Date: Fri, 24 Feb 2023 18:03:28 -0500 Subject: [PATCH 6/8] Add collection for OMv2 --- envoy/datadog_checks/envoy/metrics.py | 2 ++ envoy/metadata.csv | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/envoy/datadog_checks/envoy/metrics.py b/envoy/datadog_checks/envoy/metrics.py index ab8da6b04449b..74aeec3b0f1ba 100644 --- a/envoy/datadog_checks/envoy/metrics.py +++ b/envoy/datadog_checks/envoy/metrics.py @@ -351,6 +351,8 @@ 'envoy_cluster_outlier_detection_ejections_detected_failure_percentage': 'cluster.outlier_detection.ejections_detected_failure_percentage', # noqa: E501 'envoy_cluster_outlier_detection_ejections_enforced_failure_percentage_local_origin': 'cluster.outlier_detection.ejections_enforced_failure_percentage_local_origin', # noqa: E501 'envoy_cluster_outlier_detection_ejections_detected_failure_percentage_local_origin': 'cluster.outlier_detection.ejections_detected_failure_percentage_local_origin', # noqa: E501 + 'envoy_access_logs_grpc_access_log_logs_dropped': 'access_logs.grpc_access_log.logs_dropped', + 'envoy_access_logs_grpc_access_log_logs_written': 'access_logs.grpc_access_log.logs_written', } # fmt: off diff --git a/envoy/metadata.csv b/envoy/metadata.csv index edf4f4b5a7910..2132407ccc31b 100644 --- a/envoy/metadata.csv +++ b/envoy/metadata.csv @@ -945,4 +945,6 @@ envoy.cluster.zone.upstream_rq_time.99_9percentile,gauge,,millisecond,,[Legacy] envoy.cluster.zone.upstream_rq_time.100percentile,gauge,,millisecond,,[Legacy] Zone request time in milliseconds 100-percentile,-1,envoy,, envoy.sds.key_rotation_failed,count,,,,[Legacy] [API v3 only] Total number of filesystem key rotations that failed outside of an SDS update.,-1,envoy,, envoy.access_logs.grpc_access_log.logs_dropped,count,,,,[Legacy] Number of GRPC Access Logs dropped,-1,envoy,, -envoy.access_logs.grpc_access_log.logs_written,count,,,,[Legacy] Number of GRPC Access Logs written,-1,envoy,, \ No newline at end of file +envoy.access_logs.grpc_access_log.logs_written,count,,,,[Legacy] Number of GRPC Access Logs written,-1,envoy,, +envoy.access_logs.grpc_access_log.logs_dropped.count,count,,,,[OpenMetrics V2] Count of GRPC Access Logs dropped,-1,envoy,, +envoy.access_logs.grpc_access_log.logs_written.count,count,,,,[OpenMetrics V2] Count of GRPC Access Logs written,-1,envoy,, \ No newline at end of file From 6ebc463c17af0d94c4f85d8cf800b27bcd4fef01 Mon Sep 17 00:00:00 2001 From: steveny91 Date: Fri, 24 Feb 2023 18:17:33 -0500 Subject: [PATCH 7/8] add tests --- envoy/tests/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/envoy/tests/common.py b/envoy/tests/common.py index dc832e754b5fe..471bb88e7ed3f 100644 --- a/envoy/tests/common.py +++ b/envoy/tests/common.py @@ -369,6 +369,8 @@ "http.downstream_rq_http3.count", "http.rq.count", "vhost.vcluster.upstream_rq.count", + "access_logs.grpc_access_log.logs_written.count", + "access_logs.grpc_access_log.logs_dropped.count", ] From 40bf295a408e7197f666a88030c1a09494e837b8 Mon Sep 17 00:00:00 2001 From: steveny91 Date: Fri, 24 Feb 2023 18:30:08 -0500 Subject: [PATCH 8/8] move metric to flaky --- envoy/tests/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envoy/tests/common.py b/envoy/tests/common.py index 471bb88e7ed3f..8e2ea2fb953bb 100644 --- a/envoy/tests/common.py +++ b/envoy/tests/common.py @@ -369,8 +369,6 @@ "http.downstream_rq_http3.count", "http.rq.count", "vhost.vcluster.upstream_rq.count", - "access_logs.grpc_access_log.logs_written.count", - "access_logs.grpc_access_log.logs_dropped.count", ] @@ -382,4 +380,6 @@ "cluster.internal.upstream_rq_xx.count", "cluster.http2.keepalive_timeout.count", "cluster.upstream_rq_xx.count", + "access_logs.grpc_access_log.logs_written.count", + "access_logs.grpc_access_log.logs_dropped.count", }