Skip to content

Commit 7085aa0

Browse files
committed
more accurate comments
1 parent ce2b563 commit 7085aa0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

coderd/telemetry/telemetry.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ type Reporter interface {
107107
// RunSnapshotter runs reporting in a loop. It should be called in a
108108
// goroutine to avoid blocking the caller.
109109
RunSnapshotter()
110-
// ReportDisabledIfNeeded reports disabled telemetry if there was at least one report sent
111-
// before the telemetry was disabled, and we haven't sent a report since the telemetry was disabled.
110+
// ReportDisabledIfNeeded reports telemetry in the following scenarios:
111+
// 1. The telemetry was enabled at some point, and we haven't reported the disabled telemetry yet.
112+
// 2. The telemetry was enabled at some point, we reported the disabled telemetry, the telemetry
113+
// was enabled again, then disabled again, and we haven't reported it yet.
112114
ReportDisabledIfNeeded() error
113115
}
114116

@@ -365,7 +367,7 @@ func (r *remoteReporter) ReportDisabledIfNeeded() error {
365367
// There are 2 scenarios in which we want to report the disabled telemetry:
366368
// 1. The telemetry was enabled at some point, and we haven't reported the disabled telemetry yet.
367369
// 2. The telemetry was enabled at some point, we reported the disabled telemetry, the telemetry
368-
// was enabled again, and then disabled again.
370+
// was enabled again, then disabled again, and we haven't reported it yet.
369371
//
370372
// - In both cases, the TelemetryEnabled item will be present.
371373
// - In case 1. the TelemetryDisabled item will not be present.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy