Documentation / @zerotal/devtools / index / TraceChannelDescriptor
Interface: TraceChannelDescriptor
Defined in: devtools/src/RequestTrace.ts:93
How a package's channel is displayed in the panel.
The descriptor crosses the wire to the browser, so it names fields rather than carrying formatter functions — a channel is declared once on the server and rendered generically, which is what lets a package add a tab without devtools shipping a renderer for it.
Example
trace.channel({
id: "auth",
label: "Auth",
badge: "event",
title: "detail",
meta: ["guard", "ip"],
warn: "failed",
});
Properties
id
id:
string
Defined in: devtools/src/RequestTrace.ts:95
Unique id — also the key under RequestTrace.channels.
label
label:
string
Defined in: devtools/src/RequestTrace.ts:97
Tab label in the panel.
badge?
optionalbadge?:string
Defined in: devtools/src/RequestTrace.ts:99
Entry field rendered as the row's leading badge.
title?
optionaltitle?:string
Defined in: devtools/src/RequestTrace.ts:101
Entry field rendered as the row's main text. Defaults to the badge field.
meta?
optionalmeta?:string[]
Defined in: devtools/src/RequestTrace.ts:103
Entry fields rendered as dim metadata beneath the title.
warn?
optionalwarn?:string
Defined in: devtools/src/RequestTrace.ts:105
Entry field whose truthiness marks the row — and the tab's badge — as a warning.
order?
optionalorder?:number
Defined in: devtools/src/RequestTrace.ts:107
Sort order among channel tabs. Lower sorts first. Defaults to 100.