@@ -46,15 +46,11 @@ type EnvironmentInfo = {
4646
4747/**
4848 * Records a deployment's terminal transition as a single wide
49- * `deployment.lifecycle` span, backdated to span the deployment's real
50- * lifetime (createdAt → terminal) and carrying per-phase durations as
51- * attributes. This is THE per-deployment analytics event: build-path
52- * comparison dashboards and monitors are built on it (the attribute contract
53- * lives in ../deploymentTelemetry.ts).
54- *
55- * Call exactly once per terminal transition, only after a guarded status
56- * write confirmed this caller won the transition. Emitted on ROOT_CONTEXT
57- * with forceRecording so the trace sampler can never drop it. Never throws.
49+ * `deployment.lifecycle` span, backdated createdAt → terminal (attribute
50+ * contract in ../deploymentTelemetry.ts). Call exactly once, only after a
51+ * guarded status write confirmed this caller won the transition. Emitted on
52+ * ROOT_CONTEXT with forceRecording so the sampler can never drop it; never
53+ * throws.
5854 */
5955export function recordDeploymentLifecycle ( params : {
6056 status : TerminalDeploymentStatus ;
@@ -106,8 +102,7 @@ export function recordDeploymentLifecycle(params: {
106102 ROOT_CONTEXT
107103 ) ;
108104
109- // CANCELED is deliberately not an error: it is excluded from failure
110- // rates and tracked as its own volume.
105+ // CANCELED is deliberately not an error: it stays out of failure rates
111106 if ( isFailure ) {
112107 span . setStatus ( {
113108 code : SpanStatusCode . ERROR ,
@@ -126,9 +121,8 @@ export function recordDeploymentLifecycle(params: {
126121
127122/**
128123 * Records a deployment's creation as a zero-duration `deployment.initialized`
129- * event, the funnel counterpart to `deployment.lifecycle`: an initialized
130- * deployment with no lifecycle event after a few hours is either stuck
131- * non-terminal or hit an emission bug. Never throws.
124+ * event — the funnel counterpart to `deployment.lifecycle` for detecting
125+ * stuck deployments. Never throws.
132126 */
133127export function recordDeploymentInitialized ( params : {
134128 deployment : Pick <
0 commit comments