tracingChannel
external fun <StoreType, ContextType : Any> tracingChannel(nameOrChannels: String): TracingChannel<StoreType, ContextType>(source)
external fun <StoreType, ContextType : Any> tracingChannel(nameOrChannels: TracingChannelCollection<StoreType, ContextType>): TracingChannel<StoreType, ContextType>(source)
Creates a TracingChannel
wrapper for the given TracingChannel Channels
. If a name is given, the corresponding tracing channels will be created in the form of tracing:${name}:${eventType}
where eventType
corresponds to the types of TracingChannel Channels
.
import diagnostics_channel from 'node:diagnostics_channel';
const channelsByName = diagnostics_channel.tracingChannel('my-channel');
// or...
const channelsByCollection = diagnostics_channel.tracingChannel({
start: diagnostics_channel.channel('tracing:my-channel:start'),
end: diagnostics_channel.channel('tracing:my-channel:end'),
asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'),
asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'),
error: diagnostics_channel.channel('tracing:my-channel:error'),
});
Content copied to clipboard
Since
v19.9.0
Return
Collection of channels to trace with
Parameters
nameOrChannels
Channel name or object containing all the TracingChannel Channels