TrackEvent sends the event through the context's telemetry client, silently doing nothing when no client is present.
(ctx context.Context, event Event)
| 133 | // TrackEvent sends the event through the context's telemetry client, silently |
| 134 | // doing nothing when no client is present. |
| 135 | func TrackEvent(ctx context.Context, event Event) { |
| 136 | client := GetTelemetryClient(ctx) |
| 137 | if client == nil { |
| 138 | return |
| 139 | } |
| 140 | _ = client.Track(ctx, event.Name, event.Properties) |
| 141 | } |
| 142 | |
| 143 | // AuthStarted is emitted when the browser-based OAuth flow begins. |
| 144 | func AuthStarted(flow Flow, noBrowser bool) Event { |