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.1.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.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prometheus_build_info-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a01eeab1ce173131827d2900fad9fe12ae61ec8b845d8eae0d471da9529d4966
MD5 8089efc582f6996da2493f47f1604123
BLAKE2b-256 7eebd5858322b3b6ce3268bf4817192f67c75cb3281f2d66826ea2145ddf69c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prometheus_build_info-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1347cf8aeee5c05ab15bd134c58bf9c56cbe99c1b134963a6dd653b21c8f141b
MD5 13103d8998f42599488c5463d64e592d
BLAKE2b-256 454ffe203297c9c50e041ed50b6ab794123d00811cf359d005772229a1fa8498

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