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 @@ -81,11 +81,13 @@ private static int GetCurrentProcessId()
#endif
}

private static string? GetOsType()
=> RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "windows"
: RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "darwin"
: RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? "linux"
: null;
private static string? GetOsType() => true switch
{
_ when RuntimeInformation.IsOSPlatform(OSPlatform.Windows) => "windows",
_ when RuntimeInformation.IsOSPlatform(OSPlatform.OSX) => "darwin",
_ when RuntimeInformation.IsOSPlatform(OSPlatform.Linux) => "linux",
_ => null,
Comment thread
Evangelink marked this conversation as resolved.
Resolved
};

/// <summary>
/// Maps <see cref="Architecture"/> onto the values allowed by the OpenTelemetry <c>host.arch</c> enum, which
Expand Down
Loading