Skip to content

Commit 8b3d9ec

Browse files
authored
feat: track starter project name on initialization (#1771)
1 parent 12d462b commit 8b3d9ec

4 files changed

Lines changed: 12 additions & 8 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/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"file-type": "^18.2.1",
7979
"fp-ts": "^2.13.1",
8080
"get-port": "^6.1.2",
81-
"h3": "^1.15.5",
81+
"h3": "^1.15.6",
8282
"io-ts": "^2.2.20",
8383
"io-ts-reporters": "^2.0.1",
8484
"io-ts-types": "^0.5.19",

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<

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11027,7 +11027,7 @@ __metadata:
1102711027
file-type: ^18.2.1
1102811028
fp-ts: ^2.13.1
1102911029
get-port: ^6.1.2
11030-
h3: ^1.15.5
11030+
h3: ^1.15.6
1103111031
hook-std: 3.0.0
1103211032
io-ts: ^2.2.20
1103311033
io-ts-reporters: ^2.0.1
@@ -22855,9 +22855,9 @@ __metadata:
2285522855
languageName: node
2285622856
linkType: hard
2285722857

22858-
"h3@npm:^1.12.0, h3@npm:^1.15.1, h3@npm:^1.15.2, h3@npm:^1.15.3, h3@npm:^1.15.5":
22859-
version: 1.15.5
22860-
resolution: "h3@npm:1.15.5"
22858+
"h3@npm:^1.12.0, h3@npm:^1.15.1, h3@npm:^1.15.2, h3@npm:^1.15.3, h3@npm:^1.15.6":
22859+
version: 1.15.10
22860+
resolution: "h3@npm:1.15.10"
2286122861
dependencies:
2286222862
cookie-es: ^1.2.2
2286322863
crossws: ^0.3.5
@@ -22868,7 +22868,7 @@ __metadata:
2286822868
radix3: ^1.1.2
2286922869
ufo: ^1.6.3
2287022870
uncrypto: ^0.1.3
22871-
checksum: 455f58681de2b789b39af45067db8dde35234c18d86ec5068687300aae3c0225f85edcd110906493e087407e2caaa1f292352769c484284e72558d7677c29899
22871+
checksum: b7fb212acc20dca36b892af710beee2294bb3cf4c6f03445435bbbc791ec28903f18bd64cb526e4e62a4ee80658be4039639ca5fb0d67b3486dcbd4c83e92f15
2287222872
languageName: node
2287322873
linkType: hard
2287422874

0 commit comments

Comments
 (0)