Skip to content

Commit a4eb100

Browse files
committed
feat: track starter project name
1 parent 12d462b commit a4eb100

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/init/src/SliceMachineInitProcess.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export class SliceMachineInitProcess {
150150
await this.manager.telemetry.track({
151151
event: "command:init:start",
152152
repository: this.options.repository,
153+
starter: this.options.starter,
153154
});
154155

155156
await this.detectEnvironment();
@@ -202,6 +203,7 @@ export class SliceMachineInitProcess {
202203
event: "command:init:end",
203204
framework: this.context.framework.sliceMachineTelemetryID,
204205
repository: this.context.repository.domain,
206+
starter: this.options.starter,
205207
success: true,
206208
});
207209

@@ -300,6 +302,7 @@ Continue with next steps in Slice Machine.
300302
event: "command:init:end",
301303
framework: this.context.framework?.sliceMachineTelemetryID ?? "unknown",
302304
repository: this.context.repository?.domain || "",
305+
starter: this.options.starter,
303306
success: false,
304307
error: safeError,
305308
});

packages/manager/src/managers/telemetry/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ type SegmentEvent<
167167
} & TProperties;
168168

169169
type CommandInitStartSegmentEvent = SegmentEvent<
170-
typeof SegmentEventType.command_init_start
170+
typeof SegmentEventType.command_init_start,
171+
{ starter?: string }
171172
>;
172173

173174
// This event feels off, we have a dedicated `identify` method...
@@ -177,7 +178,7 @@ type CommandInitIdentifySegmentEvent = SegmentEvent<
177178

178179
type CommandInitEndSegmentEvent = SegmentEvent<
179180
typeof SegmentEventType.command_init_end,
180-
{ framework: string; success: boolean; error?: string }
181+
{ framework: string; success: boolean; starter?: string; error?: string }
181182
>;
182183

183184
type SliceSimulatorOpenSegmentEvent = SegmentEvent<

0 commit comments

Comments
 (0)