internal static bool ShouldWarnEnvironmentVariableMissing()

in src/AzureFunctions.PowerShell.OpenTelemetry.SDK/FunctionsEnvironmentWarningChecker.cs [31:46]


        internal static bool ShouldWarnEnvironmentVariableMissing(out string? warningMessage) 
        {
            warningMessage = null;

            if (!_environmentVariableWarned && !IsFunctionsEnvironmentVariableEnabled())
            {
                warningMessage = _warningMessage;

                _environmentVariableWarned = true;
                return true;
            }

            // Even if we didn't warn, we still set this to true to prevent expensive env checks for future calls
            _environmentVariableWarned = true;
            return false;
        }