OpenTelemetry SDK
    Preparing search index...

    Function getBooleanFromEnv

    • Retrieves a boolean value from an environment variable.

      • Trims leading and trailing whitespace and ignores casing.
      • Returns false if the environment variable is empty, unset, or contains only whitespace.
      • Returns false for strings that cannot be mapped to a boolean.

      Parameters

      • key: string

        The name of the environment variable to retrieve.

      Returns boolean

      • The boolean value or false if the environment variable is unset empty, unset, or contains only whitespace.