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

[Envoy] Support envoy.cluster.outlier_detection.* in OpenMetrics V2 #11860

Merged
merged 8 commits into from
Aug 19, 2022

Conversation

keisku
Copy link
Contributor

@keisku keisku commented Apr 20, 2022

What does this PR do?

Support envoy.cluster.outlier_detection.* in OpenMetrics V2, /stats/prometheus.

Motivation

Agent doesn't collect envoy.cluster.outlier_detection.* for now even Agent used to collect those metrics from the /stats. If my understanding is correct, this behavior changed is from #10752

Example log message that shows Agent ignore envoy.cluster.outlier_detection.* in OpenMetrics V2.

2022-04-19 04:39:53 UTC | CORE | DEBUG | (pkg/collector/python/datadog_agent.go:128 in LogMessage) | envoy:13076b6152ead410 | (transform.py:80) | Skipping metric `envoy_cluster_outlier_detection_ejections_detected_local_origin_success_rate` as it is not defined in `metrics`

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@keisku keisku requested a review from a team as a code owner April 20, 2022 02:42
@ghost ghost added the integration/envoy label Apr 20, 2022
@keisku keisku changed the title Support envoy.cluster.outlier_detection.* in OpenMetrics V2 [Envoy] Support envoy.cluster.outlier_detection.* in OpenMetrics V2 Apr 20, 2022
@keisku
Copy link
Contributor Author

keisku commented Apr 20, 2022

Where can I add test values for envoy.cluster.outlier_detection.* metrics?
Maybe, I should add test data to https://github.com/DataDog/integrations-core/blob/8386537099f5497a05192b97e69d97d47e316f78/datadog_checks_base/tests/base/checks/openmetrics/test_interface.py

I want to fix this CI error.

AssertionError: Needed at least 1 candidates for 'envoy.cluster.outlier_detection.ejections_enforced_total', got 0
  Expected:
          MetricStub(name='envoy.cluster.outlier_detection.ejections_enforced_total', type=None, value=None, tags=None, hostname=None, device=None, flush_first_value=None)
  Similar submitted:
  Score   Most similar
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:xds_cluster'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:xds_cluster'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:service2'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:service2'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:service1'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:service1'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:dummy_dynamic_cluster'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.cluster.upstream_cx_tx_bytes_total', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:dummy_dynamic_cluster'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.server.total_connections', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.56    MetricStub(name='envoy.server.total_connections', type=0, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.54    MetricStub(name='envoy.cluster.upstream_rq_max_duration_reached.count', type=3, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:xds_cluster'], hostname='stubbed.hostname', device=None, flush_first_value=True)
  0.54    MetricStub(name='envoy.cluster.upstream_rq_max_duration_reached.count', type=3, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:xds_cluster'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.54    MetricStub(name='envoy.cluster.upstream_rq_max_duration_reached.count', type=3, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:service2'], hostname='stubbed.hostname', device=None, flush_first_value=True)
  0.54    MetricStub(name='envoy.cluster.upstream_rq_max_duration_reached.count', type=3, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:service2'], hostname='stubbed.hostname', device=None, flush_first_value=False)
  0.54    MetricStub(name='envoy.cluster.upstream_rq_max_duration_reached.count', type=3, value=0.0, tags=['endpoint:http://localhost:8001/stats/prometheus', 'envoy_cluster:service1'], hostname='stubbed.hostname', device=None, flush_first_value=True)
assert False

@keisku keisku force-pushed the keisku/add_outlier_detection_to_openmetrics branch from 22e876d to cfedf7b Compare August 9, 2022 08:29
@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #11860 (8c6a02b) into master (8b4acc6) will not change coverage.
The diff coverage is n/a.

Flag Coverage Δ
envoy 94.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@keisku keisku requested a review from fanny-jiang August 9, 2022 09:51
@FlorentClarret FlorentClarret merged commit 44a335e into master Aug 19, 2022
@FlorentClarret FlorentClarret deleted the keisku/add_outlier_detection_to_openmetrics branch August 19, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants