From 24b3a2ef3b9d8ed8047c155a2952c36de9feb7cb Mon Sep 17 00:00:00 2001 From: gotbadger Date: Thu, 12 Feb 2026 16:58:47 +0000 Subject: [PATCH] CM-59285: disable sentry and bump cli to 3.9.3 --- .github/workflows/lint_build_publish.yml | 1 - CHANGELOG.md | 3 ++ ...de.VisualStudio.Extension.14.0-16.0.csproj | 7 --- .../Cycode.VisualStudio.Extension.17.0.csproj | 7 --- .../Constants.cs | 10 +---- ...de.VisualStudio.Extension.Shared.projitems | 1 - .../CycodePackage.cs | 3 -- .../Sentry/SentryInit.cs | 45 ------------------- .../Services/CliService.cs | 5 --- .../Services/LoggerService.cs | 8 ---- 10 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 src/extension/Cycode.VisualStudio.Extension.Shared/Sentry/SentryInit.cs diff --git a/.github/workflows/lint_build_publish.yml b/.github/workflows/lint_build_publish.yml index 4660b17..4dcb93b 100644 --- a/.github/workflows/lint_build_publish.yml +++ b/.github/workflows/lint_build_publish.yml @@ -41,7 +41,6 @@ jobs: msbuild src\extension\Cycode.VisualStudio.Extension.14.0-16.0\Cycode.VisualStudio.Extension.14.0-16.0.csproj /t:Rebuild /p:Configuration=Release msbuild src\extension\Cycode.VisualStudio.Extension.17.0\Cycode.VisualStudio.Extension.17.0.csproj /t:Rebuild /p:Configuration=Release env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} DeployExtension: False - name: Upload Cycode.VisualStudio.Extension.14.0-16.0 artifact diff --git a/CHANGELOG.md b/CHANGELOG.md index 999f471..8461cbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ## [Unreleased] +- Remove Sentry integration +- Increase required CLI version to 3.9.3 + ## [1.11.0] - 2025-11-17 - Increase required CLI version to 3.6.0 diff --git a/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/Cycode.VisualStudio.Extension.14.0-16.0.csproj b/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/Cycode.VisualStudio.Extension.14.0-16.0.csproj index 7608c48..20a3ede 100644 --- a/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/Cycode.VisualStudio.Extension.14.0-16.0.csproj +++ b/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/Cycode.VisualStudio.Extension.14.0-16.0.csproj @@ -45,12 +45,6 @@ prompt 4 - - cycode - visual-studio-extension - true - true - @@ -76,7 +70,6 @@ - diff --git a/src/extension/Cycode.VisualStudio.Extension.17.0/Cycode.VisualStudio.Extension.17.0.csproj b/src/extension/Cycode.VisualStudio.Extension.17.0/Cycode.VisualStudio.Extension.17.0.csproj index 894bbe3..c477077 100644 --- a/src/extension/Cycode.VisualStudio.Extension.17.0/Cycode.VisualStudio.Extension.17.0.csproj +++ b/src/extension/Cycode.VisualStudio.Extension.17.0/Cycode.VisualStudio.Extension.17.0.csproj @@ -45,12 +45,6 @@ prompt 4 - - cycode - visual-studio-extension - true - true - @@ -76,7 +70,6 @@ - diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Constants.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Constants.cs index 7b4682e..3ca9dcc 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Constants.cs +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Constants.cs @@ -4,7 +4,7 @@ namespace Cycode.VisualStudio.Extension.Shared; public static class Constants { public const string AppName = "visual_studio_extension"; - public const string RequiredCliVersion = "3.6.0"; + public const string RequiredCliVersion = "3.9.3"; public const string CycodeDomain = "cycode.com"; @@ -18,14 +18,6 @@ public static class Constants { public const int PluginAutoSaveFlushInitialDelaySec = 0; public const int PluginAutoSaveFlushDelaySec = 5; - public const string SentryDsn = - "https://091cdc01001e4600a30ac02f1b82c4c5@o1026942.ingest.us.sentry.io/4507543901700096"; - - public const bool SentryDebug = false; - public const float SentrySampleRate = 1.0f; - public const bool SentrySendDefaultPii = false; - public const bool SentryAutoSessionTracking = true; - public static readonly string PluginPath = GetPluginsPath(); public static readonly string DefaultCliPath = GetDefaultCliPath(); diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Cycode.VisualStudio.Extension.Shared.projitems b/src/extension/Cycode.VisualStudio.Extension.Shared/Cycode.VisualStudio.Extension.Shared.projitems index d0bd3f9..4ab7653 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Cycode.VisualStudio.Extension.Shared.projitems +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Cycode.VisualStudio.Extension.Shared.projitems @@ -72,7 +72,6 @@ - diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/CycodePackage.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/CycodePackage.cs index 129ae41..dce9920 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/CycodePackage.cs +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/CycodePackage.cs @@ -7,7 +7,6 @@ using System.Threading; using Cycode.VisualStudio.Extension.Shared.Components.ToolWindows; using Cycode.VisualStudio.Extension.Shared.Options; -using Cycode.VisualStudio.Extension.Shared.Sentry; using Cycode.VisualStudio.Extension.Shared.Services; using Cycode.VisualStudio.Extension.Shared.Services.ErrorList; using Cycode.VisualStudio.Extension.Shared.Services.ErrorTagger; @@ -34,8 +33,6 @@ protected override async Task InitializeAsync( Startup.ConfigureServices(serviceCollection); ServiceLocator.SetLocatorProvider(serviceCollection.BuildServiceProvider()); - SentryInit.Init(); - ILoggerService logger = ServiceLocator.GetService(); logger.Initialize(); diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Sentry/SentryInit.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Sentry/SentryInit.cs deleted file mode 100644 index d704bc8..0000000 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Sentry/SentryInit.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections.Generic; -using Cycode.VisualStudio.Extension.Shared.Options; -using Sentry; - -namespace Cycode.VisualStudio.Extension.Shared.Sentry; - -public static class SentryInit { - private static string GetSentryRelease() { - return $"{Constants.AppName}@{Vsix.Version}"; - } - - private static bool IsSentryDisabled() { - return General.Instance.IsOnPremiseInstallation(); - } - - public static void Init() { - SentrySdk.Init(options => { - options.Dsn = Constants.SentryDsn; - options.Debug = Constants.SentryDebug; - options.Release = GetSentryRelease(); - options.AutoSessionTracking = Constants.SentryAutoSessionTracking; - options.SampleRate = Constants.SentrySampleRate; - options.SendDefaultPii = Constants.SentrySendDefaultPii; - options.ServerName = ""; - - options.SetBeforeSend((sentryEvent, _) => IsSentryDisabled() ? null : sentryEvent); - - options.DisableUnobservedTaskExceptionCapture(); - options.DisableAppDomainUnhandledExceptionCapture(); - options.DisableNetFxInstallationsIntegration(); - }); - } - - public static void SetupScope(string userId, string tenantId) { - SentrySdk.ConfigureScope(scope => { - scope.SetTag("tenant_id", tenantId); - scope.User = new SentryUser { - Id = userId, - Other = new Dictionary { - { "tenant_id", tenantId } - } - }; - }); - } -} \ No newline at end of file diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Services/CliService.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Services/CliService.cs index 59c41ad..da51fdf 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Services/CliService.cs +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Services/CliService.cs @@ -12,7 +12,6 @@ using Cycode.VisualStudio.Extension.Shared.Cli.DTO.ScanResult.Secret; using Cycode.VisualStudio.Extension.Shared.DTO; using Cycode.VisualStudio.Extension.Shared.Helpers; -using Cycode.VisualStudio.Extension.Shared.Sentry; using Cycode.VisualStudio.Extension.Shared.Services.ErrorList; namespace Cycode.VisualStudio.Extension.Shared.Services; @@ -74,10 +73,6 @@ public async Task SyncStatusAsync(CancellationToken cancellationToken = default) if (!tempState.CliAuthed) ShowErrorNotification("You are not authenticated in Cycode. Please authenticate"); - else { - if (processedResult.Result.UserId != null && processedResult.Result.TenantId != null) - SentryInit.SetupScope(processedResult.Result.UserId, processedResult.Result.TenantId); - } } public async Task DoAuthAsync(CancellationToken cancellationToken = default) { diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Services/LoggerService.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Services/LoggerService.cs index 85322c3..6955025 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Services/LoggerService.cs +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Services/LoggerService.cs @@ -1,6 +1,5 @@ using Cycode.VisualStudio.Extension.Shared.DTO; using Microsoft.VisualStudio.Shell.Interop; -using Sentry; namespace Cycode.VisualStudio.Extension.Shared.Services; @@ -128,12 +127,5 @@ private void Log(LogLevel level, Exception exception, string message, params obj _pane?.OutputString(logMessage); Console.Write(logMessage); - - if (level != LogLevel.Error) return; - - if (exception != null) - SentrySdk.CaptureException(exception); - else - SentrySdk.CaptureMessage(formattedMessage, SentryLevel.Error); } } \ No newline at end of file