identifyAuthenticatedUser emits a telemetry Identify for the user that just authenticated. It is a no-op when no identified token is present.
(ctx context.Context)
| 187 | // identifyAuthenticatedUser emits a telemetry Identify for the user that just |
| 188 | // authenticated. It is a no-op when no identified token is present. |
| 189 | func identifyAuthenticatedUser(ctx context.Context) { |
| 190 | if !applyStoredIdentity(ctx) { |
| 191 | return |
| 192 | } |
| 193 | client := telemetry.GetTelemetryClient(ctx) |
| 194 | if client == nil { |
| 195 | return |
| 196 | } |
| 197 | _ = client.Identify(ctx) |
| 198 | } |
| 199 | |
| 200 | // applyStoredIdentity copies the persisted user identity from the stored token |
| 201 | // onto the request's telemetry metadata. It reports whether an identity was |
no test coverage detected