Skip to content

korfuri/python-gc-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-gc-prometheus

Export metrics about the Python garbage collector for Prometheus.io.

PyPI version Build Status

Installation

pip install gc_prometheus

Usage

Simply import gc_prometheus to register the metrics.

See the prometheus_client documentation to see how to export the metrics via an HTTP server. If you're using Django, check out django-prometheus which can export metrics to a Django view, and exports metrics relevant to Django.

To aggregate the exported variables, see the Prometheus.io documentation.

Advanced usage

This package contains two series of metrics:

  • gc stats, which simply export counters exposed by the gc module. This is mostly counters of objects. You can import these metrics alone by importing gc_prometheus.stats.
  • gc profiling stats, which register callbacks with the gc module and add some negligible overhead to the garbage collection process. This is mostly counters of time spent in the GC process. You can import these metrics alone by importing gc_prometheus.profile.

Importing gc_prometheus imports both sets of metrics.

About

Export metrics about your Python application's GC stats to Prometheus.io

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages