Conversation
Implements an asynchronous gauge whose value is collected via a callback at export time, following the OpenTelemetry observable instrument pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR adds The implementation is clean and well-structured:
Confidence Score: 5/5Safe to merge — no P0/P1 issues found; the prior callback-accumulation concern is properly addressed. All changed files reviewed; the critical prior concern about OTel callback accumulation is correctly resolved by registering the OTel-level callback once in the constructor. No new bugs or regressions identified. Tests cover creation, callback invocation, caching, and null parameters. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "Align Test adapter observe() to replace ..." | Re-trigger Greptile |
… calls Register the OTel-level callback once in the constructor and delegate to a single replaceable closure, so calling observe() again replaces rather than adds another callback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…try adapter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
ObservableGaugeabstract base class — an asynchronous gauge whose value is collected via a callback at export timecreateObservableGauge()across all three adapters (None,Test,OpenTelemetry)OpenTelemetryTestCasecovering creation, observe callback, caching, and null parametersObservableGaugeUsage
Test plan
composer lint(Pint PSR-12) passescomposer check(PHPStan level max) passes🤖 Generated with Claude Code