mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-11 17:41:29 -05:00
[PR #6202] feat: Add comprehensive Prometheus metrics support #7379
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/6202
Author: @rossigee
Created: 8/20/2025
Status: 🔄 Open
Base:
main← Head:feature/prometheus-metrics📝 Commits (10+)
9ed01aefeat: add comprehensive Prometheus metrics support0502936Drop verbose metrics functionality description.a4106aeDrop examples (should be in docs).c9563d6Remove introduced development dependency.2b1e989Whitespace fixes.387c2e9Merge branch 'main' into feature/prometheus-metrics672a1e5Add Prometheus metrics support5226d2ffix email as 2fa with auth requests (#6736)b5adeb5Update crates, web-vault, js, workflows (#6749)10e4476refactor: improve tooltips in diagnostics page (#6765)📊 Changes
44 files changed (+8107 additions, -8473 deletions)
View changed files
📝
.github/workflows/build.yml(+10 -3)📝
.github/workflows/check-templates.yml(+8 -0)📝
.github/workflows/hadolint.yml(+8 -4)📝
.github/workflows/release.yml(+16 -16)📝
.github/workflows/releasecache-cleanup.yml(+4 -0)📝
.github/workflows/trivy.yml(+6 -2)📝
.github/workflows/typos.yml(+6 -2)📝
.github/workflows/zizmor.yml(+6 -3)📝
.pre-commit-config.yaml(+1 -1)📝
Cargo.lock(+545 -381)📝
Cargo.toml(+31 -23)📝
README.md(+36 -0)📝
docker/DockerSettings.yaml(+3 -3)📝
docker/Dockerfile.alpine(+11 -11)📝
docker/Dockerfile.debian(+8 -8)📝
docker/Dockerfile.j2(+2 -2)➕
examples/metrics-config.env(+100 -0)📝
macros/Cargo.toml(+2 -2)📝
rust-toolchain.toml(+1 -1)📝
src/api/core/accounts.rs(+4 -5)...and 24 more files
📄 Description
Summary
This PR adds comprehensive Prometheus metrics support to Vaultwarden, providing observability into application performance, database health, authentication patterns, and business metrics.
Key Features
/metrics(disabled by default)--features enable_metricsMetrics Categories
Security Considerations
ENABLE_METRICS=trueDocumentation
METRICS.mdMONITORING.mdTest Plan
Breaking Changes
None - this is an optional feature that's disabled by default.
Files Added/Modified
src/api/metrics.rs- Metrics endpoint implementationMETRICS.md- Configuration and usage guideMONITORING.md- Complete monitoring setup guideexamples/metrics-config.env- Configuration examplesscripts/test-metrics.sh- Testing scriptCargo.toml- Added optional prometheus dependencyREADME.md- Added metrics feature documentationdocker/Dockerfile.debian- Support for extra features in build🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.