diff --git a/static/app/components/onboarding/productSelection.tsx b/static/app/components/onboarding/productSelection.tsx index 9794c0e8935872..4d60452af5fc2c 100644 --- a/static/app/components/onboarding/productSelection.tsx +++ b/static/app/components/onboarding/productSelection.tsx @@ -86,7 +86,7 @@ export const platformProductAvailability = { 'apple-macos': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], bun: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], capacitor: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.SESSION_REPLAY], - dotnet: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], + dotnet: [ProductSolution.PERFORMANCE_MONITORING], 'dotnet-aspnet': [ProductSolution.PERFORMANCE_MONITORING], 'dotnet-aspnetcore': [ProductSolution.PERFORMANCE_MONITORING], 'dotnet-awslambda': [ProductSolution.PERFORMANCE_MONITORING], diff --git a/static/app/data/platformCategories.tsx b/static/app/data/platformCategories.tsx index 52db3118248f0d..0eff3a244b4606 100644 --- a/static/app/data/platformCategories.tsx +++ b/static/app/data/platformCategories.tsx @@ -401,9 +401,6 @@ export const profiling: PlatformKey[] = [ 'apple', 'apple-ios', 'apple-macos', - 'dotnet', - 'dotnet-winforms', - 'dotnet-wpf', 'flutter', 'javascript', 'javascript-angular', diff --git a/static/app/gettingStartedDocs/dotnet/dotnet.spec.tsx b/static/app/gettingStartedDocs/dotnet/dotnet.spec.tsx index 18a17b05320d3d..defabc26ae3210 100644 --- a/static/app/gettingStartedDocs/dotnet/dotnet.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet/dotnet.spec.tsx @@ -40,17 +40,4 @@ describe('dotnet onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/options.TracesSampleRate/)) ).toBeInTheDocument(); }); - - it('renders profiling onboarding docs correctly', async () => { - renderWithOnboardingLayout(docs, { - selectedProducts: [ - ProductSolution.PERFORMANCE_MONITORING, - ProductSolution.PROFILING, - ], - }); - - expect( - await screen.findByText(textWithMarkupMatcher(/options.ProfilesSampleRate/)) - ).toBeInTheDocument(); - }); }); diff --git a/static/app/gettingStartedDocs/dotnet/dotnet.tsx b/static/app/gettingStartedDocs/dotnet/dotnet.tsx index 95ed45a408ccde..a8a6eae178e66c 100644 --- a/static/app/gettingStartedDocs/dotnet/dotnet.tsx +++ b/static/app/gettingStartedDocs/dotnet/dotnet.tsx @@ -15,45 +15,17 @@ import { getCrashReportModalIntroduction, } from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding'; import {t, tct} from 'sentry/locale'; -import {getDotnetProfilingOnboarding} from 'sentry/utils/gettingStartedDocs/dotnet'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; type Params = DocsParams; const getInstallSnippetPackageManager = (params: Params) => ` -Install-Package Sentry -Version ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; +Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`; const getInstallSnippetCoreCli = (params: Params) => ` -dotnet add package Sentry -v ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; +dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`; -const getInstallProfilingSnippetPackageManager = (params: Params) => ` -Install-Package Sentry.Profiling -Version ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; - -const getInstallProfilingSnippetCoreCli = (params: Params) => ` -dotnet add package Sentry.Profiling -v ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; - -enum DotNetPlatform { - WINDOWS = 0, - IOS_MACCATALYST = 1, -} - -const getConfigureSnippet = (params: Params, platform?: DotNetPlatform) => ` +const getConfigureSnippet = (params: Params) => ` using Sentry; SentrySdk.Init(options => @@ -79,28 +51,6 @@ SentrySdk.Init(options => // We recommend adjusting this value in production. options.TracesSampleRate = 1.0;` : '' - }${ - params.isProfilingSelected - ? ` - - // Sample rate for profiling, applied on top of othe TracesSampleRate, - // e.g. 0.2 means we want to profile 20 % of the captured transactions. - // We recommend adjusting this value in production. - options.ProfilesSampleRate = 1.0;${ - platform === DotNetPlatform.IOS_MACCATALYST - ? '' - : ` - // Requires NuGet package: Sentry.Profiling - // Note: By default, the profiler is initialized asynchronously. This can - // be tuned by passing a desired initialization timeout to the constructor. - options.AddIntegration(new ProfilingIntegration( - // During startup, wait up to 500ms to profile the app startup code. - // This could make launching the app a bit slower so comment it out if you - // prefer profiling to start asynchronously - TimeSpan.FromMilliseconds(500) - ));` - }` - : '' } });`; @@ -155,44 +105,6 @@ const onboarding: OnboardingConfig = { }, ], }, - { - type: 'conditional', - condition: params.isProfilingSelected, - content: [ - { - type: 'text', - text: tct( - 'Additionally, for all platforms except iOS/Mac Catalyst, you need to add a dependency on the [sentryProfilingPackage:Sentry.Profiling] NuGet package.', - { - sentryProfilingPackage: , - } - ), - }, - { - type: 'code', - tabs: [ - { - label: 'Package Manager', - language: 'shell', - code: getInstallProfilingSnippetPackageManager(params), - }, - { - label: '.NET Core CLI', - language: 'shell', - code: getInstallProfilingSnippetCoreCli(params), - }, - ], - }, - { - type: 'alert', - alertType: 'info', - showIcon: false, - text: t( - 'Profiling for .NET Framework and .NET on Android are not supported.' - ), - }, - ], - }, ], }, ], @@ -209,27 +121,11 @@ const onboarding: OnboardingConfig = { } ), }, - params.isProfilingSelected - ? { - type: 'code', - tabs: [ - { - label: 'Windows/Linux/macOS', - language: 'csharp', - code: getConfigureSnippet(params, DotNetPlatform.WINDOWS), - }, - { - label: 'iOS/Mac Catalyst', - language: 'csharp', - code: getConfigureSnippet(params, DotNetPlatform.IOS_MACCATALYST), - }, - ], - } - : { - type: 'code', - language: 'csharp', - code: getConfigureSnippet(params), - }, + { + type: 'code', + language: 'csharp', + code: getConfigureSnippet(params), + }, ], }, ], @@ -387,16 +283,10 @@ const crashReportOnboarding: OnboardingConfig = { nextSteps: () => [], }; -const profilingOnboarding = getDotnetProfilingOnboarding({ - getInstallSnippetPackageManager, - getInstallSnippetCoreCli, -}); - const docs: Docs = { onboarding, feedbackOnboardingCrashApi: csharpFeedbackOnboarding, crashReportOnboarding, - profilingOnboarding, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx b/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx index 20828dee9f310d..e59e20bce17d6f 100644 --- a/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx +++ b/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx @@ -231,7 +231,6 @@ const crashReportOnboarding: OnboardingConfig = { const docs: Docs = { onboarding, feedbackOnboardingCrashApi: csharpFeedbackOnboarding, - crashReportOnboarding, }; diff --git a/static/app/gettingStartedDocs/dotnet/winforms.spec.tsx b/static/app/gettingStartedDocs/dotnet/winforms.spec.tsx index 01fe977c722206..0f9d0fcc28a23d 100644 --- a/static/app/gettingStartedDocs/dotnet/winforms.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet/winforms.spec.tsx @@ -41,17 +41,4 @@ describe('winforms onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/)) ).toBeInTheDocument(); }); - - it('renders profiling onboarding docs correctly', async () => { - renderWithOnboardingLayout(docs, { - selectedProducts: [ - ProductSolution.PERFORMANCE_MONITORING, - ProductSolution.PROFILING, - ], - }); - - expect( - await screen.findByText(textWithMarkupMatcher(/o.ProfilesSampleRate/)) - ).toBeInTheDocument(); - }); }); diff --git a/static/app/gettingStartedDocs/dotnet/winforms.tsx b/static/app/gettingStartedDocs/dotnet/winforms.tsx index a422ebfb07e9a8..76cf974f5b30d2 100644 --- a/static/app/gettingStartedDocs/dotnet/winforms.tsx +++ b/static/app/gettingStartedDocs/dotnet/winforms.tsx @@ -13,38 +13,15 @@ import { } from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding'; import {csharpFeedbackOnboarding} from 'sentry/gettingStartedDocs/dotnet/dotnet'; import {t, tct} from 'sentry/locale'; -import {getDotnetProfilingOnboarding} from 'sentry/utils/gettingStartedDocs/dotnet'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; type Params = DocsParams; const getInstallSnippetPackageManager = (params: Params) => ` -Install-Package Sentry -Version ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; +Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`; const getInstallSnippetCoreCli = (params: Params) => ` -dotnet add package Sentry -v ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; - -const getInstallProfilingSnippetPackageManager = (params: Params) => ` -Install-Package Sentry.Profiling -Version ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; - -const getInstallProfilingSnippetCoreCli = (params: Params) => ` -dotnet add package Sentry.Profiling -v ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; +dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`; const getConfigureSnippet = (params: Params) => ` using System; @@ -69,23 +46,6 @@ static class Program // We recommend adjusting this value in production. o.TracesSampleRate = 1.0;` : '' - }${ - params.isProfilingSelected - ? ` - // Sample rate for profiling, applied on top of othe TracesSampleRate, - // e.g. 0.2 means we want to profile 20 % of the captured transactions. - // We recommend adjusting this value in production. - o.ProfilesSampleRate = 1.0; - // Requires NuGet package: Sentry.Profiling - // Note: By default, the profiler is initialized asynchronously. This can - // be tuned by passing a desired initialization timeout to the constructor. - o.AddIntegration(new ProfilingIntegration( - // During startup, wait up to 500ms to profile the app startup code. - // This could make launching the app a bit slower so comment it out if you - // prefer profiling to start asynchronously - TimeSpan.FromMilliseconds(500) - ));` - : '' } }); // Configure WinForms to throw exceptions so Sentry can capture them. @@ -140,42 +100,6 @@ const onboarding: OnboardingConfig = { }, ], }, - { - type: 'conditional', - condition: params.isProfilingSelected, - content: [ - { - type: 'text', - text: tct( - 'Additionally, you need to add a dependency on the [sentryProfilingPackage:Sentry.Profiling] NuGet package.', - { - sentryProfilingPackage: , - } - ), - }, - { - type: 'code', - tabs: [ - { - label: 'Package Manager', - language: 'shell', - code: getInstallProfilingSnippetPackageManager(params), - }, - { - label: '.NET Core CLI', - language: 'shell', - code: getInstallProfilingSnippetCoreCli(params), - }, - ], - }, - { - type: 'alert', - alertType: 'info', - showIcon: false, - text: t('Profiling for .NET Framework is not supported.'), - }, - ], - }, ], }, ], @@ -315,16 +239,10 @@ const crashReportOnboarding: OnboardingConfig = { nextSteps: () => [], }; -const profilingOnboarding = getDotnetProfilingOnboarding({ - getInstallSnippetPackageManager, - getInstallSnippetCoreCli, -}); - const docs: Docs = { onboarding, feedbackOnboardingCrashApi: csharpFeedbackOnboarding, crashReportOnboarding, - profilingOnboarding, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet/wpf.spec.tsx b/static/app/gettingStartedDocs/dotnet/wpf.spec.tsx index f9a8d39874a8d1..d40e02055783fa 100644 --- a/static/app/gettingStartedDocs/dotnet/wpf.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet/wpf.spec.tsx @@ -41,17 +41,4 @@ describe('wpf onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/)) ).toBeInTheDocument(); }); - - it('renders profiling onboarding docs correctly', async () => { - renderWithOnboardingLayout(docs, { - selectedProducts: [ - ProductSolution.PERFORMANCE_MONITORING, - ProductSolution.PROFILING, - ], - }); - - expect( - await screen.findByText(textWithMarkupMatcher(/o.ProfilesSampleRate/)) - ).toBeInTheDocument(); - }); }); diff --git a/static/app/gettingStartedDocs/dotnet/wpf.tsx b/static/app/gettingStartedDocs/dotnet/wpf.tsx index 7fb98cd5bcbd8b..de278c4e7faa67 100644 --- a/static/app/gettingStartedDocs/dotnet/wpf.tsx +++ b/static/app/gettingStartedDocs/dotnet/wpf.tsx @@ -13,38 +13,15 @@ import { } from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding'; import {csharpFeedbackOnboarding} from 'sentry/gettingStartedDocs/dotnet/dotnet'; import {t, tct} from 'sentry/locale'; -import {getDotnetProfilingOnboarding} from 'sentry/utils/gettingStartedDocs/dotnet'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; type Params = DocsParams; const getInstallSnippetPackageManager = (params: Params) => ` -Install-Package Sentry -Version ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; +Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`; const getInstallSnippetCoreCli = (params: Params) => ` -dotnet add package Sentry -v ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; - -const getInstallProfilingSnippetPackageManager = (params: Params) => ` -Install-Package Sentry.Profiling -Version ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; - -const getInstallProfilingSnippetCoreCli = (params: Params) => ` -dotnet add package Sentry.Profiling -v ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; +dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`; const getConfigureSnippet = (params: Params) => ` using System.Windows.Threading; @@ -68,23 +45,6 @@ public partial class App : Application // We recommend adjusting this value in production. o.TracesSampleRate = 1.0;` : '' - }${ - params.isProfilingSelected - ? ` - // Sample rate for profiling, applied on top of othe TracesSampleRate, - // e.g. 0.2 means we want to profile 20 % of the captured transactions. - // We recommend adjusting this value in production. - o.ProfilesSampleRate = 1.0; - // Requires NuGet package: Sentry.Profiling - // Note: By default, the profiler is initialized asynchronously. This can - // be tuned by passing a desired initialization timeout to the constructor. - o.AddIntegration(new ProfilingIntegration( - // During startup, wait up to 500ms to profile the app startup code. - // This could make launching the app a bit slower so comment it out if you - // prefer profiling to start asynchronously - TimeSpan.FromMilliseconds(500) - ));` - : '' } }); } @@ -140,42 +100,6 @@ const onboarding: OnboardingConfig = { }, ], }, - { - type: 'conditional', - condition: params.isProfilingSelected, - content: [ - { - type: 'text', - text: tct( - 'Additionally, you need to add a dependency on the [sentryProfilingPackage:Sentry.Profiling] NuGet package.', - { - sentryProfilingPackage: , - } - ), - }, - { - type: 'code', - tabs: [ - { - label: 'Package Manager', - language: 'shell', - code: getInstallProfilingSnippetPackageManager(params), - }, - { - label: '.NET Core CLI', - language: 'shell', - code: getInstallProfilingSnippetCoreCli(params), - }, - ], - }, - { - type: 'alert', - alertType: 'info', - showIcon: false, - text: t('Profiling for .NET Framework is not supported.'), - }, - ], - }, ], }, ], @@ -315,16 +239,10 @@ const crashReportOnboarding: OnboardingConfig = { nextSteps: () => [], }; -const profilingOnboarding = getDotnetProfilingOnboarding({ - getInstallSnippetPackageManager, - getInstallSnippetCoreCli, -}); - const docs: Docs = { onboarding, feedbackOnboardingCrashApi: csharpFeedbackOnboarding, crashReportOnboarding, - profilingOnboarding, }; export default docs; diff --git a/static/app/utils/gettingStartedDocs/dotnet.tsx b/static/app/utils/gettingStartedDocs/dotnet.tsx deleted file mode 100644 index 292fb2c5031f60..00000000000000 --- a/static/app/utils/gettingStartedDocs/dotnet.tsx +++ /dev/null @@ -1,191 +0,0 @@ -import {Alert} from 'sentry/components/core/alert'; -import {ExternalLink} from 'sentry/components/core/link'; -import type { - DocsParams, - OnboardingConfig, -} from 'sentry/components/onboarding/gettingStartedDoc/types'; -import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; -import {t, tct} from 'sentry/locale'; -import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; - -const getInstallProfilingSnippetPackageManager = (params: DocsParams) => ` -Install-Package Sentry.Profiling -Version ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; - -const getInstallProfilingSnippetCoreCli = (params: DocsParams) => ` -dotnet add package Sentry.Profiling -v ${getPackageVersion( - params, - 'sentry.dotnet.profiling', - '4.3.0' -)}`; - -const getProfilingConfigureSnippet = ( - params: DocsParams, - platform?: 'windows' | 'apple' -) => ` -using Sentry; - -SentrySdk.Init(options => -{ - // A Sentry Data Source Name (DSN) is required. - // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/ - // You can set it in the SENTRY_DSN environment variable, or you can set it in code here. - options.Dsn = "${params.dsn.public}";${ - params.isPerformanceSelected - ? ` - - // Set TracesSampleRate to 1.0 to capture 100% - // of transactions for tracing. - // We recommend adjusting this value in production. - options.TracesSampleRate = 1.0;` - : '' - }${ - params.isProfilingSelected - ? ` - - // Sample rate for profiling, applied on top of othe TracesSampleRate, - // e.g. 0.2 means we want to profile 20 % of the captured transactions. - // We recommend adjusting this value in production. - options.ProfilesSampleRate = 1.0;${ - platform === 'apple' - ? '' - : ` - // Requires NuGet package: Sentry.Profiling - // Note: By default, the profiler is initialized asynchronously. This can - // be tuned by passing a desired initialization timeout to the constructor. - options.AddIntegration(new ProfilingIntegration( - // During startup, wait up to 500ms to profile the app startup code. - // This could make launching the app a bit slower so comment it out if you - // prefer profiling to start asynchronously - TimeSpan.FromMilliseconds(500) - ));` - }` - : '' - } -});`; - -export const getDotnetProfilingOnboarding = ({ - getInstallSnippetPackageManager, - getInstallSnippetCoreCli, -}: { - getInstallSnippetCoreCli: (params: DocsParams) => string; - getInstallSnippetPackageManager: (params: DocsParams) => string; -}): OnboardingConfig => ({ - introduction: () => ( - -
- {t( - 'Sentry profiling for .NET is available in Alpha on .NET 6.0+ (tested on .NET 7.0 & .NET 8.0 as well).' - )} -
-
{t('Profiling is not supported for .NET Framework and .NET on Android.')}
-
- ), - install: params => [ - { - type: StepType.INSTALL, - content: [ - { - type: 'text', - text: tct( - 'Make sure the SDK is up to date. The minimum version of the SDK required for profiling is [code:4.3.0].', - { - code: , - } - ), - }, - { - type: 'code', - tabs: [ - { - label: 'Package Manager', - language: 'shell', - code: getInstallSnippetPackageManager(params), - }, - { - label: '.NET Core CLI', - language: 'shell', - code: getInstallSnippetCoreCli(params), - }, - ], - }, - { - type: 'text', - text: tct( - 'Additionally, for all platforms except iOS/Mac Catalyst, you need to add a dependency on the [sentryProfilingPackage:Sentry.Profiling] NuGet package.', - { - sentryProfilingPackage: , - } - ), - }, - { - type: 'code', - tabs: [ - { - label: 'Package Manager', - language: 'shell', - code: getInstallProfilingSnippetPackageManager(params), - }, - { - label: '.NET Core CLI', - language: 'shell', - code: getInstallProfilingSnippetCoreCli(params), - }, - ], - }, - ], - }, - ], - configure: params => [ - { - type: StepType.CONFIGURE, - content: [ - { - type: 'text', - text: tct('Enable profiling by updating your [code:SentrySdk.Init] call:', { - code: , - }), - }, - { - type: 'code', - tabs: [ - { - label: 'Windows/Linux/macOS', - language: 'csharp', - code: getProfilingConfigureSnippet(params, 'windows'), - }, - { - label: 'iOS/Mac Catalyst', - language: 'csharp', - code: getProfilingConfigureSnippet(params, 'apple'), - }, - ], - }, - { - type: 'text', - text: tct('For more information, read the [link:profiling documentation].', { - link: ( - - ), - }), - }, - ], - }, - ], - verify: () => [ - { - type: StepType.VERIFY, - content: [ - { - type: 'text', - text: t( - 'Verify that profiling is working correctly by simply using your application.' - ), - }, - ], - }, - ], -});