@karmaniverous/aws-xray-tools
    Preparing search index...

    Function shouldEnableXray

    • Decide whether AWS X-Ray capture should be enabled based on capture mode and daemon configuration.

      Semantics:

      • mode: 'off' => disabled
      • mode: 'on' => enabled
      • mode: 'auto' => enabled only when daemonAddress is truthy

      Parameters

      • mode: XrayMode | undefined

        Capture mode.

      • daemonAddress: string | undefined

        Daemon address (typically process.env.AWS_XRAY_DAEMON_ADDRESS).

      Returns boolean

      True when capture should be enabled.