mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-11 09:13:02 +03:00
[PR #3634] [CLOSED] Provide Prometheus metrics endpoint #2956
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/3634
Author: @mtandersson
Created: 7/2/2023
Status: ❌ Closed
Base:
main← Head:prometheus📝 Commits (1)
4193f4bProvide prometheus metrics endpoint📊 Changes
8 files changed (+213 additions, -17 deletions)
View changed files
📝
Cargo.lock(+102 -8)📝
Cargo.toml(+5 -0)➕
src/api/metrics.rs(+54 -0)📝
src/api/mod.rs(+2 -0)📝
src/config.rs(+3 -0)📝
src/db/models/organization.rs(+6 -0)📝
src/main.rs(+2 -1)📝
src/util.rs(+39 -8)📄 Description
This makes it possible to enable /metrics to provide Prometheus metrics (protected by PROMETHEUS_ENABLED flag).
I did not spend super much time on enable every possible metrics as I wanted to seek feedback before. It should be easy to add more metrics later.
This pull request also addresses issue #496
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.