Commit 7cba673
Fix ObservableGauge accumulating OTel callbacks on repeated observe() 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>1 parent c6dfbc7 commit 7cba673
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
241 | 251 | | |
242 | 252 | | |
243 | 253 | | |
244 | 254 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 255 | + | |
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| |||
0 commit comments