mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-21 21:47:05 +00:00
Better Runtime names
This commit is contained in:
parent
f25bfe9d28
commit
15e07f72d4
2 changed files with 15 additions and 2 deletions
|
@ -32,6 +32,19 @@ static PlatformInfo()
|
|||
public static bool IsMono => Platform == PlatformType.Mono;
|
||||
public static bool IsDotNet => Platform == PlatformType.DotNet;
|
||||
|
||||
public static string PlatformName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsDotNet)
|
||||
{
|
||||
return ".NET";
|
||||
}
|
||||
|
||||
return "Mono";
|
||||
}
|
||||
}
|
||||
|
||||
public abstract Version Version { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public SentryTarget(string dsn)
|
|||
|
||||
|
||||
_client.Tags.Add("osfamily", OsInfo.Os.ToString());
|
||||
_client.Tags.Add("runtime", PlatformInfo.Platform.ToString().ToLower());
|
||||
_client.Tags.Add("runtime", PlatformInfo.PlatformName);
|
||||
_client.Tags.Add("culture", Thread.CurrentThread.CurrentCulture.Name);
|
||||
_client.Tags.Add("branch", BuildInfo.Branch);
|
||||
_client.Tags.Add("version", BuildInfo.Version.ToString());
|
||||
|
@ -142,7 +142,7 @@ protected override void Write(LogEventInfo logEvent)
|
|||
|
||||
sentryEvent.Tags.Add("os_name", osName);
|
||||
sentryEvent.Tags.Add("os_version", $"{osName} {osVersion}");
|
||||
sentryEvent.Tags.Add("runtime_version", $"{PlatformInfo.Platform} {runTimeVersion}");
|
||||
sentryEvent.Tags.Add("runtime_version", $"{PlatformInfo.PlatformName} {runTimeVersion}");
|
||||
|
||||
_client.Capture(sentryEvent);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue