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

Uploaded Python 3

File details

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

File metadata

  • Download URL: prometheus_build_info-2.0.0.tar.gz
  • Upload date:
  • Size: 3.9 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.0.tar.gz
Algorithm Hash digest
SHA256 d2b9ab059c6ba8b84fcb4b2c68e82799cd7c1a06ddc9f5f7893ac9306f9af973
MD5 33f35ade4511cf31566f5d9adf47ea21
BLAKE2b-256 702723a03587acfc13984ea2e749f76c3445aa98af452246c8cc94a7fa052ac2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prometheus_build_info-2.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e07500851ef7a50cad8642d4b4be6c5beab7b645057302e2f0d98ac0e75a7e5
MD5 1b39650d8bdac4c7a91a37c11ab0ac5c
BLAKE2b-256 8215464ad3992f1a54e3679e054d3ec0c173ba111ea4f2026a48c160480538a0

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