Skip to content

Commit 09173fa

Browse files
authored
telemetry: improve collapse ("debounce") log message #4177
- mention the count - place `%O` at the end because complex keys may format as multi-line Example: 2023-12-15 12:28:11 [DEBUG]: telemetry: collapsing 4 "aws.previewStateMachine" metrics. key={}
1 parent 9b05a3f commit 09173fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/vscode/commands2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ function getInstrumenter(
460460
if (!telemetryName && info?.startTime !== undefined && currentTime - info.startTime < threshold) {
461461
info.debounceCount += 1
462462
TelemetryDebounceInfo.instance.set(id, info)
463-
getLogger().debug('commands: skipped telemetry for "%s" with key "%O"', id.id, id.compositeKey)
463+
getLogger().debug('telemetry: collapsing %d "%s" metrics. key=%O', info.debounceCount, id.id, id.compositeKey)
464464

465465
return undefined
466466
}

0 commit comments

Comments
 (0)