Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion static/app/components/onboarding/productSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

profiling is still set for dotnet. I’m not sure if it was overlooked or if profiling isn’t an issue for the vanilla .NET. @bitsandfoxes and @Flash0ver, could you please clarify?

'dotnet-aspnet': [ProductSolution.PERFORMANCE_MONITORING],
'dotnet-aspnetcore': [ProductSolution.PERFORMANCE_MONITORING],
'dotnet-awslambda': [ProductSolution.PERFORMANCE_MONITORING],
Expand Down
3 changes: 0 additions & 3 deletions static/app/data/platformCategories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,6 @@ export const profiling: PlatformKey[] = [
'apple',
'apple-ios',
'apple-macos',
'dotnet',
'dotnet-winforms',
'dotnet-wpf',
'flutter',
'javascript',
'javascript-angular',
Expand Down
13 changes: 0 additions & 13 deletions static/app/gettingStartedDocs/dotnet/dotnet.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
126 changes: 8 additions & 118 deletions static/app/gettingStartedDocs/dotnet/dotnet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand All @@ -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)
));`
}`
: ''
}
});`;

Expand Down Expand Up @@ -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: <code />,
}
),
},
{
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.'
),
},
],
},
],
},
],
Expand All @@ -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),
},
],
},
],
Expand Down Expand Up @@ -387,16 +283,10 @@ const crashReportOnboarding: OnboardingConfig = {
nextSteps: () => [],
};

const profilingOnboarding = getDotnetProfilingOnboarding({
getInstallSnippetPackageManager,
getInstallSnippetCoreCli,
});

const docs: Docs = {
onboarding,
feedbackOnboardingCrashApi: csharpFeedbackOnboarding,
crashReportOnboarding,
profilingOnboarding,
};

export default docs;
1 change: 0 additions & 1 deletion static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ const crashReportOnboarding: OnboardingConfig = {
const docs: Docs = {
onboarding,
feedbackOnboardingCrashApi: csharpFeedbackOnboarding,

crashReportOnboarding,
};

Expand Down
13 changes: 0 additions & 13 deletions static/app/gettingStartedDocs/dotnet/winforms.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
86 changes: 2 additions & 84 deletions static/app/gettingStartedDocs/dotnet/winforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down Expand Up @@ -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: <code />,
}
),
},
{
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.'),
},
],
},
],
},
],
Expand Down Expand Up @@ -315,16 +239,10 @@ const crashReportOnboarding: OnboardingConfig = {
nextSteps: () => [],
};

const profilingOnboarding = getDotnetProfilingOnboarding({
getInstallSnippetPackageManager,
getInstallSnippetCoreCli,
});

const docs: Docs = {
onboarding,
feedbackOnboardingCrashApi: csharpFeedbackOnboarding,
crashReportOnboarding,
profilingOnboarding,
};

export default docs;
13 changes: 0 additions & 13 deletions static/app/gettingStartedDocs/dotnet/wpf.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
Loading
Loading