MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / TrackInitCompleted

Function TrackInitCompleted

cli/internal/analytics/client.go:297–329  ·  view source on GitHub ↗
(ctx context.Context, invocationUUID uuid.UUID, event InitEvent)

Source from the content-addressed store, hash-verified

295}
296
297func 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
331func Close() {
332 if client == nil {

Callers

nothing calls this directly

Calls 4

getSyncEventDetailsFunction · 0.85
getInitCommonPropsFunction · 0.85
SetMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected