Commit 152ae90
authored
fix(client): deduplicate mic.capture_report trace emissions (#2189)
Reduces trace noise from `mic.capture_report` by only tracing when the
`capturesAudio` value actually changes, rather than on every periodic
emission during sustained silence. The internal `dispatchEvent`
continues firing on every callback so downstream consumers are
unaffected.
### 📝 Implementation notes
- Added a `lastCapturesAudio` variable scoped to each no-audio detector instance inside `MicrophoneManager.setup()`
- `tracer.trace('mic.capture_report', ...)` is now gated on `capturesAudio !== lastCapturesAudio`
- `streamClient.dispatchEvent(event)` remains unconditional
- The variable naturally resets when the detector is torn down on device switch or mic disable/re-enable, so the first emission from a new detector always traces1 parent 649aea2 commit 152ae90
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
173 | 179 | | |
174 | 180 | | |
175 | 181 | | |
| |||
0 commit comments