Fix Prometheus in-flight metric handling#1948
Conversation
…etheus-metrics # Conflicts: # crates/cdk/src/mint/melt/mod.rs
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1948 +/- ##
==========================================
+ Coverage 65.16% 65.28% +0.11%
==========================================
Files 330 330
Lines 56742 57153 +411
==========================================
+ Hits 36976 37311 +335
- Misses 19766 19842 +76 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rics # Conflicts: # crates/cdk-sql-common/src/mint/quotes.rs # crates/cdk-sql-common/src/pool.rs
|
i have noticed a configuration issue with prometheus. the toml configuration to enable prometheus won't work. It's currently required to use the env variable fixing this rn. |
The issue is me having mixed toml and env configuration. my toml configuration does not include the postgres url. the parser is silently failing and falling back to env variables. I will address this in another PR that handles the configuration merge. |
- removed global metrics - rename lightning_payment to payment. - record lightning payment in make payment function.
asmogo
left a comment
There was a problem hiding this comment.
- updated tokio listener
- removed global metrics
- rename lightning_payment to payment.
- record lightning payment in make payment function.
We are not recording any fees.
| pub fn payment_method_label(&self) -> &str { | ||
| match self { | ||
| Self::Bolt11(_) => "bolt11", | ||
| Self::Bolt12(_) => "bolt12", | ||
| Self::Custom(options) => options.method.as_str(), | ||
| } | ||
| } |
Description
added a small MintMetricGuard that increments on creation, decrements on drop, and records success/error once.
Bolt11 and Bolt12 quote paths now close in-flight metrics on every normal/error path; Bolt12 uses get_melt_bolt12_quote.
swap metrics are recorded once at the top-level result boundary; removed the saga compensation double-decrement.
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just quick-checkbefore committingcrates/cdk-ffi)