MCPcopy
hub / github.com/prisma/prisma / emitStepCompleted

Function emitStepCompleted

packages/cli/src/bootstrap/telemetry.ts:37–48  ·  view source on GitHub ↗
(ctx: TelemetryContext, stepName: string, durationMs: number)

Source from the content-addressed store, hash-verified

35}
36
37export async function emitStepCompleted(ctx: TelemetryContext, stepName: string, durationMs: number): Promise<void> {
38 if (isTelemetryDisabled()) return
39 try {
40 await eventCapture.capture(ctx.distinctId, 'activation:cli_step_completed', {
41 ...baseProperties(ctx),
42 step_name: stepName,
43 duration_ms: durationMs,
44 })
45 } catch {
46 // telemetry should never block the command
47 }
48}
49
50export async function emitStepSkipped(ctx: TelemetryContext, stepName: string): Promise<void> {
51 if (isTelemetryDisabled()) return

Callers 3

runMethod · 0.90
scaffoldTemplateMethod · 0.90
runInitMethod · 0.90

Calls 3

isTelemetryDisabledFunction · 0.85
basePropertiesFunction · 0.85
captureMethod · 0.65

Tested by

no test coverage detected