<PackageReference Include="OpenTelemetry" Version="1.21.0-rc.1" />

OpenTelemetry.Internal.ConfigurationAliasPrecedence

Chooses between an OTEL_* variable and the configuration section key for the same option by provider order, as .NET chooses between providers for a single key: the value from the later provider wins. When both come from the same provider, or the configuration does not expose its providers, the section key wins.
namespace OpenTelemetry.Internal { internal static class ConfigurationAliasPrecedence { public static IConfiguration CreateBindableSection(IConfiguration configuration, string sectionPath, IReadOnlyList<ConfigurationAlias> aliases, Func<string, bool> isVariableApplied, IEnumerable<string> excludedKeys); public static bool IsFromLaterProvider(IConfiguration configuration, string key, string otherKey); } }