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 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 build_info.json

If this suits your build process better, you can manually create 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 build_info.json is in your application working directory. Import prometheus_build_info.info 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-1.0.2.tar.gz (3.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-1.0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prometheus_build_info-1.0.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for prometheus_build_info-1.0.2.tar.gz
Algorithm Hash digest
SHA256 692e5ee02bc3d5e0701f1d6703b44350dc4f5c205aacaedcd78b7a01eac7c0b5
MD5 a0a2f3e2955e96980cfda857d58ed900
BLAKE2b-256 42ba527ffef16f0aa6f690c1a95c7e38684abd096b0af0619a13bb5f5ad95106

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prometheus_build_info-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for prometheus_build_info-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 350c47d63a9efdc6bc12b3085f05eb6c7872675641b8fb92bb7528d40c082669
MD5 a280cc1205b46fbc4ba949ff2293be38
BLAKE2b-256 90b9af1fcf2012a13925ccb1cb5327423c4f9570d98d51b4a7b03248c26cc285

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