(invocationUUID uuid.UUID, event InitEvent, details *eventDetails)
| 242 | } |
| 243 | |
| 244 | func getInitCommonProps(invocationUUID uuid.UUID, event InitEvent, details *eventDetails) rudderstack.Properties { |
| 245 | props := rudderstack.NewProperties(). |
| 246 | Set("invocation_uuid", invocationUUID). |
| 247 | Set("source", event.Source). |
| 248 | Set("destination", event.Destination). |
| 249 | Set("accept_defaults", event.AcceptDefaults). |
| 250 | Set("spec_path", event.SpecPath) |
| 251 | |
| 252 | if event.Error != nil { |
| 253 | props.Set("error", event.Error.Error()) |
| 254 | } |
| 255 | |
| 256 | if details != nil { |
| 257 | userID, userEmail := getUserIDEmail(details.user, details.currentTeam) |
| 258 | |
| 259 | props.Set("team", details.currentTeam). |
| 260 | Set("$groups", rudderstack.NewProperties(). |
| 261 | Set("team", details.currentTeam)). |
| 262 | Set("environment", details.environment). |
| 263 | Set("user_id", userID). |
| 264 | Set("user_email", userEmail) |
| 265 | } |
| 266 | |
| 267 | return props |
| 268 | } |
| 269 | |
| 270 | func TrackInitStarted(ctx context.Context, invocationUUID uuid.UUID, event InitEvent) { |
| 271 | if client == nil { |
no test coverage detected