Skip to main content

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.

Metadata

Release files for prometheus-build-info 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prometheus-build-info 2.0.2
File Size Uploaded
prometheus_build_info-2.0.2.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prometheus-build-info 2.0.2
File Interpreter ABI Platform
prometheus_build_info-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / prometheus_build_info-2.0.2.tar.gz

Download URL prometheus_build_info-2.0.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c0b40809e243931dcea9535e89b0f3f3663648090ec1ce6329674b61db212837
BLAKE2b-256 checksum
How to use checksums
72c2ae1b30a6de113753f95b5749ac269801dff864a96bb5b4a71180ba7da7a3
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / prometheus_build_info-2.0.2-py3-none-any.whl

Download URL prometheus_build_info-2.0.2-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86037a986c103cb137daa3b199bfcb85d3092b5d3d13b66aa4574863d4b7c026
BLAKE2b-256 checksum
How to use checksums
6b3b22c24f35a4103d4efd9e62f8da6ae1c1a87e696efab99f1a64e1bf83ac12
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page