Update Stripe to use usage-based meters - #689
Conversation
🤖 Claude Code ReviewPR: #689 Here's my review: PR Review: Billing migration — multi-price support + modular stripe cratesSummaryThis PR migrates from Issues1. RC dependency in production (
|
|
| Branch | u/ep/stripe-meter |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 3.87 µs(+14.54%)Baseline: 3.38 µs | 4.59 µs (84.28%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 3.84 µs(+14.00%)Baseline: 3.37 µs | 4.51 µs (85.23%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 26.22 µs(+2.45%)Baseline: 25.59 µs | 30.87 µs (84.95%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 2.80 µs(-1.59%)Baseline: 2.84 µs | 3.34 µs (83.72%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 2.80 µs(-1.63%)Baseline: 2.84 µs | 3.33 µs (84.06%) |
| head_version_insert/batch/10 | 📈 view plot 🚷 view threshold | 99.28 µs(+0.13%)Baseline: 99.15 µs | 123.19 µs (80.59%) |
| head_version_insert/batch/100 | 📈 view plot 🚷 view threshold | 234.22 µs(-0.75%)Baseline: 235.98 µs | 269.55 µs (86.89%) |
| head_version_insert/batch/255 | 📈 view plot 🚷 view threshold | 453.91 µs(-1.22%)Baseline: 459.52 µs | 490.25 µs (92.59%) |
| head_version_insert/batch/50 | 📈 view plot 🚷 view threshold | 158.55 µs(-0.48%)Baseline: 159.31 µs | 184.91 µs (85.75%) |
| threshold_query/join/10 | 📈 view plot 🚷 view threshold | 140.64 µs(-1.53%)Baseline: 142.83 µs | 171.24 µs (82.13%) |
| threshold_query/join/20 | 📈 view plot 🚷 view threshold | 156.09 µs(-0.52%)Baseline: 156.91 µs | 186.19 µs (83.83%) |
| threshold_query/join/5 | 📈 view plot 🚷 view threshold | 134.68 µs(-0.25%)Baseline: 135.02 µs | 161.16 µs (83.57%) |
| threshold_query/join/50 | 📈 view plot 🚷 view threshold | 196.15 µs(-0.82%)Baseline: 197.77 µs | 229.08 µs (85.62%) |
2cc0003 to
41c666d
Compare
41c666d to
678b9c1
Compare
Last year, [Stripe deprecated the old usage-based billing](https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-legacy-usage-based-billing). As we look to add bare metal runners, we will need to add a new usage-based billing product. Instead of managing both the old and new usage-based systems, move the current metrics based billing over to the new `meter`ed system. The actual transition will take place in #689 However, in order to have a smooth cutover, we will need to have multiple Stripe subscription items active at once. The current `default` keys will be used for now and then cutover to the new `metrics` keys.
678b9c1 to
d0463ff
Compare
d0463ff to
dad6136
Compare
Last year, Stripe deprecated the old usage-based billing. As we look to add bare metal runners, we will need to add a new usage-based billing product. Instead of managing both the old and new usage-based systems, move the current metrics based billing over to the new
metered system.