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.1.tar.gz (4.0 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.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prometheus_build_info-2.0.1.tar.gz
  • Upload date:
  • Size: 4.0 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.8.0

File hashes

Hashes for prometheus_build_info-2.0.1.tar.gz
Algorithm Hash digest
SHA256 54d481b34f14936c65abd79f576650abc0329f1a3aef4cecc082040cca9a2f5d
MD5 a0534a5410518d417a072f17b6d286ba
BLAKE2b-256 629cd9e6bc12f890fa72e7c934c9d8aca44a4fedc32ed9a8c97c1841a95bea3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prometheus_build_info-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.8.0

File hashes

Hashes for prometheus_build_info-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6650886203d067f0a55f184a31aefe23cfe2c864d36244b8db30943d88fec7bd
MD5 c54e99a44a7ed267bade33719fcff1d0
BLAKE2b-256 3fbf1e9c19e391fc9af1c41a1dcf29ff358a57259f86173570147e36f84980e3

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