aioworkers-prometheus
=====================
.. image:: https://github.com/aioworkers/aioworkers-prometheus/workflows/Tests/badge.svg
:target: https://github.com/aioworkers/aioworkers-prometheus/actions?query=workflow%3ATests
.. image:: https://codecov.io/gh/aioworkers/aioworkers-prometheus/branch/master/graph/badge.svg
:target: https://codecov.io/gh/aioworkers/aioworkers-prometheus
.. image:: https://img.shields.io/pypi/v/aioworkers-prometheus.svg
:target: https://pypi.org/project/aioworkers-prometheus
:alt: PyPI version
.. image:: https://img.shields.io/pypi/pyversions/aioworkers-prometheus.svg
:target: https://pypi.org/project/aioworkers-prometheus
:alt: Python versions
Use
---
.. code-block:: yaml
metric:
registry: aioworkers
namespace: aioworkers_test_metric
metrics:
my_counter:
type: counter
name: test_counter
documentation: Counter for tests
my_histogram:
type: histogram
name: test_histogram
documentation: Histogram for tests
buckets: [30, 90, 100, 200, 400, 800]
Use in code
.. code-block:: python
context.metric.my_counter.inc()
context.metric.my_histogram.observe(542)
with context.metric.my_histogram.time():
await asyncio.sleep(1)
Add global labels to default registry to exposition
.. code-block:: yaml
prometheus:
registry: aioworkers
labels:
env: prod
Serve port 8000 for prometheus
.. code-block:: yaml
prometheus:
port: 8000
registry: aioworkers
Push to graphite localhost:9090
.. code-block:: yaml
prometheus:
registry: aioworkers
graphite:
address: localhost:9090
interval: 1m
prefix: aioworkers.test
Development
-----------
Install dev requirements:
.. code-block:: shell
pipenv install --dev --skip-lock
Run tests:
.. code-block:: shell
pipenv run pytest
Raw data
{
"_id": null,
"home_page": "https://github.com/aioworkers/aioworkers-prometheus",
"name": "aioworkers-prometheus",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "aioworkers prometheus",
"author": "Alexander Malev",
"author_email": "aamalev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/96/ca/c72c8edc563b9e27c6fd11b5f77b2f0e33858c0ed4ff9bebe1b96ef87b97/aioworkers-prometheus-0.5.1.tar.gz",
"platform": null,
"description": "aioworkers-prometheus\n=====================\n\n.. image:: https://github.com/aioworkers/aioworkers-prometheus/workflows/Tests/badge.svg\n :target: https://github.com/aioworkers/aioworkers-prometheus/actions?query=workflow%3ATests\n\n.. image:: https://codecov.io/gh/aioworkers/aioworkers-prometheus/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/aioworkers/aioworkers-prometheus\n\n.. image:: https://img.shields.io/pypi/v/aioworkers-prometheus.svg\n :target: https://pypi.org/project/aioworkers-prometheus\n :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/aioworkers-prometheus.svg\n :target: https://pypi.org/project/aioworkers-prometheus\n :alt: Python versions\n\n\nUse\n---\n\n.. code-block:: yaml\n\n metric:\n registry: aioworkers\n namespace: aioworkers_test_metric\n metrics:\n my_counter:\n type: counter\n name: test_counter\n documentation: Counter for tests\n my_histogram:\n type: histogram\n name: test_histogram\n documentation: Histogram for tests\n buckets: [30, 90, 100, 200, 400, 800]\n\n\nUse in code\n\n.. code-block:: python\n\n context.metric.my_counter.inc()\n context.metric.my_histogram.observe(542)\n\n with context.metric.my_histogram.time():\n await asyncio.sleep(1)\n\n\nAdd global labels to default registry to exposition\n\n.. code-block:: yaml\n\n prometheus:\n registry: aioworkers\n labels:\n env: prod\n\n\nServe port 8000 for prometheus\n\n.. code-block:: yaml\n\n prometheus:\n port: 8000\n registry: aioworkers\n\n\nPush to graphite localhost:9090\n\n.. code-block:: yaml\n\n prometheus:\n registry: aioworkers\n graphite:\n address: localhost:9090\n interval: 1m\n prefix: aioworkers.test\n\n\nDevelopment\n-----------\n\nInstall dev requirements:\n\n\n.. code-block:: shell\n\n pipenv install --dev --skip-lock\n\n\nRun tests:\n\n.. code-block:: shell\n\n pipenv run pytest\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "aioworkers prometheus integration",
"version": "0.5.1",
"project_urls": {
"Homepage": "https://github.com/aioworkers/aioworkers-prometheus"
},
"split_keywords": [
"aioworkers",
"prometheus"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "521caf4ecb3a2ce8dee40eec54a80ce06712a23c4c26b22686d1f82ac450502c",
"md5": "1e3e0d1fa39115b38ce939ab2acf69a6",
"sha256": "e0882f9d9296b000047b13a7b7c19c9a6318f6dd7b55812b07bfac96884e9b4b"
},
"downloads": -1,
"filename": "aioworkers_prometheus-0.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1e3e0d1fa39115b38ce939ab2acf69a6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 9560,
"upload_time": "2023-01-22T13:57:07",
"upload_time_iso_8601": "2023-01-22T13:57:07.704869Z",
"url": "https://files.pythonhosted.org/packages/52/1c/af4ecb3a2ce8dee40eec54a80ce06712a23c4c26b22686d1f82ac450502c/aioworkers_prometheus-0.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "96cac72c8edc563b9e27c6fd11b5f77b2f0e33858c0ed4ff9bebe1b96ef87b97",
"md5": "f00c51c41fae2aac78befb3f5c3e1d5d",
"sha256": "91ed30fe0b297741cc00cf7112de84e01715dc0407174c466b4db994b3f30d78"
},
"downloads": -1,
"filename": "aioworkers-prometheus-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "f00c51c41fae2aac78befb3f5c3e1d5d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8609,
"upload_time": "2023-01-22T13:57:09",
"upload_time_iso_8601": "2023-01-22T13:57:09.289160Z",
"url": "https://files.pythonhosted.org/packages/96/ca/c72c8edc563b9e27c6fd11b5f77b2f0e33858c0ed4ff9bebe1b96ef87b97/aioworkers-prometheus-0.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-22 13:57:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aioworkers",
"github_project": "aioworkers-prometheus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aioworkers-prometheus"
}