Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ private IOtelInstrumentation InternalGetOtelInstrumentation()
try
{
return new OtelInstrumentation();
} catch (FileNotFoundException ex)
}
catch (Exception ex)
when (ex is FileNotFoundException
or TypeLoadException
or TypeInitializationException)
{
// Can happen in in-process Azure Functions: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4456
Logger.Warning("Failed instantiating OpenTelemetry instrumentation. Exception: " + ex.Message);
Expand Down Expand Up @@ -247,3 +251,4 @@ internal virtual IManagedIdentityKeyProvider GetManagedIdentityKeyProvider()
public IManagedIdentityKeyProvider ManagedIdentityKeyProvider => _miKeyProvider.Value;
}
}