Description
src/telemetry.ts emits events but does not attach a parent span context when events are nested inside an active trace. This means distributed traces lose their parent-child relationship, making root-cause analysis in tracing backends difficult.
Acceptance Criteria
Context
- Target file:
src/telemetry.ts
- Must not break existing event consumers that do not read
parentSpanId
Description
src/telemetry.tsemits events but does not attach a parent span context when events are nested inside an active trace. This means distributed traces lose their parent-child relationship, making root-cause analysis in tracing backends difficult.Acceptance Criteria
TelemetryEventtype includes an optionalparentSpanIdfieldparentSpanId: undefinedContext
src/telemetry.tsparentSpanId