getDisableReason

Return the first matching environment opt-out: do-not-track, Threadplane disable, or CI. Checks process.env by default and recognizes only 1, true, TRUE, and yes as enabled flags. Returns null when none match; programmatic and browser opt-outs are not checked.

import { getDisableReason } from '@threadplane/telemetry';

Declaration · overload 1

export declare function getDisableReason(env?: NodeJS.ProcessEnv): DisableReason;

Parameters

env · optional
NodeJS.ProcessEnv

Returns

DisableReason