PhasSubscribers
Bun

property

diagnostics_channel.BoundedChannel.hasSubscribers

readonly hasSubscribers: boolean

Check if any of the start or end channels have subscribers.

import { boundedChannel } from 'node:diagnostics_channel';

const wc = boundedChannel('my-operation');

if (wc.hasSubscribers) {
  // There are subscribers, perform traced operation
}