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

ProcessCollector support #36

Open
easysugar opened this issue Jan 27, 2020 · 0 comments
Open

ProcessCollector support #36

easysugar opened this issue Jan 27, 2020 · 0 comments

Comments

@easysugar
Copy link

Hi. It would be nice to have something like ProcessCollector. Using ProcessCollector from prometheus_client raises an error:

Traceback (most recent call last):
  File "prom.py", line 5, in <module>
    prometheus_service.register(ProcessCollector(namespace='mydaemon'))
  File "/usr/local/lib/python3.7/site-packages/aioprometheus/service.py", line 177, in register
    self.registry.register(collector)
  File "/usr/local/lib/python3.7/site-packages/aioprometheus/registry.py", line 32, in register
    raise TypeError("Invalid collector type: {}".format(collector))
TypeError: Invalid collector type: <prometheus_client.process_collector.ProcessCollector object at 0x7f2887ca0c10>

Code:

from prometheus_client import ProcessCollector
from aioprometheus import Service

prometheus_service = Service()
prometheus_service.register(ProcessCollector(namespace='mydaemon'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants