10000 Disable gcCollector for pypy by Krukov · Pull Request #380 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

Disable gcCollector for pypy #380

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

Merged
merged 4 commits into from
Feb 28, 2019
Merged

Conversation

Krukov
Copy link
Contributor
@Krukov Krukov commented Feb 27, 2019

We use gc.get_stats to provide metrics at gcColector . Pypy gc have the same method but they are very different. (#378 http://doc.pypy.org/en/latest/gc_info.html#gc-get-stats)
I think it is better just to not provide gc metrics with pypy.

Signed-off-by: Krukov Dima <glebov.ru@gmail.com>
Signed-off-by: Krukov Dima <glebov.ru@gmail.com>
Signed-off-by: Krukov Dima <glebov.ru@gmail.com>
Signed-off-by: Krukov Dima <glebov.ru@gmail.com>
@brian-brazil brian-brazil merged commit f820190 into prometheus:master Feb 28, 2019
@brian-brazil
Copy link
Contributor

Thanks!

@hynek
Copy link
Contributor
hynek commented May 31, 2019

Any chance of a release? This seems to be breaking prometheus-async's test suite on both PyPys:

______________________ ERROR collecting tests/test_aio.py ______________________
tests/test_aio.py:24: in <module>
    from prometheus_client import Counter
.tox/pypy3/site-packages/prometheus_client/__init__.py:5: in <module>
    from . import gc_collector
.tox/pypy3/site-packages/prometheus_client/gc_collector.py:46: in <module>
    GC_COLLECTOR = GCCollector()
.tox/pypy3/site-packages/prometheus_client/gc_collector.py:17: in __init__
    registry.register(self)
.tox/pypy3/site-packages/prometheus_client/registry.py:24: in register
    names = self._get_names(collector)
.tox/pypy3/site-packages/prometheus_client/registry.py:64: in _get_names
    for metric in desc_func():
.tox/pypy3/site-packages/prometheus_client/gc_collector.py:37: in collect
    for generation, stat in enumerate(gc.get_stats()):
E   TypeError: 'GcStats' object is not iterable

@brian-brazil
Copy link
Contributor

It's on my todo list. I'm expecting some OpenMetrics draft spec changes next week that I also want to include, so it should happen then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0