<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />

Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.Extensions

public static class Extensions
Provides a set of extension methods for tracing.
public static string ToInvariantString(this Exception exception)

Returns a culture-independent string representation of the given exception object, appropriate for diagnostics tracing.