Skip to content

refactor(metrics): add generic helper to simplify metric creation#246

Merged
alecthomas merged 1 commit intomainfrom
aat/metrics-helper
Apr 2, 2026
Merged

refactor(metrics): add generic helper to simplify metric creation#246
alecthomas merged 1 commit intomainfrom
aat/metrics-helper

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

Replace verbose per-metric error-checked initialization with a generic
NewMetric[T] helper that handles type dispatch and panics on failure
(metric registration errors indicate programmer error, not runtime).

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Replace verbose per-metric error-checked initialization with a generic
NewMetric[T] helper that handles type dispatch and panics on failure
(metric registration errors indicate programmer error, not runtime).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alecthomas alecthomas requested a review from a team as a code owner April 2, 2026 11:43
@alecthomas alecthomas requested review from inez and removed request for a team April 2, 2026 11:43
@alecthomas alecthomas enabled auto-merge (squash) April 2, 2026 11:44
@alecthomas alecthomas merged commit 3d95e38 into main Apr 2, 2026
6 checks passed
@alecthomas alecthomas deleted the aat/metrics-helper branch April 2, 2026 11:45
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