{"id":20357869,"url":"https://github.com/gandi/celery-prometheus","last_synced_at":"2025-04-12T03:14:57.115Z","repository":{"id":150846286,"uuid":"450200336","full_name":"Gandi/celery-prometheus","owner":"Gandi","description":"Add you own metrics to your celery backend.","archived":false,"fork":false,"pushed_at":"2024-11-22T16:29:56.000Z","size":51,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-12T03:14:51.879Z","etag":null,"topics":["celery","prometheus","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gandi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-20T17:49:44.000Z","updated_at":"2023-12-15T15:49:06.000Z","dependencies_parsed_at":"2025-02-02T05:15:23.418Z","dependency_job_id":null,"html_url":"https://github.com/Gandi/celery-prometheus","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gandi%2Fcelery-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gandi%2Fcelery-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gandi%2Fcelery-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gandi%2Fcelery-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gandi","download_url":"https://codeload.github.com/Gandi/celery-prometheus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510001,"owners_count":21116130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","prometheus","python"],"created_at":"2024-11-14T23:24:15.812Z","updated_at":"2025-04-12T03:14:57.107Z","avatar_url":"https://github.com/Gandi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Celery Prometheus\n\nThis module expose the Prometheus HTTP server to expose metrics of your Celery backends.\n\nTo install `celery-prometheus` with pip, use the command:\n\n```\npip install celery-prometheus\n```\n\nWith Poetry:\n\n```\npoetry add celery-prometheus\n```\n\n## Usage\n\nTo setup `celery-prometheus` to your backend, simply call the method `add_prometheus_option`\nafter the init of the `Celery` object.\n\nExample:\n\n```python\n\nfrom celery import Celery\nfrom celery_prometheus import add_prometheus_option\n\napp = Celery()\nadd_prometheus_option(app)\n\n# Rest of your code ...\n\n```\n\nBefore starting your backend, you will need to expose the `PROMETHEUS_MULTIPROC_DIR` environment\nvariable to indicate which folder the Prometheus Client will use to store the metrics\n(see [Multiprocess Mode (E.g. Gunicorn) of the Promehteus Client documentation](https://github.com/prometheus/client_python#multiprocess-mode-eg-gunicorn)).\n\nTo start and expose the Prometheus HTTP Server, you need to use the `--prometheus-collector-addr`\nargument when starting your Celery backend:\n\n```bash\nexport PROMETHEUS_MULTIPROC_DIR=/var/cache/my_celery_app\ncelery worker -A my_celery_backend.backend --prometheus-collector-addr 0.0.0.0:6543\n```\n\nNow that your backend is started, you can configure your Prometheus scrappers to scrappe your\nCelery backend.\n\n## Contributions\n\nThis project is open to external contributions. Feel free to submit us a\n[Pull request](https://github.com/Gandi/celery-prometheus/pulls) if you want to contribute and\nimprove with us this project.\n\nIn order to maintain an overall good code quality, this project use the following tools:\n\n - [Black](https://github.com/psf/black)\n - [Isort](https://github.com/PyCQA/isort)\n - [Flake8](https://flake8.pycqa.org/en/latest/)\n\nLinting and formatting tools are configured to match the [current default rules of Black](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html).\n\nWe also use [Mypy](https://mypy.readthedocs.io/en/stable/) as a static type checker.\n\nPlease ensure to run these tools before commiting and submiting a Pull request. In case one of\nthese mentionned tools report an error, the CI will automatically fail.\n\nIf you're making your first contribution to this project, please add your name to the\n[contributors list](CONTRIBUTORS.txt).\n\n## License\n\nThis project is released by [Gandi.net](https://www.gandi.net/en) tech team under the\n[BSD-3 license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgandi%2Fcelery-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgandi%2Fcelery-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgandi%2Fcelery-prometheus/lists"}