Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ SetSampleRate
Method
SetSampleRate
internal/gh/ghtelemetry/telemetry.go:35–35 ·
view source on GitHub ↗
(rate int)
Source
from the content-addressed store, hash-verified
33
type
InvocationRecorder
interface
{
34
EventRecorder
35
SetSampleRate(rate int)
36
}
37
38
// Service collects telemetry for one command execution and sends it on Finish.
Callers
9
NewCmdRefresh
Function · 0.65
BeginAuthTelemetry
Function · 0.65
NewCmdLogin
Function · 0.65
NewCmdCopilot
Function · 0.65
NewCmdSkills
Function · 0.65
TestServicePromotesAllEventsBeforeCompletion
Function · 0.65
TestServiceDisablingOverridesPromotedPendingEvents
Function · 0.65
TestServiceReducingSampleRateExcludesInvocation
Function · 0.65
BeginTelemetry
Function · 0.65
Implementers
3
InvocationRecorderSpy
internal/telemetry/fake.go
service
internal/telemetry/telemetry.go
NoOpService
internal/telemetry/telemetry.go
Calls
no outgoing calls
Tested by
3
TestServicePromotesAllEventsBeforeCompletion
Function · 0.52
TestServiceDisablingOverridesPromotedPendingEvents
Function · 0.52
TestServiceReducingSampleRateExcludesInvocation
Function · 0.52