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

Gracefully skip quantile-less summary metrics #6909

Merged
merged 2 commits into from
Jun 17, 2020

Conversation

florimondmanca
Copy link
Contributor

What does this PR do?

Handle summary metrics that don't have a quantile by skipping them to prevent crashing.

Motivation

In a customer's setup, a system is submitting summary metrics without a quantile, eg:

# HELP resilience4j_circuitbreaker_calls Total number of successful calls
# TYPE resilience4j_circuitbreaker_calls summary
resilience4j_circuitbreaker_calls_count{kind="ignored",name="mood",} 0.0
resilience4j_circuitbreaker_calls_sum{kind="ignored",name="mood",} 0.0
resilience4j_circuitbreaker_calls_count{kind="failed",name="mood",} 0.0
resilience4j_circuitbreaker_calls_sum{kind="failed",name="mood",} 0.0
# vvv
resilience4j_circuitbreaker_calls{kind="not_permitted",name="sapi",} 0.0
resilience4j_circuitbreaker_calls{kind="not_permitted",name="mood",} 0.0
# ^^^

Currently this makes the check crash with a KeyError, meaning that the rest of metrics is not submitted which is a major pain point.

Additional Notes

We can look at how what to do with quantile-less metrics later.

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

ChristineTChen
ChristineTChen previously approved these changes Jun 16, 2020
@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #6909 into master will decrease coverage by 1.37%.
The diff coverage is n/a.

Impacted Files Coverage Δ
disk/tests/common.py 64.28% <0.00%> (-35.72%) ⬇️
disk/tests/conftest.py 85.71% <0.00%> (-11.43%) ⬇️
disk/datadog_checks/disk/disk.py 83.66% <0.00%> (-3.59%) ⬇️
disk/tests/test_filter.py 96.45% <0.00%> (-3.55%) ⬇️
elastic/tests/test_config.py
consul/tests/test_integration.py
...atadog_checks/base/checks/prometheus/base_check.py
oracle/datadog_checks/oracle/__init__.py
mesos_master/tests/test_integration_e2e.py
system_core/tests/test_integration.py
... and 703 more

ofek
ofek previously approved these changes Jun 16, 2020
@florimondmanca florimondmanca dismissed stale reviews from ofek, mgarabed, and ChristineTChen via c402df8 June 17, 2020 07:25
@florimondmanca florimondmanca merged commit c917b8c into master Jun 17, 2020
@florimondmanca florimondmanca deleted the florimondmanca/skip-quantile-less branch June 17, 2020 12:31
github-actions bot pushed a commit to bksteiny/integrations-core that referenced this pull request Jun 17, 2020
* Gracefully skip quantile-less summary metrics

* Address feedback c917b8c
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.

5 participants