1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #633] [MERGED] feat(metrics): add bambuddy_build_info metric #1089

Closed
opened 2026-05-07 00:15:56 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/633
Author: @sw1nn
Created: 3/6/2026
Status: Merged
Merged: 3/7/2026
Merged by: @maziggy

Base: 0.2.3b1Head: main


📝 Commits (1)

  • ae80eaa feat(metrics): add bambuddy_build_info metric

📊 Changes

1 file changed (+17 additions, -0 deletions)

View changed files

📝 backend/app/api/routes/metrics.py (+17 -0)

📄 Description

Description

Add a bambuddy_build_info gauge metric to the Prometheus metrics endpoint that exposes build and version information, including the application version, Python version, platform, and architecture.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

  • Added bambuddy_build_info gauge metric to backend/app/api/routes/metrics.py
  • Metric labels include: version, python_version, platform, architecture
  • Uses existing APP_VERSION from config and Python's platform module

Screenshots

Example metric output:

# HELP bambuddy_build_info Build and version information
# TYPE bambuddy_build_info gauge
bambuddy_build_info{version="0.2.2",python_version="3.12.0",platform="Linux",architecture="x86_64"} 1

Testing

  • I have tested this on my local machine
  • I have tested with my printer model:

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes

This follows the standard Prometheus _build_info convention (similar to prometheus_build_info). The metric always has value 1 and carries version/environment details as labels, making it useful for dashboards and alerting on version changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/633 **Author:** [@sw1nn](https://github.com/sw1nn) **Created:** 3/6/2026 **Status:** ✅ Merged **Merged:** 3/7/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `0.2.3b1` ← **Head:** `main` --- ### 📝 Commits (1) - [`ae80eaa`](https://github.com/maziggy/bambuddy/commit/ae80eaade0fba58e4e6b2f3023165a641f490e98) feat(metrics): add bambuddy_build_info metric ### 📊 Changes **1 file changed** (+17 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/metrics.py` (+17 -0) </details> ### 📄 Description ## Description Add a `bambuddy_build_info` gauge metric to the Prometheus metrics endpoint that exposes build and version information, including the application version, Python version, platform, and architecture. ## Related Issue <!-- No specific issue --> ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made - Added `bambuddy_build_info` gauge metric to `backend/app/api/routes/metrics.py` - Metric labels include: `version`, `python_version`, `platform`, `architecture` - Uses existing `APP_VERSION` from config and Python's `platform` module ## Screenshots Example metric output: ``` # HELP bambuddy_build_info Build and version information # TYPE bambuddy_build_info gauge bambuddy_build_info{version="0.2.2",python_version="3.12.0",platform="Linux",architecture="x86_64"} 1 ``` ## Testing - [x] I have tested this on my local machine - [ ] I have tested with my printer model: <!-- N/A - metrics endpoint only --> ## Checklist - [x] My code follows the project's coding style - [x] I have commented my code where necessary - [x] I have updated the documentation (if needed) - [x] My changes generate no new warnings - [x] I have tested my changes thoroughly ## Additional Notes This follows the standard Prometheus `_build_info` convention (similar to `prometheus_build_info`). The metric always has value `1` and carries version/environment details as labels, making it useful for dashboards and alerting on version changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:15:56 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1089
No description provided.