Skip to main content

Utility project for recording build information and exposing it as a prometheus metric

Project description

Prometheus BuildInfo

Python library for adding a buildinfo metric to your Prometheus-enabled applications.

Usage

Installation

pip install prometheus-build-info

make-build-info utility

The make-build-info utility can be used during building or packaging to create a prom_build_info.json file that stores the relevant build information that this library publishes.

make-build-info --help
Usage: make-build-info [OPTIONS] APPNAME BRANCH REVISION VERSION

Options:
  --help  Show this message and exit.

Alternatively, running the utility when environment variables exist with the same name as the arguments listed above will have the same effect.

Manual creation of prom_build_info.json

If this suits your build process better, you can manually create prom_build_info.json during the build. It has the following format:

{
"appname": "test_app",
"branch": "master",
"revision": "abcdef",
"version": "1.0.1"
}

Adding the metric to your app

Ensure that prom_build_info.json is in your application working directory. Import prometheus_build_info.metrics into a code file that will be run during or after application initialisation.

Project details


Download files

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

Source Distribution

prometheus_build_info-2.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prometheus_build_info-2.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file prometheus_build_info-2.0.2.tar.gz.

File metadata

  • Download URL: prometheus_build_info-2.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for prometheus_build_info-2.0.2.tar.gz
Algorithm Hash digest
SHA256 c0b40809e243931dcea9535e89b0f3f3663648090ec1ce6329674b61db212837
MD5 556f16265ee0f2e0d5d0f6129cde33c6
BLAKE2b-256 72c2ae1b30a6de113753f95b5749ac269801dff864a96bb5b4a71180ba7da7a3

See more details on using hashes here.

File details

Details for the file prometheus_build_info-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: prometheus_build_info-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for prometheus_build_info-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 86037a986c103cb137daa3b199bfcb85d3092b5d3d13b66aa4574863d4b7c026
MD5 69626fe3bc0f2c050b53c172d1cde69a
BLAKE2b-256 6b3b22c24f35a4103d4efd9e62f8da6ae1c1a87e696efab99f1a64e1bf83ac12

See more details on using hashes here.

Supported by

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