flask-satella-metrics


Nameflask-satella-metrics JSON
Version 1.6.0 PyPI version JSON
download
home_pagehttps://github.com/piotrmaslanka/flask-satella-metrics
SummaryA library to metric your Flask app using Satella
upload_time2024-11-18 13:22:30
maintainerNone
docs_urlNone
authorPiotr Maślanka
requires_python!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
licenseNone
keywords flask satella metrics instrumentation prometheus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            
flask-satella-metrics
=====================

[![Build Status](https://travis-ci.org/piotrmaslanka/flask-satella-metrics.svg)](https://travis-ci.org/piotrmaslanka/flask-satella-metrics)
[![Test Coverage](https://api.codeclimate.com/v1/badges/34b392b61482d98ad3f0/test_coverage)](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics/test_coverage)
[![Code Climate](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics/badges/gpa.svg)](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics)
[![Issue Count](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics/badges/issue_count.svg)](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics)
[![PyPI](https://img.shields.io/pypi/pyversions/flask-satella-metrics.svg)](https://pypi.python.org/pypi/flask-satella-metrics)
[![PyPI version](https://badge.fury.io/py/flask-satella-metrics.svg)](https://badge.fury.io/py/flask-satella-metrics)
[![PyPI](https://img.shields.io/pypi/implementation/flask-satella-metrics.svg)](https://pypi.python.org/pypi/flask-satella-metrics)

flask-satella-metrics is an application to seamlessly measure your Flask
application using Satella's metrics.

Example use:

```python
import flask
from flask_satella_metrics import SatellaMetricsMiddleware
app = flask.Flask(__name__)
SatellaMetricsMiddleware(app)
```

And to launch a Prometheus exporter use the following snippet:

```python
from satella.instrumentation.metrics.exporters import PrometheusHTTPExporterThread
phet = PrometheusHTTPExporterThread('0.0.0.0', 8080, {'service_name': 'my_service'})
phet.start()
```

Or, if you desire to export your metrics within Flask, just use:

```python
import flask
from flask_satella_metrics.prometheus_exporter import PrometheusExporter
app = flask.Flask(__name__)
app.register_blueprint(PrometheusExporter({'service_name': 'my_service'}))
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/piotrmaslanka/flask-satella-metrics",
    "name": "flask-satella-metrics",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
    "maintainer_email": null,
    "keywords": "flask, satella, metrics, instrumentation, prometheus",
    "author": "Piotr Ma\u015blanka",
    "author_email": "pmaslanka@smok.co",
    "download_url": null,
    "platform": null,
    "description": "\r\nflask-satella-metrics\r\n=====================\r\n\r\n[![Build Status](https://travis-ci.org/piotrmaslanka/flask-satella-metrics.svg)](https://travis-ci.org/piotrmaslanka/flask-satella-metrics)\r\n[![Test Coverage](https://api.codeclimate.com/v1/badges/34b392b61482d98ad3f0/test_coverage)](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics/test_coverage)\r\n[![Code Climate](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics/badges/gpa.svg)](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics)\r\n[![Issue Count](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics/badges/issue_count.svg)](https://codeclimate.com/github/piotrmaslanka/flask-satella-metrics)\r\n[![PyPI](https://img.shields.io/pypi/pyversions/flask-satella-metrics.svg)](https://pypi.python.org/pypi/flask-satella-metrics)\r\n[![PyPI version](https://badge.fury.io/py/flask-satella-metrics.svg)](https://badge.fury.io/py/flask-satella-metrics)\r\n[![PyPI](https://img.shields.io/pypi/implementation/flask-satella-metrics.svg)](https://pypi.python.org/pypi/flask-satella-metrics)\r\n\r\nflask-satella-metrics is an application to seamlessly measure your Flask\r\napplication using Satella's metrics.\r\n\r\nExample use:\r\n\r\n```python\r\nimport flask\r\nfrom flask_satella_metrics import SatellaMetricsMiddleware\r\napp = flask.Flask(__name__)\r\nSatellaMetricsMiddleware(app)\r\n```\r\n\r\nAnd to launch a Prometheus exporter use the following snippet:\r\n\r\n```python\r\nfrom satella.instrumentation.metrics.exporters import PrometheusHTTPExporterThread\r\nphet = PrometheusHTTPExporterThread('0.0.0.0', 8080, {'service_name': 'my_service'})\r\nphet.start()\r\n```\r\n\r\nOr, if you desire to export your metrics within Flask, just use:\r\n\r\n```python\r\nimport flask\r\nfrom flask_satella_metrics.prometheus_exporter import PrometheusExporter\r\napp = flask.Flask(__name__)\r\napp.register_blueprint(PrometheusExporter({'service_name': 'my_service'}))\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A library to metric your Flask app using Satella",
    "version": "1.6.0",
    "project_urls": {
        "Documentation": "https://flask-satella-metrics.readthedocs.io/",
        "Homepage": "https://github.com/piotrmaslanka/flask-satella-metrics"
    },
    "split_keywords": [
        "flask",
        " satella",
        " metrics",
        " instrumentation",
        " prometheus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20e2067c7d81017c16195b40d2b26e69a7ea19a2f1e7c1a81fff9c622c44d01e",
                "md5": "2213f5668b7138f2e06a5d50cbd88219",
                "sha256": "c1b30c92c5c2860f08adc11a8711d5c083c36b569dacb1148cb55b711f142898"
            },
            "downloads": -1,
            "filename": "flask_satella_metrics-1.6.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2213f5668b7138f2e06a5d50cbd88219",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
            "size": 4529,
            "upload_time": "2024-11-18T13:22:30",
            "upload_time_iso_8601": "2024-11-18T13:22:30.195554Z",
            "url": "https://files.pythonhosted.org/packages/20/e2/067c7d81017c16195b40d2b26e69a7ea19a2f1e7c1a81fff9c622c44d01e/flask_satella_metrics-1.6.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 13:22:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "piotrmaslanka",
    "github_project": "flask-satella-metrics",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "lcname": "flask-satella-metrics"
}
        
Elapsed time: 0.67175s