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

Add Envoy upstream_rq_completed cluster metrics #3955

Merged
merged 1 commit into from
Jun 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions envoy/datadog_checks/envoy/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,13 @@
),
'method': 'monotonic_count',
},
'cluster.upstream_rq_completed': {
'tags': (
('cluster_name', ),
(),
),
'method': 'monotonic_count',
},
'cluster.upstream_rq_1xx': {
'tags': (
('cluster_name', ),
Expand Down Expand Up @@ -2188,6 +2195,14 @@
),
'method': 'histogram',
},
'cluster.canary.upstream_rq_completed': {
'tags': (
('cluster_name', ),
(),
(),
),
'method': 'monotonic_count',
},
'cluster.canary.upstream_rq_1xx': {
'tags': (
('cluster_name', ),
Expand Down Expand Up @@ -2236,6 +2251,14 @@
),
'method': 'histogram',
},
'cluster.internal.upstream_rq_completed': {
'tags': (
('cluster_name', ),
(),
(),
),
'method': 'monotonic_count',
},
'cluster.internal.upstream_rq_1xx': {
'tags': (
('cluster_name', ),
Expand Down Expand Up @@ -2284,6 +2307,14 @@
),
'method': 'histogram',
},
'cluster.external.upstream_rq_completed': {
'tags': (
('cluster_name', ),
(),
(),
),
'method': 'monotonic_count',
},
'cluster.external.upstream_rq_1xx': {
'tags': (
('cluster_name', ),
Expand Down
4 changes: 4 additions & 0 deletions envoy/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -249,21 +249,25 @@ envoy.cluster.outlier_detection.ejections_enforced_success_rate,count,,,,Number
envoy.cluster.outlier_detection.ejections_detected_success_rate,count,,,,Number of detected success rate outlier ejections (even if unenforced),-1,envoy,
envoy.cluster.outlier_detection.ejections_enforced_consecutive_gateway_failure,count,,,,Number of enforced consecutive gateway failure ejections,-1,envoy,
envoy.cluster.outlier_detection.ejections_detected_consecutive_gateway_failure,count,,,,Number of detected consecutive gateway failure ejections (even if unenforced),-1,envoy,
envoy.cluster.upstream_rq_completed,count,,response,,Total upstream requests completed,0,envoy,
envoy.cluster.upstream_rq_1xx,count,,response,,Aggregate HTTP 1xx response codes,0,envoy,
envoy.cluster.upstream_rq_2xx,count,,response,,Aggregate HTTP 2xx response codes,1,envoy,
envoy.cluster.upstream_rq_3xx,count,,response,,Aggregate HTTP 3xx response codes,0,envoy,
envoy.cluster.upstream_rq_4xx,count,,response,,Aggregate HTTP 4xx response codes,-1,envoy,
envoy.cluster.upstream_rq_5xx,count,,response,,Aggregate HTTP 5xx response codes,-1,envoy,
envoy.cluster.canary.upstream_rq_completed,count,,response,,Total upstream canary requests completed,0,envoy,
envoy.cluster.canary.upstream_rq_1xx,count,,response,,Upstream canary aggregate HTTP 1xx response codes,0,envoy,
envoy.cluster.canary.upstream_rq_2xx,count,,response,,Upstream canary aggregate HTTP 2xx response codes,1,envoy,
envoy.cluster.canary.upstream_rq_3xx,count,,response,,Upstream canary aggregate HTTP 3xx response codes,0,envoy,
envoy.cluster.canary.upstream_rq_4xx,count,,response,,Upstream canary aggregate HTTP 4xx response codes,-1,envoy,
envoy.cluster.canary.upstream_rq_5xx,count,,response,,Upstream canary aggregate HTTP 5xx response codes,-1,envoy,
envoy.cluster.internal.upstream_rq_completed,count,,response,,Total internal origin requests completed,0,envoy,
envoy.cluster.internal.upstream_rq_1xx,count,,response,,Internal origin aggregate HTTP 1xx response codes,0,envoy,
envoy.cluster.internal.upstream_rq_2xx,count,,response,,Internal origin aggregate HTTP 2xx response codes,1,envoy,
envoy.cluster.internal.upstream_rq_3xx,count,,response,,Internal origin aggregate HTTP 3xx response codes,0,envoy,
envoy.cluster.internal.upstream_rq_4xx,count,,response,,Internal origin aggregate HTTP 4xx response codes,-1,envoy,
envoy.cluster.internal.upstream_rq_5xx,count,,response,,Internal origin aggregate HTTP 5xx response codes,-1,envoy,
envoy.cluster.external.upstream_rq_completed,count,,response,,Total external origin requests completed,0,envoy,
envoy.cluster.external.upstream_rq_1xx,count,,response,,External origin aggregate HTTP 1xx response codes,0,envoy,
envoy.cluster.external.upstream_rq_2xx,count,,response,,External origin aggregate HTTP 2xx response codes,1,envoy,
envoy.cluster.external.upstream_rq_3xx,count,,response,,External origin aggregate HTTP 3xx response codes,0,envoy,
Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/fixtures/multiple_services
Original file line number Diff line number Diff line change
Expand Up @@ -3733,6 +3733,7 @@ cluster.out.support-admin-test.datadog.svc.cluster.local|iperf.upstream_rq_total
cluster.out.support-admin-test.datadog.svc.cluster.local|iperf.upstream_rq_tx_reset: 0
cluster.out.support-admin-test.datadog.svc.cluster.local|iperf.version: 3346954724227882598
cluster.rds.bind_errors: 0
cluster.rds.internal.upstream_rq_completed: 124769
cluster.rds.internal.upstream_rq_200: 123577
cluster.rds.internal.upstream_rq_2xx: 123577
cluster.rds.internal.upstream_rq_503: 1174
Expand Down Expand Up @@ -3788,6 +3789,7 @@ cluster.rds.upstream_flow_control_backed_up_total: 0
cluster.rds.upstream_flow_control_drained_total: 0
cluster.rds.upstream_flow_control_paused_reading_total: 0
cluster.rds.upstream_flow_control_resumed_reading_total: 0
cluster.rds.upstream_rq_completed: 124769
cluster.rds.upstream_rq_200: 123577
cluster.rds.upstream_rq_2xx: 123577
cluster.rds.upstream_rq_503: 1174
Expand Down Expand Up @@ -3816,6 +3818,7 @@ cluster.xds-grpc.http2.rx_reset: 0
cluster.xds-grpc.http2.too_many_header_frames: 0
cluster.xds-grpc.http2.trailers: 0
cluster.xds-grpc.http2.tx_reset: 0
cluster.xds-grpc.internal.upstream_rq_completed: 6566
cluster.xds-grpc.internal.upstream_rq_200: 686
cluster.xds-grpc.internal.upstream_rq_2xx: 686
cluster.xds-grpc.internal.upstream_rq_503: 5880
Expand Down Expand Up @@ -3870,6 +3873,7 @@ cluster.xds-grpc.upstream_flow_control_backed_up_total: 0
cluster.xds-grpc.upstream_flow_control_drained_total: 0
cluster.xds-grpc.upstream_flow_control_paused_reading_total: 0
cluster.xds-grpc.upstream_flow_control_resumed_reading_total: 0
cluster.xds-grpc.upstream_rq_completed: 6566
cluster.xds-grpc.upstream_rq_200: 686
cluster.xds-grpc.upstream_rq_2xx: 686
cluster.xds-grpc.upstream_rq_503: 5880
Expand Down
2 changes: 1 addition & 1 deletion envoy/tests/test_envoy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_success_fixture(self, aggregator):

num_metrics = len(response('multiple_services').content.decode().splitlines())
num_metrics -= sum(c.unknown_metrics.values()) + sum(c.unknown_tags.values())
assert 4155 <= metrics_collected == num_metrics
assert 4159 <= metrics_collected == num_metrics

def test_success_fixture_whitelist(self, aggregator):
instance = INSTANCES['whitelist']
Expand Down