| 1556 | * read back. Port 1 connection-refuses immediately, so detection resolves |
| 1557 | * without any network dependency. */ |
| 1558 | const recordingTracer = (spans: Array<Tracer.NativeSpan>) => |
| 1559 | Tracer.make({ |
| 1560 | span: (options) => { |
| 1561 | const span = new Tracer.NativeSpan(options); |
| 1562 | spans.push(span); |
| 1563 | return span; |
| 1564 | }, |
| 1565 | context: (primitive, fiber) => primitive["~effect/Effect/evaluate"](fiber), |
| 1566 | }); |
| 1567 | |
| 1568 | /** Serializes spans the way the OTel export bridge would see them — |
| 1569 | * attributes, events, and, for a failed span, the error channel |