All files / src/core/observability index.ts

100% Statements 2/2
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28                                                    36x  
/**
 * The observability seam: what Cloudflare already records, and the one thing it
 * does not.
 *
 * @remarks
 * Most of what a Worker needs to be observable is not code. Workers Logs
 * ingests every line `console.*` writes and indexes its JSON fields, stamping
 * the script name, the outcome, the ray id, and the CPU and wall time on each
 * invocation; Workers Traces spans the bindings a request touched. None of that
 * is reimplemented here, and application code that emits a second copy of any
 * of it is adding a field to keep in step, not a fact.
 *
 * What the platform cannot supply is a thread through a **fan-out**. A request
 * id stops at the edge, and a Service Binding hop starts a subrequest the edge
 * never saw. {@link RequestCorrelation} is that thread, and it is the whole
 * module.
 *
 * The names the lines are filed under live one directory up, in
 * [`constants/`](../../constants/index.ts), because an event name is a value
 * fixed for every caller rather than something this layer computes.
 *
 * @module
 * @author Bayu Dwiyan Satria
 * @version 1.2.0
 * @since 1.2.0
 */
export { RequestCorrelation } from '@/core/observability/RequestCorrelation'