(ctx context.Context, invocationUUID uuid.UUID, event InitEvent)
| 295 | } |
| 296 | |
| 297 | func TrackInitCompleted(ctx context.Context, invocationUUID uuid.UUID, event InitEvent) { |
| 298 | if client == nil { |
| 299 | return |
| 300 | } |
| 301 | |
| 302 | details := getSyncEventDetails(ctx) |
| 303 | if details != nil && details.isCurrentTeamInternal { |
| 304 | return |
| 305 | } |
| 306 | |
| 307 | status := "success" |
| 308 | if event.Error != nil { |
| 309 | status = "error" |
| 310 | } |
| 311 | |
| 312 | props := getInitCommonProps(invocationUUID, event, details). |
| 313 | Set("status", status) |
| 314 | |
| 315 | if details != nil { |
| 316 | _ = client.Enqueue(rudderstack.Track{ |
| 317 | UserId: details.user.ID.String(), |
| 318 | Event: "init_completed", |
| 319 | Properties: props, |
| 320 | }) |
| 321 | return |
| 322 | } |
| 323 | |
| 324 | _ = client.Enqueue(rudderstack.Track{ |
| 325 | AnonymousId: invocationUUID.String(), |
| 326 | Event: "init_completed", |
| 327 | Properties: props, |
| 328 | }) |
| 329 | } |
| 330 | |
| 331 | func Close() { |
| 332 | if client == nil { |
nothing calls this directly
no test coverage detected