diff --git a/src/Cody.Core/Logging/SentryLog.cs b/src/Cody.Core/Logging/SentryLog.cs index b165263..b413120 100644 --- a/src/Cody.Core/Logging/SentryLog.cs +++ b/src/Cody.Core/Logging/SentryLog.cs @@ -40,6 +40,7 @@ public static void Initialize() { if (se.Exception?.Source?.StartsWith(CodyAssemblyPrefix) ?? false) return se; if (se.Exception?.InnerException?.Source?.StartsWith(CodyAssemblyPrefix) ?? false) return se; + if (se.Message != null) return se; if (se.SentryExceptions == null) return se; foreach(var ex in se.SentryExceptions) diff --git a/src/Cody.VisualStudio/CodyPackage.cs b/src/Cody.VisualStudio/CodyPackage.cs index f8ab64e..842b23e 100644 --- a/src/Cody.VisualStudio/CodyPackage.cs +++ b/src/Cody.VisualStudio/CodyPackage.cs @@ -96,6 +96,7 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke InitializeAgent(); + ReportSentryVsVersion(); } catch (Exception ex) { @@ -146,6 +147,15 @@ private void InitializeServices() Logger.Info($"Visual Studio version: {VsVersionService.DisplayVersion} ({VsVersionService.EditionName})"); } + private void ReportSentryVsVersion() + { + SentrySdk.ConfigureScope(scope => + { + scope.SetTag("vs", VsVersionService.DisplayVersion); + SentrySdk.CaptureMessage("Initialized"); + }); + } + private static void InitializeTrace() { if (Configuration.Trace)