MCPcopy Create free account
hub / github.com/cli/cli / RecordStorage

Method RecordStorage

pkg/cmd/auth/shared/telemetry.go:87–96  ·  view source on GitHub ↗

RecordStorage captures where the credential was stored: keyring when a secure store was used, plaintext otherwise.

(insecureStorageUsed bool)

Source from the content-addressed store, hash-verified

85
86// RecordStorage captures where the credential was stored: keyring when a secure store was used, plaintext otherwise.
87func (e *AuthTelemetryEvent) RecordStorage(insecureStorageUsed bool) {
88 if e == nil {
89 return
90 }
91 storage := "keyring"
92 if insecureStorageUsed {
93 storage = "plaintext"
94 }
95 e.pendingEvent.UpsertDimensions(ghtelemetry.Dimensions{"storage_type": storage})
96}
97
98// RecordSuccess marks the invocation as having stored a credential successfully.
99func (e *AuthTelemetryEvent) RecordSuccess() {

Callers 5

refreshRunFunction · 0.80
LoginFunction · 0.80

Calls 1

UpsertDimensionsMethod · 0.65