Documentation / @zerotal/devtools / index / TraceSink
Interface: TraceSink
Defined in: devtools/src/tracing.ts:104
The buffer surface feature packages contribute to, bound in the container as
devtools.trace.
Each method buffers one entry against the request context it ran under; the request-finalise handler merges them into the trace and stamps each entry's offset from the request start.
Methods
channel()
channel(
descriptor):void
Defined in: devtools/src/tracing.ts:110
Declare a channel so its entries get a tab. Idempotent — a package can call this on every boot. A later declaration replaces an earlier one with the same id, so a package can refine its display without a restart.
Parameters
descriptor
Returns
void
record()
record(
ctx,channel,entry):void
Defined in: devtools/src/tracing.ts:117
Record one entry on a channel. offsetMs is stamped for you.
Unknown channel ids are still recorded — a channel declared after the fact picks up the entries already buffered for the request in flight.
Parameters
ctx
object
channel
string
entry
Record<string, unknown>
Returns
void
bufferQuery()
bufferQuery(
ctx,q):void
Defined in: devtools/src/tracing.ts:118
Parameters
ctx
object
q
Returns
void
bufferWarning()
bufferWarning(
ctx,w):void
Defined in: devtools/src/tracing.ts:119
Parameters
ctx
object
w
Returns
void
bufferMail()
bufferMail(
ctx,m):void
Defined in: devtools/src/tracing.ts:120
Parameters
ctx
object
m
Omit<MailEntry, "offsetMs">
Returns
void
bufferCache()
bufferCache(
ctx,c):void
Defined in: devtools/src/tracing.ts:121
Parameters
ctx
object
c
Omit<CacheEntry, "offsetMs">
Returns
void
bufferJob()
bufferJob(
ctx,j):void
Defined in: devtools/src/tracing.ts:122
Parameters
ctx
object
j
Omit<JobEntry, "offsetMs">
Returns
void