RecordStorage captures where the credential was stored: keyring when a secure store was used, plaintext otherwise.
(insecureStorageUsed bool)
| 85 | |
| 86 | // RecordStorage captures where the credential was stored: keyring when a secure store was used, plaintext otherwise. |
| 87 | func (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. |
| 99 | func (e *AuthTelemetryEvent) RecordSuccess() { |