Skip to main content

Customisable prometheus exporter for your python application

Project description

pyp8s

Customisable prometheus exporter for your python application.

Currently not that much customisable, though.

Usage

MetricsHandler implements a singleton.

from pyp8s import MetricsHandler as meh

if __name__ == '__main__':
	meh.serve(listen_address="0.0.0.0", listen_port=8081)
	meh.set_metrics_name("myMetric")
	meh.inc("significantMetricKind", 1)
	meh.inc("significantMetricKind", 1)
	meh.set("otherMetricKind", 9000)
curl 127.0.0.1:8081/metrics
# TYPE myMetric counter
myMetric{kind="significantMetricKind"} 2
myMetric{kind="otherMetricKind"} 9000

Test environment

python3.10 -m virtualenv --prompt="py3.10 pyp8s" .virtualenv
source .virtualenv/bin/activate

Reporting bugs

Please, use GitHub issues.

Requesting new functionality

Please, use GitHub issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pyp8s-2.0.0-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page