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

Update prometheus_client #6200

Merged
merged 5 commits into from
Apr 2, 2020
Merged

Update prometheus_client #6200

merged 5 commits into from
Apr 2, 2020

Conversation

therve
Copy link
Contributor

@therve therve commented Mar 30, 2020

This updates prometheus client library to the latest available version,
by removing the change in text_fd_to_metric_families which is breaking
our compatibility.

@codecov
Copy link

codecov bot commented Mar 30, 2020

Codecov Report

Merging #6200 into master will decrease coverage by 0.41%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
prometheus/tests/conftest.py 100.00% <ø> (ø)
...e/datadog_checks/base/checks/openmetrics/mixins.py 77.52% <100.00%> (+0.04%) ⬆️
...se/datadog_checks/base/checks/prometheus/mixins.py 80.61% <100.00%> (+0.56%) ⬆️
datadog_checks_base/tests/test_openmetrics.py 100.00% <100.00%> (ø)
kubelet/tests/test_kubelet.py 97.15% <100.00%> (ø)
openmetrics/tests/test_openmetrics.py 100.00% <100.00%> (ø)
prometheus/tests/test_prometheus.py 90.00% <100.00%> (ø)
etcd/tests/test_integration.py 97.43% <0.00%> (-0.86%) ⬇️
gearmand/tests/test_integration.py
oracle/tests/common.py
... and 368 more

@@ -35,12 +35,13 @@ def poll_mock():
g3 = Gauge('metric3', 'memory usage', ['matched_label', 'node', 'timestamp'], registry=registry)
g3.labels(matched_label="foobar", node="host2", timestamp="456").set(float('inf'))

data = ensure_unicode(generate_latest(registry))
data = data.replace("_total", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies a breaking change, no?

Copy link
Contributor Author

@therve therve Mar 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think it does. It implies a breaking change from the prometheus producing metric side that we used in the tests, not in our consumer. Notice that the classes used to generate the data comes from prometheus_client.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But does that mean users can also produce counter metrics with _total suffix and it won't work with this integration ?

@ofek
Copy link
Contributor

ofek commented Mar 31, 2020

See: #3700

ahmed-mez
ahmed-mez previously approved these changes Apr 1, 2020
Copy link
Contributor

@ahmed-mez ahmed-mez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT 👍

ofek
ofek previously approved these changes Apr 1, 2020
Copy link
Contributor

@ofek ofek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🔥

AlexandreYang
AlexandreYang previously approved these changes Apr 1, 2020
This updates prometheus client library to the latest available version,
by removing the change in text_fd_to_metric_families which is breaking
our compatibility.
@therve therve dismissed stale reviews from AlexandreYang and ofek via b59dc79 April 1, 2020 19:59
@therve therve merged commit d7a8920 into master Apr 2, 2020
@therve therve deleted the therve/update-prometheus branch April 2, 2020 09:02
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.

4 participants