Skip to content

feat(metrique-util): prototype request-scoped metrics pools - #358

Draft
rcoh wants to merge 1 commit into
metrics-pool-rfcfrom
metrics-pool-prototype
Draft

feat(metrique-util): prototype request-scoped metrics pools#358
rcoh wants to merge 1 commit into
metrics-pool-rfcfrom
metrics-pool-prototype

Conversation

@rcoh

@rcoh rcoh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • implement MetricsPool and cloneable MetricsPoolHandle for heterogeneous child metrics flattened into a parent entry
  • add explicit-handle and poll-scoped current-pool APIs with runtime casing, prefixes, close semantics, and rate-limited last-write-wins collision handling
  • add an AWS SDK interceptor example with scoped collection, explicit injection, and global fallback
  • add focused tests and a Divan benchmark for pool sizes 1, 4, and 16

Stack

This draft implementation is stacked on RFC PR #357. Its diff contains only the prototype; retarget it to main after #357 merges.

Testing

  • cargo +nightly fmt --all
  • cargo clippy --workspace --all-features -- -D warnings
  • cargo +1.91 nextest run -p metrique-util --test metrics_pool (7 passed)
  • cargo +1.91 test -p metrique-util --example sdk-interceptor-metrics-pool --features metrics-pool (3 passed)
  • CARGO_INCREMENTAL=0 cargo +1.91 nextest run (697 passed)
  • cargo bench -p metrique-util --bench metrics_pool --features metrics-pool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant