From 3bb930f880701315c51ce88d69843e297343165f Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:17:28 +0100 Subject: [PATCH 01/30] add to withLoggingOnboarding --- static/app/data/platformCategories.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/app/data/platformCategories.tsx b/static/app/data/platformCategories.tsx index 854e248681cd7a..edfdafcf38cf3e 100644 --- a/static/app/data/platformCategories.tsx +++ b/static/app/data/platformCategories.tsx @@ -304,7 +304,10 @@ export const withLoggingOnboarding: Set = new Set([ 'apple-ios', 'apple-macos', 'bun', + 'cocoa-objc', + 'cocoa-swift', 'dart', + 'dotnet', 'flutter', 'go', 'go-echo', @@ -336,6 +339,7 @@ export const withLoggingOnboarding: Set = new Set([ 'javascript-sveltekit', 'javascript-tanstackstart-react', 'javascript-vue', + 'native', 'node', 'node-azurefunctions', 'node-connect', @@ -350,6 +354,7 @@ export const withLoggingOnboarding: Set = new Set([ 'node-nestjs', 'php', 'php-laravel', + 'php-symfony', 'python', 'python-aiohttp', 'python-asgi', @@ -376,6 +381,8 @@ export const withLoggingOnboarding: Set = new Set([ 'ruby-rack', 'ruby-rails', 'rust', + 'unity', + 'unreal', ]); // List of platforms that do not have logging support. We make use of this list in the product to not provide any Logging From 04ff44ac573bfb16a8cb43ac0a9dd73af769722d Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:38:36 +0100 Subject: [PATCH 02/30] add native logs onboarding --- .../app/gettingStartedDocs/native/index.tsx | 2 + static/app/gettingStartedDocs/native/logs.tsx | 86 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 static/app/gettingStartedDocs/native/logs.tsx diff --git a/static/app/gettingStartedDocs/native/index.tsx b/static/app/gettingStartedDocs/native/index.tsx index 9b3b3c93f62de5..7ebe9ffdecf519 100644 --- a/static/app/gettingStartedDocs/native/index.tsx +++ b/static/app/gettingStartedDocs/native/index.tsx @@ -1,11 +1,13 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {CrashReportWebApiOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding'; +import {logs} from './logs'; import {onboarding} from './onboarding'; const docs: Docs = { onboarding, crashReportOnboarding: CrashReportWebApiOnboarding, + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/native/logs.tsx b/static/app/gettingStartedDocs/native/logs.tsx new file mode 100644 index 00000000000000..4f12ab7078f6bb --- /dev/null +++ b/static/app/gettingStartedDocs/native/logs.tsx @@ -0,0 +1,86 @@ +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 {tct} from 'sentry/locale'; + +type Params = DocsParams; + +export const logs: OnboardingConfig = { + install: () => [ + { + type: StepType.INSTALL, + content: [ + { + type: 'text', + text: tct( + 'Logs in Native are supported in Sentry Native SDK version [link:0.11.1] and above.', + { + link: ( + + ), + } + ), + }, + ], + }, + ], + configure: (params: Params) => [ + { + type: StepType.CONFIGURE, + content: [ + { + type: 'text', + text: tct( + 'To enable logging, you need to initialize the SDK with the [code:enable_logs] option set to [code:true].', + { + code: , + } + ), + }, + { + type: 'code', + language: 'c', + code: `sentry_options_t *options = sentry_options_new(); +sentry_options_set_dsn(options, "${params.dsn.public}"); +sentry_options_set_enable_logs(options, 1); +// set other options +sentry_init(options);`, + }, + ], + }, + ], + verify: () => [ + { + type: StepType.VERIFY, + content: [ + { + type: 'text', + text: tct( + 'Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the [code:sentry_log_X()] APIs.', + { + code: , + } + ), + }, + { + type: 'text', + text: tct( + 'The API exposes six methods that you can use to log messages at different log levels: [code:trace], [code:debug], [code:info], [code:warn], [code:error], and [code:fatal].', + { + code: , + } + ), + }, + { + type: 'code', + language: 'c', + code: `sentry_log_info("A simple log message"); +sentry_log_error("A %s log message", "formatted");`, + }, + ], + }, + ], +}; From 9ddd0bdb263846fdec29fc6c5ecb2ab3dc6ff0c4 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:52:59 +0100 Subject: [PATCH 03/30] Add logs onboarding for dotnet, symfony and unreal --- .../app/gettingStartedDocs/dotnet/index.tsx | 2 + static/app/gettingStartedDocs/dotnet/logs.tsx | 90 +++++++++++++++ .../gettingStartedDocs/php-symfony/index.tsx | 2 + .../gettingStartedDocs/php-symfony/logs.tsx | 104 ++++++++++++++++++ .../app/gettingStartedDocs/unreal/index.tsx | 2 + static/app/gettingStartedDocs/unreal/logs.tsx | 102 +++++++++++++++++ 6 files changed, 302 insertions(+) create mode 100644 static/app/gettingStartedDocs/dotnet/logs.tsx create mode 100644 static/app/gettingStartedDocs/php-symfony/logs.tsx create mode 100644 static/app/gettingStartedDocs/unreal/logs.tsx diff --git a/static/app/gettingStartedDocs/dotnet/index.tsx b/static/app/gettingStartedDocs/dotnet/index.tsx index acb003a7796e8a..dcf7712ca3498b 100644 --- a/static/app/gettingStartedDocs/dotnet/index.tsx +++ b/static/app/gettingStartedDocs/dotnet/index.tsx @@ -2,6 +2,7 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {crashReport} from './crashReport'; import {feedback} from './feedback'; +import {logs} from './logs'; import {onboarding} from './onboarding'; import {profiling} from './profiling'; @@ -10,6 +11,7 @@ const docs: Docs = { feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, profilingOnboarding: profiling, + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet/logs.tsx b/static/app/gettingStartedDocs/dotnet/logs.tsx new file mode 100644 index 00000000000000..ceacd8f3f26174 --- /dev/null +++ b/static/app/gettingStartedDocs/dotnet/logs.tsx @@ -0,0 +1,90 @@ +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'; + +type Params = DocsParams; + +export const logs: OnboardingConfig = { + install: () => [ + { + type: StepType.INSTALL, + content: [ + { + type: 'text', + text: tct( + 'Logs in .NET are supported in Sentry .NET SDK version [code:5.14.0] and above.', + { + code: , + } + ), + }, + ], + }, + ], + configure: (params: Params) => [ + { + type: StepType.CONFIGURE, + content: [ + { + type: 'text', + text: tct( + 'To enable logging, you need to initialize the SDK with the [code:Experimental.EnableLogs] option set to [code:true].', + { + code: , + } + ), + }, + { + type: 'code', + language: 'csharp', + code: `SentrySdk.Init(options => +{ + options.Dsn = "${params.dsn.public}"; + // Enable logs to be sent to Sentry + options.Experimental.EnableLogs = true; +});`, + }, + ], + }, + ], + verify: () => [ + { + type: StepType.VERIFY, + content: [ + { + type: 'text', + text: t( + 'Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the SentrySdk.Logger APIs.' + ), + }, + { + type: 'text', + text: t( + 'The SentrySdk.Logger instance exposes six methods that you can use to log messages at different log levels: Trace, Debug, Info, Warning, Error, and Fatal.' + ), + }, + { + type: 'code', + language: 'csharp', + code: `SentrySdk.Logger.LogInfo("A simple log message"); +SentrySdk.Logger.LogError("A {0} log message", "formatted");`, + }, + { + type: 'text', + text: tct( + 'You can also attach custom attributes via a delegate. For more information, see the [link:Integrations documentation].', + { + link: ( + + ), + } + ), + }, + ], + }, + ], +}; diff --git a/static/app/gettingStartedDocs/php-symfony/index.tsx b/static/app/gettingStartedDocs/php-symfony/index.tsx index 550e19e9a56d8c..1c6afffac14cfd 100644 --- a/static/app/gettingStartedDocs/php-symfony/index.tsx +++ b/static/app/gettingStartedDocs/php-symfony/index.tsx @@ -5,6 +5,7 @@ import { } from 'sentry/gettingStartedDocs/javascript/jsLoader'; import {crashReport} from './crashReport'; +import {logs} from './logs'; import {metrics} from './metrics'; import {onboarding} from './onboarding'; import {profiling} from './profiling'; @@ -15,6 +16,7 @@ const docs: Docs = { profilingOnboarding: profiling, crashReportOnboarding: crashReport, feedbackOnboardingJsLoader, + logsOnboarding: logs, metricsOnboarding: metrics, }; diff --git a/static/app/gettingStartedDocs/php-symfony/logs.tsx b/static/app/gettingStartedDocs/php-symfony/logs.tsx new file mode 100644 index 00000000000000..dcde53cc81bada --- /dev/null +++ b/static/app/gettingStartedDocs/php-symfony/logs.tsx @@ -0,0 +1,104 @@ +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'; + +type Params = DocsParams; + +export const logs: OnboardingConfig = { + install: () => [ + { + type: StepType.INSTALL, + content: [ + { + type: 'text', + text: tct( + 'Logs for Symfony are supported in version [code:4.12.0] and above of the Sentry PHP SDK and version [code:5.10.0] and above of the [code:sentry-symfony] bundle.', + { + code: , + } + ), + }, + { + type: 'text', + text: t('Make sure you have the latest version of the Sentry Symfony bundle:'), + }, + { + type: 'code', + language: 'bash', + code: 'composer require sentry/sentry-symfony', + }, + ], + }, + ], + configure: (params: Params) => [ + { + type: StepType.CONFIGURE, + content: [ + { + type: 'text', + text: tct( + 'To enable logging, add the [code:enable_logs] option to your Sentry configuration:', + { + code: , + } + ), + }, + { + type: 'code', + language: 'yaml', + code: `# config/packages/sentry.yaml +sentry: + dsn: '${params.dsn.public}' + options: + enable_logs: true`, + }, + { + type: 'text', + text: tct( + 'For integration with Monolog, see the [link:Symfony Logs documentation].', + { + link: ( + + ), + } + ), + }, + ], + }, + ], + verify: () => [ + { + type: StepType.VERIFY, + content: [ + { + type: 'text', + text: t( + 'Once configured, you can send logs using the standard PSR-3 logger interface:' + ), + }, + { + type: 'code', + language: 'php', + code: `use Psr\\Log\\LoggerInterface; + +class SomeService +{ + public function __construct( + private LoggerInterface $logger + ) {} + + public function someMethod(): void + { + $this->logger->info('A test log message'); + $this->logger->error('An error log message', ['context' => 'value']); + } +}`, + }, + ], + }, + ], +}; diff --git a/static/app/gettingStartedDocs/unreal/index.tsx b/static/app/gettingStartedDocs/unreal/index.tsx index 6c1e6b06917266..2d9adc901245c9 100644 --- a/static/app/gettingStartedDocs/unreal/index.tsx +++ b/static/app/gettingStartedDocs/unreal/index.tsx @@ -1,12 +1,14 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {crashReport} from './crashReport'; +import {logs} from './logs'; import {onboarding} from './onboarding'; const docs: Docs = { onboarding, feedbackOnboardingCrashApi: crashReport, crashReportOnboarding: crashReport, + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/unreal/logs.tsx b/static/app/gettingStartedDocs/unreal/logs.tsx new file mode 100644 index 00000000000000..c1950ac92bcaf6 --- /dev/null +++ b/static/app/gettingStartedDocs/unreal/logs.tsx @@ -0,0 +1,102 @@ +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'; + +type Params = DocsParams; + +export const logs: OnboardingConfig = { + install: () => [ + { + type: StepType.INSTALL, + content: [ + { + type: 'text', + text: tct( + 'Logs for Unreal Engine are supported in Sentry Unreal Engine SDK version [code:1.2.0] and above.', + { + code: , + } + ), + }, + ], + }, + ], + configure: (params: Params) => [ + { + type: StepType.CONFIGURE, + content: [ + { + type: 'text', + text: t( + 'To enable logging in your Unreal Engine project, you need to configure the Sentry SDK with structured logging enabled.' + ), + }, + { + type: 'text', + text: tct( + 'Open your project settings: [strong:Project Settings > Plugins > Sentry] and check the [strong:Enable Structured Logging] option.', + { + strong: , + } + ), + }, + { + type: 'text', + text: t('Alternatively, you can enable logging programmatically:'), + }, + { + type: 'code', + language: 'cpp', + code: `#include "SentrySubsystem.h" + +USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); + +// Create settings with logging enabled +SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::CreateLambda([=](USentrySettings* Settings) +{ + Settings->Dsn = TEXT("${params.dsn.public}"); + Settings->EnableStructuredLogging = true; +}));`, + }, + ], + }, + ], + verify: () => [ + { + type: StepType.VERIFY, + content: [ + { + type: 'text', + text: t( + 'Once structured logging is enabled, you can send logs using the AddLog method on the Sentry subsystem.' + ), + }, + { + type: 'code', + language: 'cpp', + code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); + +// Send logs at different severity levels +SentrySubsystem->AddLog(TEXT("A simple log message"), ESentryLevel::Info, TEXT("GameFlow")); +SentrySubsystem->AddLog(TEXT("Failed to save game data"), ESentryLevel::Error, TEXT("SaveSystem"));`, + }, + { + type: 'text', + text: tct( + 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. For more information, see the [link:Automatic UE_LOG Integration documentation].', + { + code: , + link: ( + + ), + } + ), + }, + ], + }, + ], +}; From ad62efe169b34a99a684fa9108a89a5af4908f21 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 2 Dec 2025 15:44:30 +0100 Subject: [PATCH 04/30] add tracing to native/unity/unreal --- .../onboarding/productSelection.tsx | 10 +- .../gettingStartedDocs/dotnet/onboarding.tsx | 39 ++++++ .../gettingStartedDocs/native/onboarding.tsx | 86 +++++++++++- .../php-symfony/onboarding.tsx | 49 ++++++- .../gettingStartedDocs/php-symfony/utils.tsx | 16 ++- .../gettingStartedDocs/unity/onboarding.tsx | 110 +++++++++++++++- .../gettingStartedDocs/unreal/onboarding.tsx | 124 +++++++++++++++++- 7 files changed, 426 insertions(+), 8 deletions(-) diff --git a/static/app/components/onboarding/productSelection.tsx b/static/app/components/onboarding/productSelection.tsx index db880858188804..7737cd8762b950 100644 --- a/static/app/components/onboarding/productSelection.tsx +++ b/static/app/components/onboarding/productSelection.tsx @@ -92,7 +92,11 @@ 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, + ProductSolution.PROFILING, + ProductSolution.LOGS, + ], 'dotnet-aspnet': [ProductSolution.PERFORMANCE_MONITORING], 'dotnet-aspnetcore': [ProductSolution.PERFORMANCE_MONITORING], 'dotnet-awslambda': [ProductSolution.PERFORMANCE_MONITORING], @@ -180,6 +184,7 @@ export const platformProductAvailability = { ProductSolution.LOGS, ProductSolution.METRICS, ], + native: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], node: [ ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING, @@ -270,6 +275,7 @@ export const platformProductAvailability = { 'php-symfony': [ ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING, + ProductSolution.LOGS, ProductSolution.METRICS, ], python: [ @@ -395,6 +401,8 @@ export const platformProductAvailability = { ProductSolution.PROFILING, ProductSolution.LOGS, ], + unity: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + unreal: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], } as Record; type ProductProps = { diff --git a/static/app/gettingStartedDocs/dotnet/onboarding.tsx b/static/app/gettingStartedDocs/dotnet/onboarding.tsx index 5b66ae7c48029a..07b03580783e82 100644 --- a/static/app/gettingStartedDocs/dotnet/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet/onboarding.tsx @@ -77,6 +77,13 @@ SentrySdk.Init(options => ));` }` : '' + }${ + params.isLogsSelected + ? ` + + // Enable logs to be sent to Sentry + options.EnableLogs = true;` + : '' } });`; @@ -255,6 +262,38 @@ export const onboarding: OnboardingConfig = { }, ] satisfies OnboardingStep[]) : []), + ...(params.isLogsSelected + ? ([ + { + title: t('Logs'), + content: [ + { + type: 'text', + text: t( + 'Once configured, you can send logs using the SentrySdk.Logger APIs:' + ), + }, + { + type: 'code', + language: 'csharp', + code: `SentrySdk.Logger.LogInfo("A simple log message"); +SentrySdk.Logger.LogError("A {0} log message", "formatted");`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the Logs documentation] to learn more about custom attributes and integrations.', + { + link: ( + + ), + } + ), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), { title: t('Samples'), content: [ diff --git a/static/app/gettingStartedDocs/native/onboarding.tsx b/static/app/gettingStartedDocs/native/onboarding.tsx index fcbef9ee1f1d25..5c9717064506a5 100644 --- a/static/app/gettingStartedDocs/native/onboarding.tsx +++ b/static/app/gettingStartedDocs/native/onboarding.tsx @@ -19,7 +19,19 @@ int main(void) { // https://docs.sentry.io/platforms/native/configuration/options/#database-path sentry_options_set_database_path(options, ".sentry-native"); sentry_options_set_release(options, "my-project-name@2.3.12"); - sentry_options_set_debug(options, 1); + sentry_options_set_debug(options, 1);${ + params.isPerformanceSelected + ? ` + // Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing. + // We recommend adjusting this value in production. + sentry_options_set_traces_sample_rate(options, 1.0);` + : '' + }${ + params.isLogsSelected + ? ` + sentry_options_set_enable_logs(options, 1);` + : '' + } sentry_init(options); /* ... */ @@ -106,6 +118,78 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isPerformanceSelected + ? ([ + { + title: t('Tracing'), + content: [ + { + type: 'text', + text: t( + 'You can measure the performance of your code by capturing transactions and spans.' + ), + }, + { + type: 'code', + language: 'c', + code: `sentry_transaction_context_t *tx_ctx = sentry_transaction_context_new( + "test-transaction", + "test-operation" +); +sentry_transaction_t *tx = sentry_transaction_start(tx_ctx, NULL); + +// Perform your operation +// ... + +sentry_transaction_finish(tx);`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the documentation] to learn more about tracing and custom instrumentation.', + { + link: ( + + ), + } + ), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), + ...(params.isLogsSelected + ? ([ + { + title: t('Logs'), + content: [ + { + type: 'text', + text: t( + 'Once logging is enabled, you can send logs using the sentry_log_X() APIs:' + ), + }, + { + type: 'code', + language: 'c', + code: `sentry_log_info("A simple log message"); +sentry_log_error("A %s log message", "formatted");`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the Logs documentation] to learn more about additional attributes and options.', + { + link: ( + + ), + } + ), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), ...([getConsoleExtensions(params)].filter(Boolean) as OnboardingStep[]), ], }; diff --git a/static/app/gettingStartedDocs/php-symfony/onboarding.tsx b/static/app/gettingStartedDocs/php-symfony/onboarding.tsx index bf3b226f70bd63..f4c0bc3cfd8603 100644 --- a/static/app/gettingStartedDocs/php-symfony/onboarding.tsx +++ b/static/app/gettingStartedDocs/php-symfony/onboarding.tsx @@ -2,9 +2,10 @@ import {ExternalLink} from 'sentry/components/core/link'; import type { DocsParams, OnboardingConfig, + OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; -import {tct} from 'sentry/locale'; +import {t, tct} from 'sentry/locale'; import {getConfigureSnippet, getExcimerInstallSteps} from './utils'; @@ -66,7 +67,7 @@ SENTRY_DSN="${params.dsn.public}" ], }, ], - verify: () => [ + verify: (params: DocsParams) => [ { type: StepType.VERIFY, content: [ @@ -116,6 +117,50 @@ SENTRY_DSN="${params.dsn.public}" }, ], }, + ...(params.isLogsSelected + ? ([ + { + title: t('Logs'), + content: [ + { + type: 'text', + text: t( + 'Once configured, you can send logs using the standard PSR-3 logger interface:' + ), + }, + { + type: 'code', + language: 'php', + code: `use Psr\\Log\\LoggerInterface; + +class SomeService +{ + public function __construct( + private LoggerInterface $logger + ) {} + + public function someMethod(): void + { + $this->logger->info('A test log message'); + $this->logger->error('An error log message', ['context' => 'value']); + } +}`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the Logs documentation] to learn more about Monolog integration.', + { + link: ( + + ), + } + ), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), ], nextSteps: () => [], }; diff --git a/static/app/gettingStartedDocs/php-symfony/utils.tsx b/static/app/gettingStartedDocs/php-symfony/utils.tsx index 5c1fa9c6a80644..9adde5433c6646 100644 --- a/static/app/gettingStartedDocs/php-symfony/utils.tsx +++ b/static/app/gettingStartedDocs/php-symfony/utils.tsx @@ -35,7 +35,11 @@ export const getExcimerInstallSteps = (params: DocsParams): ContentBlock[] => { }; export const getConfigureSnippet = (params: DocsParams): ContentBlock[] => { - if (!params.isPerformanceSelected && !params.isProfilingSelected) { + if ( + !params.isPerformanceSelected && + !params.isProfilingSelected && + !params.isLogsSelected + ) { return []; } @@ -53,7 +57,9 @@ export const getConfigureSnippet = (params: DocsParams): ContentBlock[] => { code: `when@prod: sentry: dsn: '%env(SENTRY_DSN)%'${ - params.isPerformanceSelected || params.isProfilingSelected + params.isPerformanceSelected || + params.isProfilingSelected || + params.isLogsSelected ? ` options:` : '' @@ -69,6 +75,12 @@ export const getConfigureSnippet = (params: DocsParams): ContentBlock[] => { # Set a sampling rate for profiling - this is relative to traces_sample_rate profiles_sample_rate: 1.0` : '' + }${ + params.isLogsSelected + ? ` + # Enable logs to be sent to Sentry + enable_logs: true` + : '' }`, }, ]; diff --git a/static/app/gettingStartedDocs/unity/onboarding.tsx b/static/app/gettingStartedDocs/unity/onboarding.tsx index ad557890dc7ce8..4284b34cfef2c8 100644 --- a/static/app/gettingStartedDocs/unity/onboarding.tsx +++ b/static/app/gettingStartedDocs/unity/onboarding.tsx @@ -1,6 +1,7 @@ import {ExternalLink} from 'sentry/components/core/link'; import {StoreCrashReportsConfig} from 'sentry/components/onboarding/gettingStartedDoc/storeCrashReportsConfig'; import type { + DocsParams, OnboardingConfig, OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; @@ -57,6 +58,32 @@ export const onboarding: OnboardingConfig = { type: 'text', text: t("And that's it! Now Sentry can capture errors automatically."), }, + { + type: 'conditional', + condition: params.isPerformanceSelected, + content: [ + { + type: 'text', + text: tct( + 'To enable performance monitoring, set the [code:TracesSampleRate] option in the Sentry configuration window. For example, set it to [code:1.0] to capture 100% of transactions.', + {code: } + ), + }, + ], + }, + { + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: tct( + 'To enable structured logging, check the [code:Enable Logs] option in the Sentry configuration window.', + {code: } + ), + }, + ], + }, { type: 'text', text: tct( @@ -71,7 +98,7 @@ export const onboarding: OnboardingConfig = { ], }, ], - verify: params => [ + verify: (params: DocsParams) => [ { type: StepType.VERIFY, content: [ @@ -88,6 +115,87 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isPerformanceSelected + ? ([ + { + title: t('Tracing'), + content: [ + { + type: 'text', + text: t( + 'You can measure the performance of your code by capturing transactions and spans.' + ), + }, + { + type: 'code', + language: 'csharp', + code: `using Sentry; + +// Transaction can be started by providing, at minimum, the name and the operation +var transaction = SentrySdk.StartTransaction( + "test-transaction-name", + "test-transaction-operation" +); + +// Transactions can have child spans (and those spans can have child spans as well) +var span = transaction.StartChild("test-child-operation"); + +// ... Perform the operation + +span.Finish(); // Mark the span as finished +transaction.Finish(); // Mark the transaction as finished and send it to Sentry`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the documentation] to learn more about the API and automatic instrumentations.', + { + link: ( + + ), + } + ), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), + ...(params.isLogsSelected + ? ([ + { + title: t('Logs'), + content: [ + { + type: 'text', + text: t( + 'Once logging is enabled, you can send logs using the Debug.Log API or directly via the SDK:' + ), + }, + { + type: 'code', + language: 'csharp', + code: `using Sentry; +using UnityEngine; + +// Unity's Debug.Log will automatically be captured +Debug.Log("This log will be sent to Sentry"); + +// Or use the SDK directly +SentrySdk.Logger.LogInfo("A simple log message"); +SentrySdk.Logger.LogError("An error log message");`, + }, + { + type: 'text', + text: tct('Check out [link:the Logs documentation] to learn more.', { + link: ( + + ), + }), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), { title: t('Troubleshooting'), content: [ diff --git a/static/app/gettingStartedDocs/unreal/onboarding.tsx b/static/app/gettingStartedDocs/unreal/onboarding.tsx index cdfd3b21c1cf0f..94bdc79413a10a 100644 --- a/static/app/gettingStartedDocs/unreal/onboarding.tsx +++ b/static/app/gettingStartedDocs/unreal/onboarding.tsx @@ -39,7 +39,22 @@ void UMyGameInstance::ConfigureSentrySettings(USentrySettings* Settings) Settings->SendDefaultPii = true; // If your game/app doesn't have sensitive data, you can get screenshots on error events automatically - Settings->AttachScreenshot = true; + Settings->AttachScreenshot = true;${ + params.isPerformanceSelected + ? ` + + // Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing. + // We recommend adjusting this value in production. + Settings->TracesSampleRate = 1.0f;` + : '' + }${ + params.isLogsSelected + ? ` + + // Enable structured logging + Settings->EnableStructuredLogging = true;` + : '' + } } ... @@ -110,6 +125,32 @@ export const onboarding: OnboardingConfig = { language: 'url', code: params.dsn.public, }, + { + type: 'conditional', + condition: params.isPerformanceSelected, + content: [ + { + type: 'text', + text: tct( + 'To enable performance monitoring, set the [strong:Traces Sample Rate] option in the Sentry configuration window. For example, set it to [strong:1.0] to capture 100% of transactions.', + {strong: } + ), + }, + ], + }, + { + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: tct( + 'To enable structured logging, check the [strong:Enable Structured Logging] option in the Sentry configuration window.', + {strong: } + ), + }, + ], + }, { type: 'text', text: tct( @@ -142,6 +183,87 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isPerformanceSelected + ? ([ + { + title: t('Tracing'), + content: [ + { + type: 'text', + text: t( + 'You can measure the performance of your code by capturing transactions and spans.' + ), + }, + { + type: 'code', + language: 'cpp', + code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); + +// Start a transaction +USentryTransaction* Transaction = SentrySubsystem->StartTransaction( + TEXT("test-transaction-name"), + TEXT("test-transaction-operation") +); + +// Start a child span +USentrySpan* Span = Transaction->StartChild(TEXT("test-child-operation")); + +// ... Perform your operation + +Span->Finish(); +Transaction->Finish();`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the documentation] to learn more about the API and automatic instrumentations.', + { + link: ( + + ), + } + ), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), + ...(params.isLogsSelected + ? ([ + { + title: t('Logs'), + content: [ + { + type: 'text', + text: t( + 'Once structured logging is enabled, you can send logs using the AddLog method on the Sentry subsystem:' + ), + }, + { + type: 'code', + language: 'cpp', + code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); + +// Send logs at different severity levels +SentrySubsystem->AddLog(TEXT("A simple log message"), ESentryLevel::Info, TEXT("GameFlow")); +SentrySubsystem->AddLog(TEXT("Failed to save game data"), ESentryLevel::Error, TEXT("SaveSystem"));`, + }, + { + type: 'text', + text: tct( + 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. Check out [link:the Logs documentation] to learn more.', + { + code: , + link: ( + + ), + } + ), + }, + ], + }, + ] satisfies OnboardingStep[]) + : []), { title: t('Crash Reporter Client'), content: [ From f2ce4ed53128064b853bcd080e30c6afeec6a458 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 2 Dec 2025 15:49:26 +0100 Subject: [PATCH 05/30] fixup native onboarding - fix link - add minidump storage setting --- .../gettingStartedDocs/native/onboarding.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/static/app/gettingStartedDocs/native/onboarding.tsx b/static/app/gettingStartedDocs/native/onboarding.tsx index 5c9717064506a5..d8e559fd971aac 100644 --- a/static/app/gettingStartedDocs/native/onboarding.tsx +++ b/static/app/gettingStartedDocs/native/onboarding.tsx @@ -1,4 +1,5 @@ import {ExternalLink} from 'sentry/components/core/link'; +import {StoreCrashReportsConfig} from 'sentry/components/onboarding/gettingStartedDoc/storeCrashReportsConfig'; import type { DocsParams, OnboardingConfig, @@ -16,7 +17,7 @@ int main(void) { sentry_options_t *options = sentry_options_new(); sentry_options_set_dsn(options, "${params.dsn.public}"); // This is also the default-path. For further information and recommendations: - // https://docs.sentry.io/platforms/native/configuration/options/#database-path + // https://docs.sentry.io/platforms/native/configuration/options/#database_path sentry_options_set_database_path(options, ".sentry-native"); sentry_options_set_release(options, "my-project-name@2.3.12"); sentry_options_set_debug(options, 1);${ @@ -191,5 +192,19 @@ sentry_log_error("A %s log message", "formatted");`, ] satisfies OnboardingStep[]) : []), ...([getConsoleExtensions(params)].filter(Boolean) as OnboardingStep[]), + { + title: t('Further Settings'), + content: [ + { + type: 'custom', + content: ( + + ), + }, + ], + }, ], }; From eebb1ca15a38b350a463a5a0095aa56ad592e53c Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 2 Dec 2025 16:31:27 +0100 Subject: [PATCH 06/30] add mock for native onboarding --- .../app/gettingStartedDocs/native/onboarding.spec.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/static/app/gettingStartedDocs/native/onboarding.spec.tsx b/static/app/gettingStartedDocs/native/onboarding.spec.tsx index cd9361eba8e1d6..c6fa11817f779c 100644 --- a/static/app/gettingStartedDocs/native/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/native/onboarding.spec.tsx @@ -1,10 +1,21 @@ +import {ProjectFixture} from 'sentry-fixture/project'; + import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout'; import {screen} from 'sentry-test/reactTestingLibrary'; import docs from '.'; +function renderMockRequests() { + MockApiClient.addMockResponse({ + url: '/projects/org-slug/project-slug/', + body: [ProjectFixture()], + }); +} + describe('getting started with native', () => { it('renders docs correctly', () => { + renderMockRequests(); + renderWithOnboardingLayout(docs); // Renders main headings From 430890688847485f85fc013b06133cce968543eb Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:24:30 +0100 Subject: [PATCH 07/30] use DocsParams directly --- static/app/gettingStartedDocs/dotnet/logs.tsx | 4 +--- static/app/gettingStartedDocs/native/logs.tsx | 4 +--- static/app/gettingStartedDocs/php-symfony/logs.tsx | 4 +--- static/app/gettingStartedDocs/unreal/logs.tsx | 4 +--- static/app/gettingStartedDocs/unreal/onboarding.tsx | 6 ++---- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/static/app/gettingStartedDocs/dotnet/logs.tsx b/static/app/gettingStartedDocs/dotnet/logs.tsx index ceacd8f3f26174..9118e13ac93c0c 100644 --- a/static/app/gettingStartedDocs/dotnet/logs.tsx +++ b/static/app/gettingStartedDocs/dotnet/logs.tsx @@ -6,8 +6,6 @@ import type { import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; -type Params = DocsParams; - export const logs: OnboardingConfig = { install: () => [ { @@ -25,7 +23,7 @@ export const logs: OnboardingConfig = { ], }, ], - configure: (params: Params) => [ + configure: (params: DocsParams) => [ { type: StepType.CONFIGURE, content: [ diff --git a/static/app/gettingStartedDocs/native/logs.tsx b/static/app/gettingStartedDocs/native/logs.tsx index 4f12ab7078f6bb..2d2f10cdd7ac29 100644 --- a/static/app/gettingStartedDocs/native/logs.tsx +++ b/static/app/gettingStartedDocs/native/logs.tsx @@ -6,8 +6,6 @@ import type { import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {tct} from 'sentry/locale'; -type Params = DocsParams; - export const logs: OnboardingConfig = { install: () => [ { @@ -27,7 +25,7 @@ export const logs: OnboardingConfig = { ], }, ], - configure: (params: Params) => [ + configure: (params: DocsParams) => [ { type: StepType.CONFIGURE, content: [ diff --git a/static/app/gettingStartedDocs/php-symfony/logs.tsx b/static/app/gettingStartedDocs/php-symfony/logs.tsx index dcde53cc81bada..b0cdf3609c98df 100644 --- a/static/app/gettingStartedDocs/php-symfony/logs.tsx +++ b/static/app/gettingStartedDocs/php-symfony/logs.tsx @@ -6,8 +6,6 @@ import type { import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; -type Params = DocsParams; - export const logs: OnboardingConfig = { install: () => [ { @@ -34,7 +32,7 @@ export const logs: OnboardingConfig = { ], }, ], - configure: (params: Params) => [ + configure: (params: DocsParams) => [ { type: StepType.CONFIGURE, content: [ diff --git a/static/app/gettingStartedDocs/unreal/logs.tsx b/static/app/gettingStartedDocs/unreal/logs.tsx index c1950ac92bcaf6..f70af8755dff67 100644 --- a/static/app/gettingStartedDocs/unreal/logs.tsx +++ b/static/app/gettingStartedDocs/unreal/logs.tsx @@ -6,8 +6,6 @@ import type { import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; -type Params = DocsParams; - export const logs: OnboardingConfig = { install: () => [ { @@ -25,7 +23,7 @@ export const logs: OnboardingConfig = { ], }, ], - configure: (params: Params) => [ + configure: (params: DocsParams) => [ { type: StepType.CONFIGURE, content: [ diff --git a/static/app/gettingStartedDocs/unreal/onboarding.tsx b/static/app/gettingStartedDocs/unreal/onboarding.tsx index 94bdc79413a10a..3c048e203e29f2 100644 --- a/static/app/gettingStartedDocs/unreal/onboarding.tsx +++ b/static/app/gettingStartedDocs/unreal/onboarding.tsx @@ -9,8 +9,6 @@ import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {getConsoleExtensions} from 'sentry/components/onboarding/gettingStartedDoc/utils/consoleExtensions'; import {t, tct} from 'sentry/locale'; -type Params = DocsParams; - const getVerifySnippet = () => ` #include "SentrySubsystem.h" @@ -24,7 +22,7 @@ void Verify() SentrySubsystem->CaptureMessage(TEXT("Capture message")); }`; -const getSettingsConfigureSnippet = (params: Params) => ` +const getSettingsConfigureSnippet = (params: DocsParams) => ` #include "SentrySubsystem.h" FConfigureSettingsDelegate OnConfigureSettings; @@ -62,7 +60,7 @@ void UMyGameInstance::ConfigureSentrySettings(USentrySettings* Settings) USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); SentrySubsystem->InitializeWithSettings(OnConfigureSettings);`; -const getCrashReporterConfigSnippet = (params: Params) => ` +const getCrashReporterConfigSnippet = (params: DocsParams) => ` [CrashReportClient] CrashReportClientVersion=1.0 DataRouterUrl="${params.dsn.unreal}"`; From 97c8487178a082bb2ad36a8b9f685c36a0645c12 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Wed, 31 Dec 2025 11:03:57 +0100 Subject: [PATCH 08/30] chore(cleanup): remove tracing-related content to keep original PR logs-only (#105563) --- .../gettingStartedDocs/native/onboarding.tsx | 47 ------------- .../gettingStartedDocs/unity/onboarding.tsx | 58 ---------------- .../gettingStartedDocs/unreal/onboarding.tsx | 66 ------------------- 3 files changed, 171 deletions(-) diff --git a/static/app/gettingStartedDocs/native/onboarding.tsx b/static/app/gettingStartedDocs/native/onboarding.tsx index d8e559fd971aac..fbf24d95088ee8 100644 --- a/static/app/gettingStartedDocs/native/onboarding.tsx +++ b/static/app/gettingStartedDocs/native/onboarding.tsx @@ -21,13 +21,6 @@ int main(void) { sentry_options_set_database_path(options, ".sentry-native"); sentry_options_set_release(options, "my-project-name@2.3.12"); sentry_options_set_debug(options, 1);${ - params.isPerformanceSelected - ? ` - // Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing. - // We recommend adjusting this value in production. - sentry_options_set_traces_sample_rate(options, 1.0);` - : '' - }${ params.isLogsSelected ? ` sentry_options_set_enable_logs(options, 1);` @@ -119,46 +112,6 @@ export const onboarding: OnboardingConfig = { }, ], }, - ...(params.isPerformanceSelected - ? ([ - { - title: t('Tracing'), - content: [ - { - type: 'text', - text: t( - 'You can measure the performance of your code by capturing transactions and spans.' - ), - }, - { - type: 'code', - language: 'c', - code: `sentry_transaction_context_t *tx_ctx = sentry_transaction_context_new( - "test-transaction", - "test-operation" -); -sentry_transaction_t *tx = sentry_transaction_start(tx_ctx, NULL); - -// Perform your operation -// ... - -sentry_transaction_finish(tx);`, - }, - { - type: 'text', - text: tct( - 'Check out [link:the documentation] to learn more about tracing and custom instrumentation.', - { - link: ( - - ), - } - ), - }, - ], - }, - ] satisfies OnboardingStep[]) - : []), ...(params.isLogsSelected ? ([ { diff --git a/static/app/gettingStartedDocs/unity/onboarding.tsx b/static/app/gettingStartedDocs/unity/onboarding.tsx index 4284b34cfef2c8..ad4338fb485a96 100644 --- a/static/app/gettingStartedDocs/unity/onboarding.tsx +++ b/static/app/gettingStartedDocs/unity/onboarding.tsx @@ -58,19 +58,6 @@ export const onboarding: OnboardingConfig = { type: 'text', text: t("And that's it! Now Sentry can capture errors automatically."), }, - { - type: 'conditional', - condition: params.isPerformanceSelected, - content: [ - { - type: 'text', - text: tct( - 'To enable performance monitoring, set the [code:TracesSampleRate] option in the Sentry configuration window. For example, set it to [code:1.0] to capture 100% of transactions.', - {code: } - ), - }, - ], - }, { type: 'conditional', condition: params.isLogsSelected, @@ -115,51 +102,6 @@ export const onboarding: OnboardingConfig = { }, ], }, - ...(params.isPerformanceSelected - ? ([ - { - title: t('Tracing'), - content: [ - { - type: 'text', - text: t( - 'You can measure the performance of your code by capturing transactions and spans.' - ), - }, - { - type: 'code', - language: 'csharp', - code: `using Sentry; - -// Transaction can be started by providing, at minimum, the name and the operation -var transaction = SentrySdk.StartTransaction( - "test-transaction-name", - "test-transaction-operation" -); - -// Transactions can have child spans (and those spans can have child spans as well) -var span = transaction.StartChild("test-child-operation"); - -// ... Perform the operation - -span.Finish(); // Mark the span as finished -transaction.Finish(); // Mark the transaction as finished and send it to Sentry`, - }, - { - type: 'text', - text: tct( - 'Check out [link:the documentation] to learn more about the API and automatic instrumentations.', - { - link: ( - - ), - } - ), - }, - ], - }, - ] satisfies OnboardingStep[]) - : []), ...(params.isLogsSelected ? ([ { diff --git a/static/app/gettingStartedDocs/unreal/onboarding.tsx b/static/app/gettingStartedDocs/unreal/onboarding.tsx index 3c048e203e29f2..d59b1177869fea 100644 --- a/static/app/gettingStartedDocs/unreal/onboarding.tsx +++ b/static/app/gettingStartedDocs/unreal/onboarding.tsx @@ -38,14 +38,6 @@ void UMyGameInstance::ConfigureSentrySettings(USentrySettings* Settings) // If your game/app doesn't have sensitive data, you can get screenshots on error events automatically Settings->AttachScreenshot = true;${ - params.isPerformanceSelected - ? ` - - // Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing. - // We recommend adjusting this value in production. - Settings->TracesSampleRate = 1.0f;` - : '' - }${ params.isLogsSelected ? ` @@ -123,19 +115,6 @@ export const onboarding: OnboardingConfig = { language: 'url', code: params.dsn.public, }, - { - type: 'conditional', - condition: params.isPerformanceSelected, - content: [ - { - type: 'text', - text: tct( - 'To enable performance monitoring, set the [strong:Traces Sample Rate] option in the Sentry configuration window. For example, set it to [strong:1.0] to capture 100% of transactions.', - {strong: } - ), - }, - ], - }, { type: 'conditional', condition: params.isLogsSelected, @@ -181,51 +160,6 @@ export const onboarding: OnboardingConfig = { }, ], }, - ...(params.isPerformanceSelected - ? ([ - { - title: t('Tracing'), - content: [ - { - type: 'text', - text: t( - 'You can measure the performance of your code by capturing transactions and spans.' - ), - }, - { - type: 'code', - language: 'cpp', - code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); - -// Start a transaction -USentryTransaction* Transaction = SentrySubsystem->StartTransaction( - TEXT("test-transaction-name"), - TEXT("test-transaction-operation") -); - -// Start a child span -USentrySpan* Span = Transaction->StartChild(TEXT("test-child-operation")); - -// ... Perform your operation - -Span->Finish(); -Transaction->Finish();`, - }, - { - type: 'text', - text: tct( - 'Check out [link:the documentation] to learn more about the API and automatic instrumentations.', - { - link: ( - - ), - } - ), - }, - ], - }, - ] satisfies OnboardingStep[]) - : []), ...(params.isLogsSelected ? ([ { From f3c1a29250eab3e8803bfb4b5acf66fcbaf90438 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:24:54 +0100 Subject: [PATCH 09/30] further performace_monitoring cleanup --- static/app/components/onboarding/productSelection.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/app/components/onboarding/productSelection.tsx b/static/app/components/onboarding/productSelection.tsx index 7737cd8762b950..393f05616baaf8 100644 --- a/static/app/components/onboarding/productSelection.tsx +++ b/static/app/components/onboarding/productSelection.tsx @@ -184,7 +184,7 @@ export const platformProductAvailability = { ProductSolution.LOGS, ProductSolution.METRICS, ], - native: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + native: [ProductSolution.LOGS], node: [ ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING, @@ -401,8 +401,8 @@ export const platformProductAvailability = { ProductSolution.PROFILING, ProductSolution.LOGS, ], - unity: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], - unreal: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + unity: [ProductSolution.LOGS], + unreal: [ProductSolution.LOGS], } as Record; type ProductProps = { From b9a911ecd3665f81d015134bac93f29e0ba10573 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:54:37 +0100 Subject: [PATCH 10/30] add/fix logs onboarding --- static/app/gettingStartedDocs/dotnet/logs.tsx | 4 +- .../gettingStartedDocs/php-symfony/logs.tsx | 86 ++++++++---- static/app/gettingStartedDocs/unity/index.tsx | 2 + static/app/gettingStartedDocs/unity/logs.tsx | 127 ++++++++++++++++++ .../gettingStartedDocs/unity/onboarding.tsx | 4 +- 5 files changed, 190 insertions(+), 33 deletions(-) create mode 100644 static/app/gettingStartedDocs/unity/logs.tsx diff --git a/static/app/gettingStartedDocs/dotnet/logs.tsx b/static/app/gettingStartedDocs/dotnet/logs.tsx index 9118e13ac93c0c..c6a1e691ff8d47 100644 --- a/static/app/gettingStartedDocs/dotnet/logs.tsx +++ b/static/app/gettingStartedDocs/dotnet/logs.tsx @@ -30,7 +30,7 @@ export const logs: OnboardingConfig = { { type: 'text', text: tct( - 'To enable logging, you need to initialize the SDK with the [code:Experimental.EnableLogs] option set to [code:true].', + 'To enable logging, you need to initialize the SDK with the [code:EnableLogs] option set to [code:true].', { code: , } @@ -43,7 +43,7 @@ export const logs: OnboardingConfig = { { options.Dsn = "${params.dsn.public}"; // Enable logs to be sent to Sentry - options.Experimental.EnableLogs = true; + options.EnableLogs = true; });`, }, ], diff --git a/static/app/gettingStartedDocs/php-symfony/logs.tsx b/static/app/gettingStartedDocs/php-symfony/logs.tsx index b0cdf3609c98df..952ac2d0e84f15 100644 --- a/static/app/gettingStartedDocs/php-symfony/logs.tsx +++ b/static/app/gettingStartedDocs/php-symfony/logs.tsx @@ -14,7 +14,7 @@ export const logs: OnboardingConfig = { { type: 'text', text: tct( - 'Logs for Symfony are supported in version [code:4.12.0] and above of the Sentry PHP SDK and version [code:5.10.0] and above of the [code:sentry-symfony] bundle.', + 'Logs for Symfony are supported in Sentry Symfony SDK version [code:5.4.0] and above.', { code: , } @@ -38,13 +38,37 @@ export const logs: OnboardingConfig = { content: [ { type: 'text', - text: tct( - 'To enable logging, add the [code:enable_logs] option to your Sentry configuration:', - { - code: , - } + text: t( + 'To configure Sentry logging, add the Monolog handler to your configuration:' ), }, + { + type: 'code', + language: 'yaml', + code: `# config/packages/monolog.yaml +monolog: + handlers: + sentry_logs: + type: service + id: Sentry\\SentryBundle\\Monolog\\LogsHandler`, + }, + { + type: 'text', + text: t('Configure the service and choose a minimum log level:'), + }, + { + type: 'code', + language: 'yaml', + code: `# config/packages/sentry.yaml +services: + Sentry\\SentryBundle\\Monolog\\LogsHandler: + arguments: + - !php/const Monolog\\Logger::INFO`, + }, + { + type: 'text', + text: t('Enable the logs option:'), + }, { type: 'code', language: 'yaml', @@ -56,14 +80,11 @@ sentry: }, { type: 'text', - text: tct( - 'For integration with Monolog, see the [link:Symfony Logs documentation].', - { - link: ( - - ), - } - ), + text: tct('For more details, see the [link:Symfony Logs documentation].', { + link: ( + + ), + }), }, ], }, @@ -72,29 +93,36 @@ sentry: { type: StepType.VERIFY, content: [ + { + type: 'text', + text: tct( + 'Once you have configured the Sentry log handler, you can use your regular [code:LoggerInterface]. It will send logs to Sentry:', + { + code: , + } + ), + }, + { + type: 'code', + language: 'php', + code: `$this->logger->info("This is an info message"); +$this->logger->warning('User {id} failed to login.', ['id' => $user->id]); +$this->logger->error("This is an error message");`, + }, { type: 'text', text: t( - 'Once configured, you can send logs using the standard PSR-3 logger interface:' + 'You can pass additional attributes directly to the logging functions. These properties will be sent to Sentry, and can be searched from within the Logs UI:' ), }, { type: 'code', language: 'php', - code: `use Psr\\Log\\LoggerInterface; - -class SomeService -{ - public function __construct( - private LoggerInterface $logger - ) {} - - public function someMethod(): void - { - $this->logger->info('A test log message'); - $this->logger->error('An error log message', ['context' => 'value']); - } -}`, + code: `$this->logger->error('Something went wrong', [ + 'user_id' => $userId, + 'action' => 'update_profile', + 'additional_data' => $data, +]);`, }, ], }, diff --git a/static/app/gettingStartedDocs/unity/index.tsx b/static/app/gettingStartedDocs/unity/index.tsx index 6c1e6b06917266..2d9adc901245c9 100644 --- a/static/app/gettingStartedDocs/unity/index.tsx +++ b/static/app/gettingStartedDocs/unity/index.tsx @@ -1,12 +1,14 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {crashReport} from './crashReport'; +import {logs} from './logs'; import {onboarding} from './onboarding'; const docs: Docs = { onboarding, feedbackOnboardingCrashApi: crashReport, crashReportOnboarding: crashReport, + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/unity/logs.tsx b/static/app/gettingStartedDocs/unity/logs.tsx new file mode 100644 index 00000000000000..306f53b1aac46e --- /dev/null +++ b/static/app/gettingStartedDocs/unity/logs.tsx @@ -0,0 +1,127 @@ +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'; + +export const logs: OnboardingConfig = { + install: () => [ + { + type: StepType.INSTALL, + content: [ + { + type: 'text', + text: tct( + 'Logs for Unity are supported in Sentry SDK version [code:4.0.0] and above.', + { + code: , + } + ), + }, + ], + }, + ], + configure: (params: DocsParams) => [ + { + type: StepType.CONFIGURE, + content: [ + { + type: 'text', + text: t( + 'To enable logging in your Unity game, you need to configure the Sentry SDK with structured logging enabled.' + ), + }, + { + type: 'text', + text: tct( + 'Open your project settings: [strong:Tools > Sentry > Logging] and check the [strong:Enable Structured Logging] option.', + { + strong: , + } + ), + }, + { + type: 'text', + text: t('Alternatively, you can enable logging programmatically:'), + }, + { + type: 'code', + language: 'csharp', + code: `SentrySdk.Init(options => +{ + options.Dsn = "${params.dsn.public}"; + + // Enable logs to be sent to Sentry + options.EnableLogs = true; +});`, + }, + ], + }, + ], + verify: () => [ + { + type: StepType.VERIFY, + content: [ + { + type: 'text', + text: tct( + 'Once the feature is enabled and the SDK is initialized, you can send logs using the [code:SentrySdk.Logger] API:', + { + code: , + } + ), + }, + { + type: 'code', + language: 'csharp', + code: `SentrySdk.Logger.LogInfo("A simple debug log message"); +SentrySdk.Logger.LogError("A {0} log message", "formatted");`, + }, + { + type: 'text', + text: tct( + "You can also use Unity's standard Debug logging. By default, [code:Debug.LogWarning] and above are automatically captured. [code:Debug.Log] calls are not sent unless you set [code:options.CaptureStructuredLogsForLogType[LogType.Log] = true].", + { + code: , + } + ), + }, + { + type: 'code', + language: 'csharp', + code: `// Debug.LogWarning and above are captured by default +Debug.LogWarning("Low memory warning."); +Debug.LogError("Failed to save game data."); + +// Debug.Log requires explicit opt-in via CaptureStructuredLogsForLogType[LogType.Log] = true +Debug.Log("Player position updated.");`, + }, + { + type: 'text', + text: t( + 'You can pass additional attributes directly to the logging functions. These properties will be sent to Sentry, and can be searched from within the Logs UI:' + ), + }, + { + type: 'code', + language: 'csharp', + code: `SentrySdk.Logger.LogWarning(static log => +{ + log.SetAttribute("my.attribute", "value"); +}, "A log message with additional attributes.");`, + }, + { + type: 'text', + text: tct( + 'For more configuration options, see the [link:Unity Logs documentation].', + { + link: , + } + ), + }, + ], + }, + ], +}; diff --git a/static/app/gettingStartedDocs/unity/onboarding.tsx b/static/app/gettingStartedDocs/unity/onboarding.tsx index ad4338fb485a96..4e520ed1bc72a6 100644 --- a/static/app/gettingStartedDocs/unity/onboarding.tsx +++ b/static/app/gettingStartedDocs/unity/onboarding.tsx @@ -119,8 +119,8 @@ export const onboarding: OnboardingConfig = { code: `using Sentry; using UnityEngine; -// Unity's Debug.Log will automatically be captured -Debug.Log("This log will be sent to Sentry"); +// Unity's Debug.Warning (and higher severity levels) will automatically be captured +Debug.Warning("This warning will be sent to Sentry"); // Or use the SDK directly SentrySdk.Logger.LogInfo("A simple log message"); From c34b0242e650a5f815a7275942e9f8cd05eeaebf Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 19 Jan 2026 16:30:35 +0100 Subject: [PATCH 11/30] feat(onboarding): Add logs for .NET platforms --- .../onboarding/productSelection.tsx | 16 ++++----- static/app/data/platformCategories.tsx | 8 +++++ .../dotnet-aspnet/onboarding.spec.tsx | 12 +++++++ .../dotnet-aspnet/onboarding.tsx | 17 +++++++++- .../dotnet-aspnetcore/onboarding.spec.tsx | 12 +++++++ .../dotnet-aspnetcore/onboarding.tsx | 15 ++++++++ .../dotnet-awslambda/onboarding.spec.tsx | 12 +++++++ .../dotnet-awslambda/onboarding.tsx | 17 +++++++++- .../dotnet-gcpfunctions/onboarding.spec.tsx | 14 ++++++++ .../dotnet-gcpfunctions/onboarding.tsx | 17 +++++++++- .../dotnet-maui/onboarding.spec.tsx | 12 +++++++ .../dotnet-maui/onboarding.tsx | 15 ++++++++ .../dotnet-winforms/onboarding.spec.tsx | 12 +++++++ .../dotnet-winforms/onboarding.tsx | 15 ++++++++ .../dotnet-wpf/onboarding.spec.tsx | 12 +++++++ .../dotnet-wpf/onboarding.tsx | 15 ++++++++ .../dotnet-xamarin/onboarding.spec.tsx | 4 +++ .../dotnet-xamarin/onboarding.tsx | 17 +++++++++- static/app/gettingStartedDocs/dotnet/logs.tsx | 26 +++++++++++--- .../dotnet/onboarding.spec.tsx | 12 +++++++ .../gettingStartedDocs/dotnet/onboarding.tsx | 34 +++---------------- 21 files changed, 269 insertions(+), 45 deletions(-) diff --git a/static/app/components/onboarding/productSelection.tsx b/static/app/components/onboarding/productSelection.tsx index 393f05616baaf8..5406d7bab01664 100644 --- a/static/app/components/onboarding/productSelection.tsx +++ b/static/app/components/onboarding/productSelection.tsx @@ -97,14 +97,14 @@ export const platformProductAvailability = { ProductSolution.PROFILING, ProductSolution.LOGS, ], - 'dotnet-aspnet': [ProductSolution.PERFORMANCE_MONITORING], - 'dotnet-aspnetcore': [ProductSolution.PERFORMANCE_MONITORING], - 'dotnet-awslambda': [ProductSolution.PERFORMANCE_MONITORING], - 'dotnet-gcpfunctions': [ProductSolution.PERFORMANCE_MONITORING], - 'dotnet-maui': [ProductSolution.PERFORMANCE_MONITORING], - 'dotnet-winforms': [ProductSolution.PERFORMANCE_MONITORING], - 'dotnet-wpf': [ProductSolution.PERFORMANCE_MONITORING], - 'dotnet-xamarin': [ProductSolution.PERFORMANCE_MONITORING], + 'dotnet-aspnet': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + 'dotnet-aspnetcore': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + 'dotnet-awslambda': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + 'dotnet-gcpfunctions': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + 'dotnet-maui': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + 'dotnet-winforms': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + 'dotnet-wpf': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + 'dotnet-xamarin': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], dart: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], kotlin: [ProductSolution.PERFORMANCE_MONITORING], go: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], diff --git a/static/app/data/platformCategories.tsx b/static/app/data/platformCategories.tsx index edfdafcf38cf3e..700f3002af6c70 100644 --- a/static/app/data/platformCategories.tsx +++ b/static/app/data/platformCategories.tsx @@ -308,6 +308,14 @@ export const withLoggingOnboarding: Set = new Set([ 'cocoa-swift', 'dart', 'dotnet', + 'dotnet-aspnet', + 'dotnet-aspnetcore', + 'dotnet-awslambda', + 'dotnet-gcpfunctions', + 'dotnet-maui', + 'dotnet-winforms', + 'dotnet-wpf', + 'dotnet-xamarin', 'flutter', 'go', 'go-echo', diff --git a/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.spec.tsx index 454be3250381ce..96843a7744a74c 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.spec.tsx @@ -14,12 +14,14 @@ describe('aspnet onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], }); // Renders main headings expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Documentation'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument(); // Renders SDK version from registry @@ -39,4 +41,14 @@ describe('aspnet onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/)) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/o.EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.tsx index 1854b54fe6eda7..bfa70ba82d1929 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnet/onboarding.tsx @@ -4,6 +4,7 @@ import type { OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -50,6 +51,12 @@ public class MvcApplication : HttpApplication // We recommend adjusting this value in production o.TracesSampleRate = 1.0;` : '' + }${ + params.isLogsSelected + ? ` + // Enable logs to be sent to Sentry + o.EnableLogs = true;` + : '' } // If you are using EF (and installed the NuGet package): o.AddEntityFramework(); @@ -136,7 +143,7 @@ export const onboarding: OnboardingConfig = { }, ], // TODO: Add proper verify step - verify: () => [ + verify: params => [ { title: t('Documentation'), content: [ @@ -153,6 +160,14 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), { title: t('Samples'), content: [ diff --git a/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.spec.tsx index cdca3a177530c0..e4b5ce1edc12cf 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.spec.tsx @@ -14,6 +14,7 @@ describe('aspnetcore onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], }); // Renders main headings @@ -21,6 +22,7 @@ describe('aspnetcore onboarding docs', () => { expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Tracing'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument(); // Renders SDK version from registry @@ -40,4 +42,14 @@ describe('aspnetcore onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/)) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/o.EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.tsx index eec93af36e87b7..d88b4bb36e3f43 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.tsx @@ -5,6 +5,7 @@ import type { OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -40,6 +41,12 @@ public static IHostBuilder CreateHostBuilder(string[] args) => // We recommend adjusting this value in production o.TracesSampleRate = 1.0;` : '' + }${ + params.isLogsSelected + ? ` + // Enable logs to be sent to Sentry + o.EnableLogs = true;` + : '' } }); });`; @@ -177,6 +184,14 @@ export const onboarding: OnboardingConfig = { }, ] satisfies OnboardingStep[]) : []), + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), { title: t('Samples'), content: [ diff --git a/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.spec.tsx index 02268d6e32b8a9..aef7247759e1b1 100644 --- a/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.spec.tsx @@ -14,12 +14,14 @@ describe('awslambda onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.LOGS], }); // Renders main headings expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); // Renders SDK version from registry expect( @@ -38,4 +40,14 @@ describe('awslambda onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/)) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/o.EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.tsx index 1df5ee6f5d7e5c..b700e9baf64ce5 100644 --- a/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-awslambda/onboarding.tsx @@ -4,6 +4,7 @@ import type { OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -41,6 +42,12 @@ public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFu // We recommend adjusting this value in production. o.TracesSampleRate = 1.0;` : '' + }${ + params.isLogsSelected + ? ` + // Enable logs to be sent to Sentry + o.EnableLogs = true;` + : '' } }) .UseStartup(); @@ -126,7 +133,7 @@ export const onboarding: OnboardingConfig = { ], }, ], - verify: () => [ + verify: params => [ { type: StepType.VERIFY, content: [ @@ -161,5 +168,13 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), ], }; diff --git a/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.spec.tsx index 7a86e1d25f5e75..ce508d0a26e19f 100644 --- a/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.spec.tsx @@ -2,6 +2,8 @@ import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboa import {screen} from 'sentry-test/reactTestingLibrary'; import {textWithMarkupMatcher} from 'sentry-test/utils'; +import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/types'; + import docs from './index'; describe('gcpfunctions onboarding docs', () => { @@ -12,12 +14,14 @@ describe('gcpfunctions onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.LOGS], }); // Renders main headings expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument(); // Renders SDK version from registry @@ -36,4 +40,14 @@ describe('gcpfunctions onboarding docs', () => { ) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx index 8636849bbfa8de..7f4e16a19b1fcc 100644 --- a/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx @@ -4,6 +4,7 @@ import type { OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -58,6 +59,12 @@ const getConfigureJsonSnippet = (params: DocsParams) => ` // We recommend adjusting this value in production. "TracesSampleRate": 1` : '' + }${ + params.isLogsSelected + ? ` + // Enable logs to be sent to Sentry + "EnableLogs": true` + : '' } } }`; @@ -146,7 +153,7 @@ export const onboarding: OnboardingConfig = { ], }, ], - verify: () => [ + verify: params => [ { type: StepType.VERIFY, content: [ @@ -161,6 +168,14 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), { title: t('Samples'), content: [ diff --git a/static/app/gettingStartedDocs/dotnet-maui/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-maui/onboarding.spec.tsx index b2e5bb106c95e1..8168b4c4ac2cc9 100644 --- a/static/app/gettingStartedDocs/dotnet-maui/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-maui/onboarding.spec.tsx @@ -14,6 +14,7 @@ describe('maui onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], }); // Renders main headings @@ -21,6 +22,7 @@ describe('maui onboarding docs', () => { expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Tracing'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Sample Application'})).toBeInTheDocument(); // Renders SDK version from registry @@ -40,4 +42,14 @@ describe('maui onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/options.TracesSampleRate/)) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/options.EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet-maui/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-maui/onboarding.tsx index 027ac54907d6b7..202a972eed07f5 100644 --- a/static/app/gettingStartedDocs/dotnet-maui/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-maui/onboarding.tsx @@ -5,6 +5,7 @@ import type { OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -46,6 +47,12 @@ public static MauiApp CreateMauiApp() // We recommend adjusting this value in production. options.TracesSampleRate = 1.0;` : '' + }${ + params.isLogsSelected + ? ` + // Enable logs to be sent to Sentry + options.EnableLogs = true;` + : '' } // Other Sentry options can be set here. @@ -204,6 +211,14 @@ export const onboarding: OnboardingConfig = { }, ] satisfies OnboardingStep[]) : []), + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), { title: t('Sample Application'), content: [ diff --git a/static/app/gettingStartedDocs/dotnet-winforms/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-winforms/onboarding.spec.tsx index a8daae30e306c9..ecf649896c319c 100644 --- a/static/app/gettingStartedDocs/dotnet-winforms/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-winforms/onboarding.spec.tsx @@ -14,6 +14,7 @@ describe('winforms onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], }); // Renders main headings @@ -22,6 +23,7 @@ describe('winforms onboarding docs', () => { expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Tracing'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Documentation'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument(); // Renders SDK version from registry @@ -41,4 +43,14 @@ describe('winforms onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/)) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/o.EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet-winforms/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-winforms/onboarding.tsx index c8fb24560fe707..a40a9f2f38ae8a 100644 --- a/static/app/gettingStartedDocs/dotnet-winforms/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-winforms/onboarding.tsx @@ -5,6 +5,7 @@ import type { OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -37,6 +38,12 @@ static class Program // We recommend adjusting this value in production. o.TracesSampleRate = 1.0;` : '' + }${ + params.isLogsSelected + ? ` + // Enable logs to be sent to Sentry + o.EnableLogs = true;` + : '' } }); // Configure WinForms to throw exceptions so Sentry can capture them. @@ -177,6 +184,14 @@ export const onboarding: OnboardingConfig = { }, ] satisfies OnboardingStep[]) : []), + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), { title: t('Samples'), content: [ diff --git a/static/app/gettingStartedDocs/dotnet-wpf/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-wpf/onboarding.spec.tsx index a9ca3500d49ef6..fc0da5db51c823 100644 --- a/static/app/gettingStartedDocs/dotnet-wpf/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-wpf/onboarding.spec.tsx @@ -14,6 +14,7 @@ describe('wpf onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], }); // Renders main headings @@ -22,6 +23,7 @@ describe('wpf onboarding docs', () => { expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Tracing'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Documentation'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument(); // Renders SDK version from registry @@ -41,4 +43,14 @@ describe('wpf onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/)) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/o.EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet-wpf/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-wpf/onboarding.tsx index 979477248a423e..e5cfb167b44f59 100644 --- a/static/app/gettingStartedDocs/dotnet-wpf/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-wpf/onboarding.tsx @@ -5,6 +5,7 @@ import type { OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -36,6 +37,12 @@ public partial class App : Application // We recommend adjusting this value in production. o.TracesSampleRate = 1.0;` : '' + }${ + params.isLogsSelected + ? ` + // Enable logs to be sent to Sentry + o.EnableLogs = true;` + : '' } }); } @@ -177,6 +184,14 @@ export const onboarding: OnboardingConfig = { }, ] satisfies OnboardingStep[]) : []), + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), { title: t('Samples'), content: [ diff --git a/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.spec.tsx index ca05fc9099fabe..4eabe228cfb584 100644 --- a/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.spec.tsx @@ -2,6 +2,8 @@ import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboa import {screen} from 'sentry-test/reactTestingLibrary'; import {textWithMarkupMatcher} from 'sentry-test/utils'; +import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/types'; + import docs from './index'; describe('xamarin onboarding docs', () => { @@ -12,6 +14,7 @@ describe('xamarin onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], }); // Renders main headings @@ -21,6 +24,7 @@ describe('xamarin onboarding docs', () => { expect(screen.getByRole('heading', {name: 'Tracing'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Documentation'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Limitations'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument(); // Renders SDK version from registry diff --git a/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.tsx index 532b292c5a519c..07f42b4c8dcbb1 100644 --- a/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-xamarin/onboarding.tsx @@ -4,6 +4,7 @@ import type { OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -35,6 +36,8 @@ public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompa // Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing. // We recommend adjusting this value in production. options.TracesSampleRate = 1.0; + // Enable logs to be sent to Sentry + options.EnableLogs = true; // If you installed Sentry.Xamarin.Forms: options.AddXamarinFormsIntegration(); });`; @@ -52,6 +55,8 @@ public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsAppli // Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing. // We recommend adjusting this value in production. options.TracesSampleRate = 1.0; + // Enable logs to be sent to Sentry + options.EnableLogs = true; options.AddXamarinFormsIntegration(); });`; @@ -68,6 +73,8 @@ sealed partial class App : Application // Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing. // We recommend adjusting this value in production. options.TracesSampleRate = 1.0; + // Enable logs to be sent to Sentry + options.EnableLogs = true; options.AddXamarinFormsIntegration(); });`; @@ -181,7 +188,7 @@ export const onboarding: OnboardingConfig = { ], }, ], - verify: () => [ + verify: params => [ { type: StepType.VERIFY, content: [ @@ -229,6 +236,14 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isLogsSelected + ? [ + { + title: t('Verify Logs'), + content: [logsVerify(params)], + }, + ] + : []), { title: t('Documentation'), content: [ diff --git a/static/app/gettingStartedDocs/dotnet/logs.tsx b/static/app/gettingStartedDocs/dotnet/logs.tsx index c6a1e691ff8d47..abdec027b98c88 100644 --- a/static/app/gettingStartedDocs/dotnet/logs.tsx +++ b/static/app/gettingStartedDocs/dotnet/logs.tsx @@ -1,11 +1,29 @@ import {ExternalLink} from 'sentry/components/core/link'; -import type { - DocsParams, - OnboardingConfig, +import { + StepType, + type ContentBlock, + type DocsParams, + type OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; -import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; +export const logsVerify = (params: DocsParams): ContentBlock => ({ + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: t('Send test logs from your app to verify logs are arriving in Sentry.'), + }, + { + type: 'code', + language: 'csharp', + code: `SentrySdk.Logger.LogInfo("A simple log message"); +SentrySdk.Logger.LogError("A {0} log message", "formatted");`, + }, + ], +}); + export const logs: OnboardingConfig = { install: () => [ { diff --git a/static/app/gettingStartedDocs/dotnet/onboarding.spec.tsx b/static/app/gettingStartedDocs/dotnet/onboarding.spec.tsx index 1afd2b2e9d6ad0..50151073b5fb3b 100644 --- a/static/app/gettingStartedDocs/dotnet/onboarding.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet/onboarding.spec.tsx @@ -14,6 +14,7 @@ describe('dotnet onboarding docs', () => { version: '1.99.9', }, }, + selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], }); // Renders main headings @@ -21,6 +22,7 @@ describe('dotnet onboarding docs', () => { expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Tracing'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument(); expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument(); // Renders SDK version from registry @@ -53,4 +55,14 @@ describe('dotnet onboarding docs', () => { await screen.findByText(textWithMarkupMatcher(/options.ProfilesSampleRate/)) ).toBeInTheDocument(); }); + + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); + + expect( + await screen.findByText(textWithMarkupMatcher(/options.EnableLogs/)) + ).toBeInTheDocument(); + }); }); diff --git a/static/app/gettingStartedDocs/dotnet/onboarding.tsx b/static/app/gettingStartedDocs/dotnet/onboarding.tsx index 07b03580783e82..8b02d23cec8682 100644 --- a/static/app/gettingStartedDocs/dotnet/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet/onboarding.tsx @@ -5,6 +5,7 @@ import type { OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs'; import {t, tct} from 'sentry/locale'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; @@ -80,7 +81,6 @@ SentrySdk.Init(options => }${ params.isLogsSelected ? ` - // Enable logs to be sent to Sentry options.EnableLogs = true;` : '' @@ -263,36 +263,12 @@ export const onboarding: OnboardingConfig = { ] satisfies OnboardingStep[]) : []), ...(params.isLogsSelected - ? ([ + ? [ { - title: t('Logs'), - content: [ - { - type: 'text', - text: t( - 'Once configured, you can send logs using the SentrySdk.Logger APIs:' - ), - }, - { - type: 'code', - language: 'csharp', - code: `SentrySdk.Logger.LogInfo("A simple log message"); -SentrySdk.Logger.LogError("A {0} log message", "formatted");`, - }, - { - type: 'text', - text: tct( - 'Check out [link:the Logs documentation] to learn more about custom attributes and integrations.', - { - link: ( - - ), - } - ), - }, - ], + title: t('Verify Logs'), + content: [logsVerify(params)], }, - ] satisfies OnboardingStep[]) + ] : []), { title: t('Samples'), From 9d233945572d0550f73b1ab4cbc17f3105e59756 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Tue, 20 Jan 2026 09:49:07 +0100 Subject: [PATCH 12/30] add comma to gcp config --- .../app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx b/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx index 7f4e16a19b1fcc..f4a1fe2b736887 100644 --- a/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet-gcpfunctions/onboarding.tsx @@ -61,7 +61,7 @@ const getConfigureJsonSnippet = (params: DocsParams) => ` : '' }${ params.isLogsSelected - ? ` + ? `, // Enable logs to be sent to Sentry "EnableLogs": true` : '' From cb6048d6f89f2ce2d4b68bf2d6f23e919b2ff9bc Mon Sep 17 00:00:00 2001 From: Alex Alderman Webb Date: Tue, 20 Jan 2026 14:50:12 +0100 Subject: [PATCH 13/30] feat(onboarding): Logs page for .NET platforms (#106550) Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. --- .../dotnet-aspnet/index.tsx | 2 + .../dotnet-aspnetcore/index.tsx | 2 + .../dotnet-awslambda/index.tsx | 2 + .../dotnet-gcpfunctions/index.tsx | 2 + .../gettingStartedDocs/dotnet-maui/index.tsx | 2 + .../dotnet-winforms/index.tsx | 2 + .../gettingStartedDocs/dotnet-wpf/index.tsx | 2 + .../dotnet-xamarin/index.tsx | 2 + .../app/gettingStartedDocs/dotnet/index.tsx | 4 +- .../gettingStartedDocs/dotnet/logs.spec.tsx | 39 +++++++++++ static/app/gettingStartedDocs/dotnet/logs.tsx | 65 +++++++++---------- .../app/gettingStartedDocs/dotnet/utils.tsx | 34 ++++++---- 12 files changed, 111 insertions(+), 47 deletions(-) create mode 100644 static/app/gettingStartedDocs/dotnet/logs.spec.tsx diff --git a/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx b/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx index 418194d2ba23e5..7a1808c107bd14 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx @@ -1,4 +1,5 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import { feedbackOnboardingJsLoader, replayOnboardingJsLoader, @@ -12,6 +13,7 @@ const docs: Docs = { replayOnboardingJsLoader, crashReportOnboarding: crashReport, feedbackOnboardingJsLoader, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx b/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx index 418194d2ba23e5..7a1808c107bd14 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx @@ -1,4 +1,5 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import { feedbackOnboardingJsLoader, replayOnboardingJsLoader, @@ -12,6 +13,7 @@ const docs: Docs = { replayOnboardingJsLoader, crashReportOnboarding: crashReport, feedbackOnboardingJsLoader, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx b/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx index 5a0e27e30c0730..c0b0a998cf224b 100644 --- a/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx @@ -1,5 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -8,6 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx b/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx index 5a0e27e30c0730..c0b0a998cf224b 100644 --- a/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx @@ -1,5 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -8,6 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-maui/index.tsx b/static/app/gettingStartedDocs/dotnet-maui/index.tsx index 5a0e27e30c0730..c0b0a998cf224b 100644 --- a/static/app/gettingStartedDocs/dotnet-maui/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-maui/index.tsx @@ -1,5 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -8,6 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-winforms/index.tsx b/static/app/gettingStartedDocs/dotnet-winforms/index.tsx index 5a0e27e30c0730..c0b0a998cf224b 100644 --- a/static/app/gettingStartedDocs/dotnet-winforms/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-winforms/index.tsx @@ -1,5 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -8,6 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-wpf/index.tsx b/static/app/gettingStartedDocs/dotnet-wpf/index.tsx index 5a0e27e30c0730..c0b0a998cf224b 100644 --- a/static/app/gettingStartedDocs/dotnet-wpf/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-wpf/index.tsx @@ -1,5 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -8,6 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx b/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx index 5a0e27e30c0730..c0b0a998cf224b 100644 --- a/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx @@ -1,5 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -8,6 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet/index.tsx b/static/app/gettingStartedDocs/dotnet/index.tsx index dcf7712ca3498b..93cddb7d29e984 100644 --- a/static/app/gettingStartedDocs/dotnet/index.tsx +++ b/static/app/gettingStartedDocs/dotnet/index.tsx @@ -1,8 +1,8 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {feedback} from './feedback'; -import {logs} from './logs'; import {onboarding} from './onboarding'; import {profiling} from './profiling'; @@ -11,7 +11,7 @@ const docs: Docs = { feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, profilingOnboarding: profiling, - logsOnboarding: logs, + logsOnboarding: dotnetLogs(), }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet/logs.spec.tsx b/static/app/gettingStartedDocs/dotnet/logs.spec.tsx new file mode 100644 index 00000000000000..5d6d058d57ac72 --- /dev/null +++ b/static/app/gettingStartedDocs/dotnet/logs.spec.tsx @@ -0,0 +1,39 @@ +// Only import and test functions that don't have circular dependencies +const {dotnetLogs} = jest.requireActual('sentry/gettingStartedDocs/dotnet/logs'); + +describe('logs', () => { + const mockParams = { + dsn: { + public: 'https://test@example.com/123', + }, + sourcePackageRegistries: { + isLoading: false, + }, + }; + + it('generates logs onboarding config with default parameters', () => { + const result = dotnetLogs(); + + // Test install step + const installSteps = result.install(mockParams); + expect(installSteps).toHaveLength(1); + expect(installSteps[0].type).toBe('install'); + expect(installSteps[0].content).toHaveLength(2); + + // Test configure step + const configureSteps = result.configure(mockParams); + expect(configureSteps).toHaveLength(1); + expect(configureSteps[0].type).toBe('configure'); + expect(configureSteps[0].content[1].code).toContain('o.EnableLogs = true;'); + expect(configureSteps[0].content[1].code).toContain(mockParams.dsn.public); + + // Test verify step + const verifySteps = result.verify({isLogsSelected: true}); + expect(verifySteps).toHaveLength(1); + expect(verifySteps[0].type).toBe('verify'); + expect(verifySteps[0].content).toHaveLength(1); + expect(verifySteps[0].content[0].type).toBe('conditional'); + const conditionalContent = verifySteps[0].content[0].content; + expect(conditionalContent[1].code).toContain('SentrySdk.Logger.LogInfo'); + }); +}); diff --git a/static/app/gettingStartedDocs/dotnet/logs.tsx b/static/app/gettingStartedDocs/dotnet/logs.tsx index abdec027b98c88..839adb0c93275a 100644 --- a/static/app/gettingStartedDocs/dotnet/logs.tsx +++ b/static/app/gettingStartedDocs/dotnet/logs.tsx @@ -5,6 +5,10 @@ import { type DocsParams, type OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; +import { + getInstallSnippetCoreCli, + getInstallSnippetPackageManager, +} from 'sentry/gettingStartedDocs/dotnet/utils'; import {t, tct} from 'sentry/locale'; export const logsVerify = (params: DocsParams): ContentBlock => ({ @@ -13,7 +17,7 @@ export const logsVerify = (params: DocsParams): ContentBlock => ({ content: [ { type: 'text', - text: t('Send test logs from your app to verify logs are arriving in Sentry.'), + text: t('Send a test log from your app to verify logs are arriving in Sentry.'), }, { type: 'code', @@ -24,8 +28,8 @@ SentrySdk.Logger.LogError("A {0} log message", "formatted");`, ], }); -export const logs: OnboardingConfig = { - install: () => [ +export const dotnetLogs = (): OnboardingConfig => ({ + install: params => [ { type: StepType.INSTALL, content: [ @@ -38,6 +42,21 @@ export const logs: OnboardingConfig = { } ), }, + { + type: 'code', + tabs: [ + { + label: 'Package Manager', + language: 'shell', + code: getInstallSnippetPackageManager(params), + }, + { + label: '.NET Core CLI', + language: 'shell', + code: getInstallSnippetCoreCli(params), + }, + ], + }, ], }, ], @@ -64,43 +83,23 @@ export const logs: OnboardingConfig = { options.EnableLogs = true; });`, }, - ], - }, - ], - verify: () => [ - { - type: StepType.VERIFY, - content: [ - { - type: 'text', - text: t( - 'Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the SentrySdk.Logger APIs.' - ), - }, - { - type: 'text', - text: t( - 'The SentrySdk.Logger instance exposes six methods that you can use to log messages at different log levels: Trace, Debug, Info, Warning, Error, and Fatal.' - ), - }, - { - type: 'code', - language: 'csharp', - code: `SentrySdk.Logger.LogInfo("A simple log message"); -SentrySdk.Logger.LogError("A {0} log message", "formatted");`, - }, { type: 'text', text: tct( - 'You can also attach custom attributes via a delegate. For more information, see the [link:Integrations documentation].', + 'For more detailed information on logging configuration, see the [link:logs documentation].', { - link: ( - - ), + link: , } ), }, ], }, ], -}; + verify: (params: DocsParams) => [ + { + type: StepType.VERIFY, + description: t('Test that logs are working by sending some test logs:'), + content: [logsVerify(params)], + }, + ], +}); diff --git a/static/app/gettingStartedDocs/dotnet/utils.tsx b/static/app/gettingStartedDocs/dotnet/utils.tsx index a9505a129e29b4..309afd7d8e4bde 100644 --- a/static/app/gettingStartedDocs/dotnet/utils.tsx +++ b/static/app/gettingStartedDocs/dotnet/utils.tsx @@ -1,16 +1,26 @@ import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; -export const getInstallSnippetPackageManager = (params: DocsParams) => ` -Install-Package Sentry -Version ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; +export const getInstallSnippetPackageManager = (params: DocsParams) => { + let version = '3.34.0'; + if (params.isLogsSelected) { + version = '6.0.0'; + } else if (params.isProfilingSelected) { + version = '4.3.0'; + } -export const getInstallSnippetCoreCli = (params: DocsParams) => ` -dotnet add package Sentry -v ${getPackageVersion( - params, - 'sentry.dotnet', - params.isProfilingSelected ? '4.3.0' : '3.34.0' -)}`; + return ` +Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', version)}`; +}; + +export const getInstallSnippetCoreCli = (params: DocsParams) => { + let version = '3.34.0'; + if (params.isLogsSelected) { + version = '6.0.0'; + } else if (params.isProfilingSelected) { + version = '4.3.0'; + } + + return ` +dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', version)}`; +}; From aa12c66b89e6de7a18a5e867515926b7c6ce5c72 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 15:31:43 +0100 Subject: [PATCH 14/30] cleanup unreal gettingStartedDocs --- static/app/gettingStartedDocs/unreal/logs.tsx | 15 ++-- .../gettingStartedDocs/unreal/onboarding.tsx | 73 ++++++++----------- 2 files changed, 38 insertions(+), 50 deletions(-) diff --git a/static/app/gettingStartedDocs/unreal/logs.tsx b/static/app/gettingStartedDocs/unreal/logs.tsx index f70af8755dff67..6fe429e7411349 100644 --- a/static/app/gettingStartedDocs/unreal/logs.tsx +++ b/static/app/gettingStartedDocs/unreal/logs.tsx @@ -69,9 +69,7 @@ SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::Create content: [ { type: 'text', - text: t( - 'Once structured logging is enabled, you can send logs using the AddLog method on the Sentry subsystem.' - ), + text: t('Send a test log from your app to verify logs are arriving in Sentry.'), }, { type: 'code', @@ -79,18 +77,17 @@ SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::Create code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); // Send logs at different severity levels -SentrySubsystem->AddLog(TEXT("A simple log message"), ESentryLevel::Info, TEXT("GameFlow")); -SentrySubsystem->AddLog(TEXT("Failed to save game data"), ESentryLevel::Error, TEXT("SaveSystem"));`, +SentrySubsystem->LogInfo(TEXT("Test log message"), TEXT("Test")); +SentrySubsystem->LogWarning(TEXT("Warning message"), TEXT("Test")); +SentrySubsystem->LogError(TEXT("Error message"), TEXT("Test"));`, }, { type: 'text', text: tct( - 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. For more information, see the [link:Automatic UE_LOG Integration documentation].', + 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. For more information, see the [link:logs documentation].', { code: , - link: ( - - ), + link: , } ), }, diff --git a/static/app/gettingStartedDocs/unreal/onboarding.tsx b/static/app/gettingStartedDocs/unreal/onboarding.tsx index d59b1177869fea..ff20a080e69347 100644 --- a/static/app/gettingStartedDocs/unreal/onboarding.tsx +++ b/static/app/gettingStartedDocs/unreal/onboarding.tsx @@ -9,18 +9,27 @@ import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {getConsoleExtensions} from 'sentry/components/onboarding/gettingStartedDoc/utils/consoleExtensions'; import {t, tct} from 'sentry/locale'; -const getVerifySnippet = () => ` -#include "SentrySubsystem.h" +const getVerifySnippet = (params: DocsParams) => { + const logsCode = params.isLogsSelected + ? ` + + // Send logs at different severity levels + SentrySubsystem->LogInfo(TEXT("A simple log message"), TEXT("GameFlow"));` + : ''; + + return `#include "SentrySubsystem.h" void Verify() { // Obtain reference to GameInstance UGameInstance* GameInstance = ...; - // Capture message USentrySubsystem* SentrySubsystem = GameInstance->GetSubsystem(); - SentrySubsystem->CaptureMessage(TEXT("Capture message")); + + // Capture message + SentrySubsystem->CaptureMessage(TEXT("Capture message"));${logsCode} }`; +}; const getSettingsConfigureSnippet = (params: DocsParams) => ` #include "SentrySubsystem.h" @@ -156,46 +165,28 @@ export const onboarding: OnboardingConfig = { { type: 'code', language: 'cpp', - code: getVerifySnippet(), + code: getVerifySnippet(params), + }, + { + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: tct( + 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. Check out [link:the Logs documentation] to learn more.', + { + code: , + link: ( + + ), + } + ), + }, + ], }, ], }, - ...(params.isLogsSelected - ? ([ - { - title: t('Logs'), - content: [ - { - type: 'text', - text: t( - 'Once structured logging is enabled, you can send logs using the AddLog method on the Sentry subsystem:' - ), - }, - { - type: 'code', - language: 'cpp', - code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); - -// Send logs at different severity levels -SentrySubsystem->AddLog(TEXT("A simple log message"), ESentryLevel::Info, TEXT("GameFlow")); -SentrySubsystem->AddLog(TEXT("Failed to save game data"), ESentryLevel::Error, TEXT("SaveSystem"));`, - }, - { - type: 'text', - text: tct( - 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. Check out [link:the Logs documentation] to learn more.', - { - code: , - link: ( - - ), - } - ), - }, - ], - }, - ] satisfies OnboardingStep[]) - : []), { title: t('Crash Reporter Client'), content: [ From de5326438a0e63e2fc29388f6897f168c4a4ddc9 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 15:45:54 +0100 Subject: [PATCH 15/30] remove unnecessary link from native logs --- static/app/gettingStartedDocs/native/logs.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/static/app/gettingStartedDocs/native/logs.tsx b/static/app/gettingStartedDocs/native/logs.tsx index 2d2f10cdd7ac29..64c40eb8ffa6dd 100644 --- a/static/app/gettingStartedDocs/native/logs.tsx +++ b/static/app/gettingStartedDocs/native/logs.tsx @@ -1,4 +1,3 @@ -import {ExternalLink} from 'sentry/components/core/link'; import type { DocsParams, OnboardingConfig, @@ -14,11 +13,9 @@ export const logs: OnboardingConfig = { { type: 'text', text: tct( - 'Logs in Native are supported in Sentry Native SDK version [link:0.11.1] and above.', + 'Logs in Native are supported in Sentry Native SDK version [code:0.11.1] and above.', { - link: ( - - ), + code: , } ), }, From 85eb3ccd006e05ed778c19d3ec0050e21856ae17 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:20:35 +0100 Subject: [PATCH 16/30] reduce duplication for Unreal logs --- static/app/gettingStartedDocs/unreal/logs.tsx | 61 +++++++++++-------- .../gettingStartedDocs/unreal/onboarding.tsx | 21 +------ 2 files changed, 37 insertions(+), 45 deletions(-) diff --git a/static/app/gettingStartedDocs/unreal/logs.tsx b/static/app/gettingStartedDocs/unreal/logs.tsx index 6fe429e7411349..1c0269cf22229e 100644 --- a/static/app/gettingStartedDocs/unreal/logs.tsx +++ b/static/app/gettingStartedDocs/unreal/logs.tsx @@ -1,11 +1,43 @@ import {ExternalLink} from 'sentry/components/core/link'; import type { + ContentBlock, DocsParams, OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; +export const logsVerify = (params: DocsParams): ContentBlock => ({ + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: t('Send a test log from your app to verify logs are arriving in Sentry.'), + }, + { + type: 'code', + language: 'cpp', + code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); + +// Send logs at different severity levels +SentrySubsystem->LogInfo(TEXT("Test log message"), TEXT("Test")); +SentrySubsystem->LogWarning(TEXT("Warning message"), TEXT("Test")); +SentrySubsystem->LogError(TEXT("Error message"), TEXT("Test"));`, + }, + { + type: 'text', + text: tct( + 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. Check out [link:the Logs documentation] to learn more.', + { + code: , + link: , + } + ), + }, + ], +}); + export const logs: OnboardingConfig = { install: () => [ { @@ -63,35 +95,10 @@ SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::Create ], }, ], - verify: () => [ + verify: (params: DocsParams) => [ { type: StepType.VERIFY, - content: [ - { - type: 'text', - text: t('Send a test log from your app to verify logs are arriving in Sentry.'), - }, - { - type: 'code', - language: 'cpp', - code: `USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); - -// Send logs at different severity levels -SentrySubsystem->LogInfo(TEXT("Test log message"), TEXT("Test")); -SentrySubsystem->LogWarning(TEXT("Warning message"), TEXT("Test")); -SentrySubsystem->LogError(TEXT("Error message"), TEXT("Test"));`, - }, - { - type: 'text', - text: tct( - 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. For more information, see the [link:logs documentation].', - { - code: , - link: , - } - ), - }, - ], + content: [logsVerify(params)], }, ], }; diff --git a/static/app/gettingStartedDocs/unreal/onboarding.tsx b/static/app/gettingStartedDocs/unreal/onboarding.tsx index ff20a080e69347..41e6aa15f6642c 100644 --- a/static/app/gettingStartedDocs/unreal/onboarding.tsx +++ b/static/app/gettingStartedDocs/unreal/onboarding.tsx @@ -9,6 +9,8 @@ import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {getConsoleExtensions} from 'sentry/components/onboarding/gettingStartedDoc/utils/consoleExtensions'; import {t, tct} from 'sentry/locale'; +import {logsVerify} from './logs'; + const getVerifySnippet = (params: DocsParams) => { const logsCode = params.isLogsSelected ? ` @@ -167,24 +169,7 @@ export const onboarding: OnboardingConfig = { language: 'cpp', code: getVerifySnippet(params), }, - { - type: 'conditional', - condition: params.isLogsSelected, - content: [ - { - type: 'text', - text: tct( - 'You can also automatically capture Unreal Engine [code:UE_LOG] calls. Check out [link:the Logs documentation] to learn more.', - { - code: , - link: ( - - ), - } - ), - }, - ], - }, + logsVerify(params), ], }, { From fa39a8f981402e3ed294cc26c86c4d3ebf1c5af7 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:40:46 +0100 Subject: [PATCH 17/30] logsVerify for native --- static/app/gettingStartedDocs/native/logs.tsx | 62 +++++++++++-------- .../gettingStartedDocs/native/onboarding.tsx | 27 +------- 2 files changed, 37 insertions(+), 52 deletions(-) diff --git a/static/app/gettingStartedDocs/native/logs.tsx b/static/app/gettingStartedDocs/native/logs.tsx index 64c40eb8ffa6dd..0017f8f44d1e5f 100644 --- a/static/app/gettingStartedDocs/native/logs.tsx +++ b/static/app/gettingStartedDocs/native/logs.tsx @@ -1,10 +1,43 @@ +import {ExternalLink} from 'sentry/components/core/link'; import type { + ContentBlock, DocsParams, OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {tct} from 'sentry/locale'; +export const logsVerify = (params: DocsParams): ContentBlock => ({ + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: tct( + 'Once logging is enabled, you can send logs using the [code:sentry_log_X()] APIs:', + { + code: , + } + ), + }, + { + type: 'code', + language: 'c', + code: `sentry_log_info("A simple log message"); +sentry_log_error("A %s log message", "formatted");`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the Logs documentation] to learn more about additional attributes and options.', + { + link: , + } + ), + }, + ], +}); + export const logs: OnboardingConfig = { install: () => [ { @@ -47,35 +80,10 @@ sentry_init(options);`, ], }, ], - verify: () => [ + verify: (params: DocsParams) => [ { type: StepType.VERIFY, - content: [ - { - type: 'text', - text: tct( - 'Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the [code:sentry_log_X()] APIs.', - { - code: , - } - ), - }, - { - type: 'text', - text: tct( - 'The API exposes six methods that you can use to log messages at different log levels: [code:trace], [code:debug], [code:info], [code:warn], [code:error], and [code:fatal].', - { - code: , - } - ), - }, - { - type: 'code', - language: 'c', - code: `sentry_log_info("A simple log message"); -sentry_log_error("A %s log message", "formatted");`, - }, - ], + content: [logsVerify(params)], }, ], }; diff --git a/static/app/gettingStartedDocs/native/onboarding.tsx b/static/app/gettingStartedDocs/native/onboarding.tsx index fbf24d95088ee8..5c17f957322e44 100644 --- a/static/app/gettingStartedDocs/native/onboarding.tsx +++ b/static/app/gettingStartedDocs/native/onboarding.tsx @@ -7,6 +7,7 @@ import type { } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {getConsoleExtensions} from 'sentry/components/onboarding/gettingStartedDoc/utils/consoleExtensions'; +import {logsVerify} from 'sentry/gettingStartedDocs/native/logs'; import {getVerifySnippet} from 'sentry/gettingStartedDocs/native/utils'; import {t, tct} from 'sentry/locale'; @@ -116,31 +117,7 @@ export const onboarding: OnboardingConfig = { ? ([ { title: t('Logs'), - content: [ - { - type: 'text', - text: t( - 'Once logging is enabled, you can send logs using the sentry_log_X() APIs:' - ), - }, - { - type: 'code', - language: 'c', - code: `sentry_log_info("A simple log message"); -sentry_log_error("A %s log message", "formatted");`, - }, - { - type: 'text', - text: tct( - 'Check out [link:the Logs documentation] to learn more about additional attributes and options.', - { - link: ( - - ), - } - ), - }, - ], + content: [logsVerify(params)], }, ] satisfies OnboardingStep[]) : []), From 289c696e9a48e18c6f04df14c2d1ce3ed2676461 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:42:04 +0100 Subject: [PATCH 18/30] verifyLogs for Unity --- static/app/gettingStartedDocs/unity/logs.tsx | 95 +++++++------------ .../gettingStartedDocs/unity/onboarding.tsx | 32 +------ 2 files changed, 38 insertions(+), 89 deletions(-) diff --git a/static/app/gettingStartedDocs/unity/logs.tsx b/static/app/gettingStartedDocs/unity/logs.tsx index 306f53b1aac46e..c57c8596b5324e 100644 --- a/static/app/gettingStartedDocs/unity/logs.tsx +++ b/static/app/gettingStartedDocs/unity/logs.tsx @@ -1,11 +1,44 @@ import {ExternalLink} from 'sentry/components/core/link'; import type { + ContentBlock, DocsParams, OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; +export const logsVerify = (params: DocsParams): ContentBlock => ({ + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: t( + 'Once logging is enabled, you can send logs using the Debug.Log API or directly via the SDK:' + ), + }, + { + type: 'code', + language: 'csharp', + code: `using Sentry; +using UnityEngine; + +// Unity's Debug.Warning (and higher severity levels) will automatically be captured +Debug.Warning("This warning will be sent to Sentry"); + +// Or use the SDK directly +SentrySdk.Logger.LogInfo("A simple log message"); +SentrySdk.Logger.LogError("An error log message");`, + }, + { + type: 'text', + text: tct('Check out [link:the Logs documentation] to learn more.', { + link: , + }), + }, + ], +}); + export const logs: OnboardingConfig = { install: () => [ { @@ -60,68 +93,10 @@ export const logs: OnboardingConfig = { ], }, ], - verify: () => [ + verify: (params: DocsParams) => [ { type: StepType.VERIFY, - content: [ - { - type: 'text', - text: tct( - 'Once the feature is enabled and the SDK is initialized, you can send logs using the [code:SentrySdk.Logger] API:', - { - code: , - } - ), - }, - { - type: 'code', - language: 'csharp', - code: `SentrySdk.Logger.LogInfo("A simple debug log message"); -SentrySdk.Logger.LogError("A {0} log message", "formatted");`, - }, - { - type: 'text', - text: tct( - "You can also use Unity's standard Debug logging. By default, [code:Debug.LogWarning] and above are automatically captured. [code:Debug.Log] calls are not sent unless you set [code:options.CaptureStructuredLogsForLogType[LogType.Log] = true].", - { - code: , - } - ), - }, - { - type: 'code', - language: 'csharp', - code: `// Debug.LogWarning and above are captured by default -Debug.LogWarning("Low memory warning."); -Debug.LogError("Failed to save game data."); - -// Debug.Log requires explicit opt-in via CaptureStructuredLogsForLogType[LogType.Log] = true -Debug.Log("Player position updated.");`, - }, - { - type: 'text', - text: t( - 'You can pass additional attributes directly to the logging functions. These properties will be sent to Sentry, and can be searched from within the Logs UI:' - ), - }, - { - type: 'code', - language: 'csharp', - code: `SentrySdk.Logger.LogWarning(static log => -{ - log.SetAttribute("my.attribute", "value"); -}, "A log message with additional attributes.");`, - }, - { - type: 'text', - text: tct( - 'For more configuration options, see the [link:Unity Logs documentation].', - { - link: , - } - ), - }, - ], + content: [logsVerify(params)], }, ], }; diff --git a/static/app/gettingStartedDocs/unity/onboarding.tsx b/static/app/gettingStartedDocs/unity/onboarding.tsx index 4e520ed1bc72a6..75bb7a5b40c29f 100644 --- a/static/app/gettingStartedDocs/unity/onboarding.tsx +++ b/static/app/gettingStartedDocs/unity/onboarding.tsx @@ -9,6 +9,8 @@ import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {getConsoleExtensions} from 'sentry/components/onboarding/gettingStartedDoc/utils/consoleExtensions'; import {t, tct} from 'sentry/locale'; +import {logsVerify} from './logs'; + const getVerifySnippet = () => ` using Sentry; // On the top of the script @@ -106,35 +108,7 @@ export const onboarding: OnboardingConfig = { ? ([ { title: t('Logs'), - content: [ - { - type: 'text', - text: t( - 'Once logging is enabled, you can send logs using the Debug.Log API or directly via the SDK:' - ), - }, - { - type: 'code', - language: 'csharp', - code: `using Sentry; -using UnityEngine; - -// Unity's Debug.Warning (and higher severity levels) will automatically be captured -Debug.Warning("This warning will be sent to Sentry"); - -// Or use the SDK directly -SentrySdk.Logger.LogInfo("A simple log message"); -SentrySdk.Logger.LogError("An error log message");`, - }, - { - type: 'text', - text: tct('Check out [link:the Logs documentation] to learn more.', { - link: ( - - ), - }), - }, - ], + content: [logsVerify(params)], }, ] satisfies OnboardingStep[]) : []), From 0b0d84849fec7a302a0fee8d30e70ddca6fa03d1 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:42:33 +0100 Subject: [PATCH 19/30] cleanup unreal onboarding --- static/app/gettingStartedDocs/unreal/onboarding.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/static/app/gettingStartedDocs/unreal/onboarding.tsx b/static/app/gettingStartedDocs/unreal/onboarding.tsx index 41e6aa15f6642c..def4fbba0d01e0 100644 --- a/static/app/gettingStartedDocs/unreal/onboarding.tsx +++ b/static/app/gettingStartedDocs/unreal/onboarding.tsx @@ -169,9 +169,16 @@ export const onboarding: OnboardingConfig = { language: 'cpp', code: getVerifySnippet(params), }, - logsVerify(params), ], }, + ...(params.isLogsSelected + ? ([ + { + title: t('Logs'), + content: [logsVerify(params)], + }, + ] satisfies OnboardingStep[]) + : []), { title: t('Crash Reporter Client'), content: [ From 8b6daca7dffe74d4568976df67f55e475e2dd399 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:42:50 +0100 Subject: [PATCH 20/30] logsVerify for php-symfony --- .../gettingStartedDocs/php-symfony/logs.tsx | 68 +++++++++---------- .../php-symfony/onboarding.tsx | 39 +---------- 2 files changed, 36 insertions(+), 71 deletions(-) diff --git a/static/app/gettingStartedDocs/php-symfony/logs.tsx b/static/app/gettingStartedDocs/php-symfony/logs.tsx index 952ac2d0e84f15..fd5c7feb4aed94 100644 --- a/static/app/gettingStartedDocs/php-symfony/logs.tsx +++ b/static/app/gettingStartedDocs/php-symfony/logs.tsx @@ -1,11 +1,43 @@ import {ExternalLink} from 'sentry/components/core/link'; import type { + ContentBlock, DocsParams, OnboardingConfig, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; +export const logsVerify = (params: DocsParams): ContentBlock => ({ + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: t( + 'Once configured, you can send logs using the standard PSR-3 logger interface:' + ), + }, + { + type: 'code', + language: 'php', + code: `$this->logger->info("This is an info message"); +$this->logger->warning('User {id} failed to login.', ['id' => $user->id]); +$this->logger->error("This is an error message");`, + }, + { + type: 'text', + text: tct( + 'Check out [link:the Logs documentation] to learn more about Monolog integration.', + { + link: ( + + ), + } + ), + }, + ], +}); + export const logs: OnboardingConfig = { install: () => [ { @@ -89,42 +121,10 @@ sentry: ], }, ], - verify: () => [ + verify: (params: DocsParams) => [ { type: StepType.VERIFY, - content: [ - { - type: 'text', - text: tct( - 'Once you have configured the Sentry log handler, you can use your regular [code:LoggerInterface]. It will send logs to Sentry:', - { - code: , - } - ), - }, - { - type: 'code', - language: 'php', - code: `$this->logger->info("This is an info message"); -$this->logger->warning('User {id} failed to login.', ['id' => $user->id]); -$this->logger->error("This is an error message");`, - }, - { - type: 'text', - text: t( - 'You can pass additional attributes directly to the logging functions. These properties will be sent to Sentry, and can be searched from within the Logs UI:' - ), - }, - { - type: 'code', - language: 'php', - code: `$this->logger->error('Something went wrong', [ - 'user_id' => $userId, - 'action' => 'update_profile', - 'additional_data' => $data, -]);`, - }, - ], + content: [logsVerify(params)], }, ], }; diff --git a/static/app/gettingStartedDocs/php-symfony/onboarding.tsx b/static/app/gettingStartedDocs/php-symfony/onboarding.tsx index f4c0bc3cfd8603..89272cd77bbdbb 100644 --- a/static/app/gettingStartedDocs/php-symfony/onboarding.tsx +++ b/static/app/gettingStartedDocs/php-symfony/onboarding.tsx @@ -7,6 +7,7 @@ import type { import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; +import {logsVerify} from './logs'; import {getConfigureSnippet, getExcimerInstallSteps} from './utils'; export const onboarding: OnboardingConfig = { @@ -121,43 +122,7 @@ SENTRY_DSN="${params.dsn.public}" ? ([ { title: t('Logs'), - content: [ - { - type: 'text', - text: t( - 'Once configured, you can send logs using the standard PSR-3 logger interface:' - ), - }, - { - type: 'code', - language: 'php', - code: `use Psr\\Log\\LoggerInterface; - -class SomeService -{ - public function __construct( - private LoggerInterface $logger - ) {} - - public function someMethod(): void - { - $this->logger->info('A test log message'); - $this->logger->error('An error log message', ['context' => 'value']); - } -}`, - }, - { - type: 'text', - text: tct( - 'Check out [link:the Logs documentation] to learn more about Monolog integration.', - { - link: ( - - ), - } - ), - }, - ], + content: [logsVerify(params)], }, ] satisfies OnboardingStep[]) : []), From c4e75975397e358735e353cd1826ce44cb6f6872 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:54:40 +0100 Subject: [PATCH 21/30] fix test --- static/app/gettingStartedDocs/dotnet/logs.spec.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/gettingStartedDocs/dotnet/logs.spec.tsx b/static/app/gettingStartedDocs/dotnet/logs.spec.tsx index 5d6d058d57ac72..b7affb019eb177 100644 --- a/static/app/gettingStartedDocs/dotnet/logs.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet/logs.spec.tsx @@ -24,7 +24,7 @@ describe('logs', () => { const configureSteps = result.configure(mockParams); expect(configureSteps).toHaveLength(1); expect(configureSteps[0].type).toBe('configure'); - expect(configureSteps[0].content[1].code).toContain('o.EnableLogs = true;'); + expect(configureSteps[0].content[1].code).toContain('options.EnableLogs = true;'); expect(configureSteps[0].content[1].code).toContain(mockParams.dsn.public); // Test verify step From a251b1f08dbc875232ee38feb8b0a6e168a8ce15 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Wed, 21 Jan 2026 13:22:30 +0100 Subject: [PATCH 22/30] small unity fix --- static/app/gettingStartedDocs/unity/logs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/gettingStartedDocs/unity/logs.tsx b/static/app/gettingStartedDocs/unity/logs.tsx index c57c8596b5324e..6fa163be02fdf1 100644 --- a/static/app/gettingStartedDocs/unity/logs.tsx +++ b/static/app/gettingStartedDocs/unity/logs.tsx @@ -28,7 +28,7 @@ Debug.Warning("This warning will be sent to Sentry"); // Or use the SDK directly SentrySdk.Logger.LogInfo("A simple log message"); -SentrySdk.Logger.LogError("An error log message");`, +SentrySdk.Logger.LogError("A {0} log message", "formatted");`, }, { type: 'text', From 32eadef296801c1947ff25f1b483adb0a5352aa3 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Wed, 21 Jan 2026 13:35:33 +0100 Subject: [PATCH 23/30] add Godot logs --- .../onboarding/productSelection.tsx | 1 + static/app/data/platformCategories.tsx | 1 + static/app/gettingStartedDocs/godot/index.tsx | 2 + static/app/gettingStartedDocs/godot/logs.tsx | 94 +++++++++++++++++++ .../gettingStartedDocs/godot/onboarding.tsx | 42 +++++++-- 5 files changed, 134 insertions(+), 6 deletions(-) create mode 100644 static/app/gettingStartedDocs/godot/logs.tsx diff --git a/static/app/components/onboarding/productSelection.tsx b/static/app/components/onboarding/productSelection.tsx index 5406d7bab01664..f98de41b654672 100644 --- a/static/app/components/onboarding/productSelection.tsx +++ b/static/app/components/onboarding/productSelection.tsx @@ -115,6 +115,7 @@ export const platformProductAvailability = { 'go-http': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], 'go-iris': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], 'go-negroni': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], + godot: [ProductSolution.LOGS], ionic: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.SESSION_REPLAY], java: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], 'java-log4j2': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS], diff --git a/static/app/data/platformCategories.tsx b/static/app/data/platformCategories.tsx index 700f3002af6c70..a27c7fa289abf7 100644 --- a/static/app/data/platformCategories.tsx +++ b/static/app/data/platformCategories.tsx @@ -326,6 +326,7 @@ export const withLoggingOnboarding: Set = new Set([ 'go-iris', 'go-martini', 'go-negroni', + 'godot', 'java', 'java-log4j2', 'java-logback', diff --git a/static/app/gettingStartedDocs/godot/index.tsx b/static/app/gettingStartedDocs/godot/index.tsx index acd1e9e2193af3..cae1711f42e30b 100644 --- a/static/app/gettingStartedDocs/godot/index.tsx +++ b/static/app/gettingStartedDocs/godot/index.tsx @@ -1,8 +1,10 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {logs} from 'sentry/gettingStartedDocs/godot/logs'; import {onboarding} from 'sentry/gettingStartedDocs/godot/onboarding'; const docs: Docs = { onboarding, + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/godot/logs.tsx b/static/app/gettingStartedDocs/godot/logs.tsx new file mode 100644 index 00000000000000..0f1e8cba7f7786 --- /dev/null +++ b/static/app/gettingStartedDocs/godot/logs.tsx @@ -0,0 +1,94 @@ +import {ExternalLink} from 'sentry/components/core/link'; +import type { + ContentBlock, + DocsParams, + OnboardingConfig, +} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {t, tct} from 'sentry/locale'; + +export const logsVerify = (params: DocsParams): ContentBlock => ({ + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: t( + "Once logging is enabled, you can send logs using the SentrySDK.logger API or Godot's built-in logging functions:" + ), + }, + { + type: 'code', + language: 'gdscript', + code: `# Use the logger API directly +SentrySDK.logger.info("Level loaded successfully") +SentrySDK.logger.warn("Item configuration not found") +SentrySDK.logger.error("Failed to save game state") + +# Or use Godot's built-in functions (automatically captured) +print("This info message will be sent to Sentry") +push_warning("This warning will be sent to Sentry") +push_error("This error will be sent to Sentry")`, + }, + { + type: 'text', + text: tct('Check out [link:the Logs documentation] to learn more.', { + link: , + }), + }, + ], +}); + +export const logs: OnboardingConfig = { + install: () => [ + { + type: StepType.INSTALL, + content: [ + { + type: 'text', + text: tct( + 'Logs for Godot Engine are supported in Sentry SDK version [code:1.1.0] and above. Starting with version [code:1.2.0], the feature is generally available and enabled by default.', + { + code: , + } + ), + }, + ], + }, + ], + configure: (params: DocsParams) => [ + { + type: StepType.CONFIGURE, + content: [ + { + type: 'text', + text: t( + 'Structured logs are enabled by default. If you want to modify this setting, navigate to Project Settings in Godot, then go to Sentry > Options and adjust the Enable Logs option as needed.' + ), + }, + { + type: 'text', + text: t( + 'Alternatively, you can configure logging programmatically when initializing the SDK:' + ), + }, + { + type: 'code', + language: 'gdscript', + code: `SentrySDK.init(func(options: SentryOptions) -> void: + options.dsn = "${params.dsn.public}" + + # Logs are enabled by default, but you can disable them if needed + # options.enable_logs = false +)`, + }, + ], + }, + ], + verify: (params: DocsParams) => [ + { + type: StepType.VERIFY, + content: [logsVerify(params)], + }, + ], +}; diff --git a/static/app/gettingStartedDocs/godot/onboarding.tsx b/static/app/gettingStartedDocs/godot/onboarding.tsx index b374a608b8caaf..80f41ea021fc53 100644 --- a/static/app/gettingStartedDocs/godot/onboarding.tsx +++ b/static/app/gettingStartedDocs/godot/onboarding.tsx @@ -3,17 +3,26 @@ import {StoreCrashReportsConfig} from 'sentry/components/onboarding/gettingStart import type { DocsParams, OnboardingConfig, + OnboardingStep, } from 'sentry/components/onboarding/gettingStartedDoc/types'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {t, tct} from 'sentry/locale'; -const getVerifySnippet = () => ` -extends Node +import {logsVerify} from './logs'; + +const getVerifySnippet = (params: DocsParams) => { + const logsCode = params.isLogsSelected + ? ` + # Send a log message + SentrySDK.logger.info("Level loaded successfully")` + : ''; + + return `extends Node func _ready(): SentrySDK.add_breadcrumb(SentryBreadcrumb.create("Just about to welcome the World.")) - SentrySDK.capture_message("Hello, World!") -`; + SentrySDK.capture_message("Hello, World!")${logsCode}`; +}; export const onboarding: OnboardingConfig = { install: () => [ @@ -42,7 +51,7 @@ export const onboarding: OnboardingConfig = { { type: 'text', text: tct( - 'Sentry can be configured in the Project Settings window or [link: programmatically]. To access project settings in Godot Engine, navigate to [code:Project > Project Settings > Sentry] section, and enter the DSN for the [code:Dsn] option.', + 'Sentry can be configured in the Project Settings window or [link:programmatically]. To access project settings in Godot Engine, navigate to [code:Project > Project Settings > Sentry] section, and enter the DSN for the [code:Dsn] option.', { code: , link: ( @@ -56,6 +65,19 @@ export const onboarding: OnboardingConfig = { language: 'url', code: params.dsn.public, }, + { + type: 'conditional', + condition: params.isLogsSelected, + content: [ + { + type: 'text', + text: tct( + 'Structured logs are enabled by default starting from version [code:1.2.0]. You can adjust this in [strong:Project Settings > Sentry > Options > Enable Logs].', + {code: , strong: } + ), + }, + ], + }, ], }, ], @@ -75,7 +97,7 @@ export const onboarding: OnboardingConfig = { { type: 'code', language: 'gdscript', - code: getVerifySnippet(), + code: getVerifySnippet(params), }, { type: 'text', @@ -90,6 +112,14 @@ export const onboarding: OnboardingConfig = { }, ], }, + ...(params.isLogsSelected + ? ([ + { + title: t('Logs'), + content: [logsVerify(params)], + }, + ] satisfies OnboardingStep[]) + : []), { title: t('Further Settings'), content: [ From 7c0b26e234056fff246d3a5837c0196d4a063dd8 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:09:42 +0100 Subject: [PATCH 24/30] fix Unity API --- static/app/gettingStartedDocs/unity/logs.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/gettingStartedDocs/unity/logs.tsx b/static/app/gettingStartedDocs/unity/logs.tsx index 6fa163be02fdf1..5106b448e74fa8 100644 --- a/static/app/gettingStartedDocs/unity/logs.tsx +++ b/static/app/gettingStartedDocs/unity/logs.tsx @@ -23,8 +23,8 @@ export const logsVerify = (params: DocsParams): ContentBlock => ({ code: `using Sentry; using UnityEngine; -// Unity's Debug.Warning (and higher severity levels) will automatically be captured -Debug.Warning("This warning will be sent to Sentry"); +// Unity's Debug.LogWarning (and higher severity levels) will automatically be captured +Debug.LogWarning("This warning will be sent to Sentry"); // Or use the SDK directly SentrySdk.Logger.LogInfo("A simple log message"); From 4d70c3f6fc4cdf9400861fbf5bc583aa90d1b120 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:48:06 +0100 Subject: [PATCH 25/30] update godot logs --- static/app/gettingStartedDocs/godot/logs.tsx | 8 ++++---- static/app/gettingStartedDocs/godot/onboarding.tsx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/static/app/gettingStartedDocs/godot/logs.tsx b/static/app/gettingStartedDocs/godot/logs.tsx index 0f1e8cba7f7786..d4d9d8c8ea3a9d 100644 --- a/static/app/gettingStartedDocs/godot/logs.tsx +++ b/static/app/gettingStartedDocs/godot/logs.tsx @@ -47,7 +47,7 @@ export const logs: OnboardingConfig = { { type: 'text', text: tct( - 'Logs for Godot Engine are supported in Sentry SDK version [code:1.1.0] and above. Starting with version [code:1.2.0], the feature is generally available and enabled by default.', + 'Logs for Godot Engine are supported in Sentry SDK version [code:1.1.0] and above.', { code: , } @@ -63,7 +63,7 @@ export const logs: OnboardingConfig = { { type: 'text', text: t( - 'Structured logs are enabled by default. If you want to modify this setting, navigate to Project Settings in Godot, then go to Sentry > Options and adjust the Enable Logs option as needed.' + 'To enable structured logs, navigate to Project Settings in Godot, then go to Sentry > Options and enable the Enable Logs option.' ), }, { @@ -78,8 +78,8 @@ export const logs: OnboardingConfig = { code: `SentrySDK.init(func(options: SentryOptions) -> void: options.dsn = "${params.dsn.public}" - # Logs are enabled by default, but you can disable them if needed - # options.enable_logs = false + # Enable logs + options.enable_logs = true )`, }, ], diff --git a/static/app/gettingStartedDocs/godot/onboarding.tsx b/static/app/gettingStartedDocs/godot/onboarding.tsx index 80f41ea021fc53..f91f947c8790f0 100644 --- a/static/app/gettingStartedDocs/godot/onboarding.tsx +++ b/static/app/gettingStartedDocs/godot/onboarding.tsx @@ -72,8 +72,8 @@ export const onboarding: OnboardingConfig = { { type: 'text', text: tct( - 'Structured logs are enabled by default starting from version [code:1.2.0]. You can adjust this in [strong:Project Settings > Sentry > Options > Enable Logs].', - {code: , strong: } + 'To enable structured logs, go to [strong:Project Settings > Sentry > Options > Enable Logs].', + {strong: } ), }, ], From b3793e153f37303c0c149d526e23d7c9ab5febc1 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Thu, 22 Jan 2026 10:51:55 +0100 Subject: [PATCH 26/30] bump dotnet version fallback & simplify fallback version in utils.tsx --- .../gettingStartedDocs/dotnet/onboarding.tsx | 4 +-- .../gettingStartedDocs/dotnet/profiling.tsx | 4 +-- .../app/gettingStartedDocs/dotnet/utils.tsx | 26 +++---------------- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/static/app/gettingStartedDocs/dotnet/onboarding.tsx b/static/app/gettingStartedDocs/dotnet/onboarding.tsx index 8b02d23cec8682..3fdbb19979857f 100644 --- a/static/app/gettingStartedDocs/dotnet/onboarding.tsx +++ b/static/app/gettingStartedDocs/dotnet/onboarding.tsx @@ -15,14 +15,14 @@ const getInstallProfilingSnippetPackageManager = (params: DocsParams) => ` Install-Package Sentry.Profiling -Version ${getPackageVersion( params, 'sentry.dotnet.profiling', - '4.3.0' + '6.0.0' )}`; const getInstallProfilingSnippetCoreCli = (params: DocsParams) => ` dotnet add package Sentry.Profiling -v ${getPackageVersion( params, 'sentry.dotnet.profiling', - '4.3.0' + '6.0.0' )}`; enum DotNetPlatform { diff --git a/static/app/gettingStartedDocs/dotnet/profiling.tsx b/static/app/gettingStartedDocs/dotnet/profiling.tsx index 7a2b80e91c4d8c..c98e4a8cb0037f 100644 --- a/static/app/gettingStartedDocs/dotnet/profiling.tsx +++ b/static/app/gettingStartedDocs/dotnet/profiling.tsx @@ -14,14 +14,14 @@ const getInstallProfilingSnippetPackageManager = (params: DocsParams) => ` Install-Package Sentry.Profiling -Version ${getPackageVersion( params, 'sentry.dotnet.profiling', - '4.3.0' + '6.0.0' )}`; const getInstallProfilingSnippetCoreCli = (params: DocsParams) => ` dotnet add package Sentry.Profiling -v ${getPackageVersion( params, 'sentry.dotnet.profiling', - '4.3.0' + '6.0.0' )}`; const getProfilingConfigureSnippet = ( diff --git a/static/app/gettingStartedDocs/dotnet/utils.tsx b/static/app/gettingStartedDocs/dotnet/utils.tsx index 309afd7d8e4bde..1497d79f2265c6 100644 --- a/static/app/gettingStartedDocs/dotnet/utils.tsx +++ b/static/app/gettingStartedDocs/dotnet/utils.tsx @@ -1,26 +1,8 @@ import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion'; -export const getInstallSnippetPackageManager = (params: DocsParams) => { - let version = '3.34.0'; - if (params.isLogsSelected) { - version = '6.0.0'; - } else if (params.isProfilingSelected) { - version = '4.3.0'; - } +export const getInstallSnippetPackageManager = (params: DocsParams) => ` +Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', '6.0.0')}`; - return ` -Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', version)}`; -}; - -export const getInstallSnippetCoreCli = (params: DocsParams) => { - let version = '3.34.0'; - if (params.isLogsSelected) { - version = '6.0.0'; - } else if (params.isProfilingSelected) { - version = '4.3.0'; - } - - return ` -dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', version)}`; -}; +export const getInstallSnippetCoreCli = (params: DocsParams) => ` +dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', '6.0.0')}`; From f2e17b723d0871cabb9fccf5f5791771c19ee2ab Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:28:01 +0100 Subject: [PATCH 27/30] cleanup unnecessary godot logs code snippet --- static/app/gettingStartedDocs/godot/onboarding.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/static/app/gettingStartedDocs/godot/onboarding.tsx b/static/app/gettingStartedDocs/godot/onboarding.tsx index f91f947c8790f0..fc3ec525935c55 100644 --- a/static/app/gettingStartedDocs/godot/onboarding.tsx +++ b/static/app/gettingStartedDocs/godot/onboarding.tsx @@ -10,18 +10,12 @@ import {t, tct} from 'sentry/locale'; import {logsVerify} from './logs'; -const getVerifySnippet = (params: DocsParams) => { - const logsCode = params.isLogsSelected - ? ` - # Send a log message - SentrySDK.logger.info("Level loaded successfully")` - : ''; - +const getVerifySnippet = () => { return `extends Node func _ready(): SentrySDK.add_breadcrumb(SentryBreadcrumb.create("Just about to welcome the World.")) - SentrySDK.capture_message("Hello, World!")${logsCode}`; + SentrySDK.capture_message("Hello, World!")`; }; export const onboarding: OnboardingConfig = { From 7ac8cf63632ce0d7888812233e35e2edd40e4445 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:55:56 +0100 Subject: [PATCH 28/30] update dotnetLogs to logs --- static/app/gettingStartedDocs/dotnet-aspnet/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet-awslambda/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet-maui/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet-winforms/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet-wpf/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet-xamarin/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet/index.tsx | 4 ++-- static/app/gettingStartedDocs/dotnet/logs.tsx | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx b/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx index 7a1808c107bd14..40e9cd5b4d6615 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnet/index.tsx @@ -1,5 +1,5 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import { feedbackOnboardingJsLoader, replayOnboardingJsLoader, @@ -13,7 +13,7 @@ const docs: Docs = { replayOnboardingJsLoader, crashReportOnboarding: crashReport, feedbackOnboardingJsLoader, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx b/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx index 7a1808c107bd14..40e9cd5b4d6615 100644 --- a/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx @@ -1,5 +1,5 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import { feedbackOnboardingJsLoader, replayOnboardingJsLoader, @@ -13,7 +13,7 @@ const docs: Docs = { replayOnboardingJsLoader, crashReportOnboarding: crashReport, feedbackOnboardingJsLoader, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx b/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx index c0b0a998cf224b..8ebb0527b3b6ac 100644 --- a/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-awslambda/index.tsx @@ -1,6 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -9,7 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx b/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx index c0b0a998cf224b..8ebb0527b3b6ac 100644 --- a/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-gcpfunctions/index.tsx @@ -1,6 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -9,7 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-maui/index.tsx b/static/app/gettingStartedDocs/dotnet-maui/index.tsx index c0b0a998cf224b..8ebb0527b3b6ac 100644 --- a/static/app/gettingStartedDocs/dotnet-maui/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-maui/index.tsx @@ -1,6 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -9,7 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-winforms/index.tsx b/static/app/gettingStartedDocs/dotnet-winforms/index.tsx index c0b0a998cf224b..8ebb0527b3b6ac 100644 --- a/static/app/gettingStartedDocs/dotnet-winforms/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-winforms/index.tsx @@ -1,6 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -9,7 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-wpf/index.tsx b/static/app/gettingStartedDocs/dotnet-wpf/index.tsx index c0b0a998cf224b..8ebb0527b3b6ac 100644 --- a/static/app/gettingStartedDocs/dotnet-wpf/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-wpf/index.tsx @@ -1,6 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -9,7 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx b/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx index c0b0a998cf224b..8ebb0527b3b6ac 100644 --- a/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx +++ b/static/app/gettingStartedDocs/dotnet-xamarin/index.tsx @@ -1,6 +1,6 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; +import {logs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {onboarding} from './onboarding'; @@ -9,7 +9,7 @@ const docs: Docs = { onboarding, feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet/index.tsx b/static/app/gettingStartedDocs/dotnet/index.tsx index 93cddb7d29e984..dcf7712ca3498b 100644 --- a/static/app/gettingStartedDocs/dotnet/index.tsx +++ b/static/app/gettingStartedDocs/dotnet/index.tsx @@ -1,8 +1,8 @@ import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; -import {dotnetLogs} from 'sentry/gettingStartedDocs/dotnet/logs'; import {crashReport} from './crashReport'; import {feedback} from './feedback'; +import {logs} from './logs'; import {onboarding} from './onboarding'; import {profiling} from './profiling'; @@ -11,7 +11,7 @@ const docs: Docs = { feedbackOnboardingCrashApi: feedback, crashReportOnboarding: crashReport, profilingOnboarding: profiling, - logsOnboarding: dotnetLogs(), + logsOnboarding: logs, }; export default docs; diff --git a/static/app/gettingStartedDocs/dotnet/logs.tsx b/static/app/gettingStartedDocs/dotnet/logs.tsx index 839adb0c93275a..1d671ebce576aa 100644 --- a/static/app/gettingStartedDocs/dotnet/logs.tsx +++ b/static/app/gettingStartedDocs/dotnet/logs.tsx @@ -28,7 +28,7 @@ SentrySdk.Logger.LogError("A {0} log message", "formatted");`, ], }); -export const dotnetLogs = (): OnboardingConfig => ({ +export const logs: OnboardingConfig = { install: params => [ { type: StepType.INSTALL, @@ -102,4 +102,4 @@ export const dotnetLogs = (): OnboardingConfig => ({ content: [logsVerify(params)], }, ], -}); +}; From 4946d21b403c990c82e5ad25a071082570f423ab Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:56:41 +0100 Subject: [PATCH 29/30] change logs tests to be visual --- .../gettingStartedDocs/dotnet/logs.spec.tsx | 50 ++++++---------- .../gettingStartedDocs/python/logs.spec.tsx | 59 ++++++------------- 2 files changed, 37 insertions(+), 72 deletions(-) diff --git a/static/app/gettingStartedDocs/dotnet/logs.spec.tsx b/static/app/gettingStartedDocs/dotnet/logs.spec.tsx index b7affb019eb177..2fde26c37b0129 100644 --- a/static/app/gettingStartedDocs/dotnet/logs.spec.tsx +++ b/static/app/gettingStartedDocs/dotnet/logs.spec.tsx @@ -1,39 +1,25 @@ -// Only import and test functions that don't have circular dependencies -const {dotnetLogs} = jest.requireActual('sentry/gettingStartedDocs/dotnet/logs'); +import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout'; +import {screen} from 'sentry-test/reactTestingLibrary'; +import {textWithMarkupMatcher} from 'sentry-test/utils'; -describe('logs', () => { - const mockParams = { - dsn: { - public: 'https://test@example.com/123', - }, - sourcePackageRegistries: { - isLoading: false, - }, - }; +import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/types'; - it('generates logs onboarding config with default parameters', () => { - const result = dotnetLogs(); +import docs from '.'; - // Test install step - const installSteps = result.install(mockParams); - expect(installSteps).toHaveLength(1); - expect(installSteps[0].type).toBe('install'); - expect(installSteps[0].content).toHaveLength(2); +describe('dotnet logs onboarding docs', () => { + it('renders logs onboarding docs correctly', async () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], + }); - // Test configure step - const configureSteps = result.configure(mockParams); - expect(configureSteps).toHaveLength(1); - expect(configureSteps[0].type).toBe('configure'); - expect(configureSteps[0].content[1].code).toContain('options.EnableLogs = true;'); - expect(configureSteps[0].content[1].code).toContain(mockParams.dsn.public); + // Verify logs configuration is shown + expect( + await screen.findByText(textWithMarkupMatcher(/options\.EnableLogs/)) + ).toBeInTheDocument(); - // Test verify step - const verifySteps = result.verify({isLogsSelected: true}); - expect(verifySteps).toHaveLength(1); - expect(verifySteps[0].type).toBe('verify'); - expect(verifySteps[0].content).toHaveLength(1); - expect(verifySteps[0].content[0].type).toBe('conditional'); - const conditionalContent = verifySteps[0].content[0].content; - expect(conditionalContent[1].code).toContain('SentrySdk.Logger.LogInfo'); + // Verify logs verification code is shown + expect( + await screen.findByText(textWithMarkupMatcher(/SentrySdk\.Logger\.LogInfo/)) + ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/logs.spec.tsx b/static/app/gettingStartedDocs/python/logs.spec.tsx index ad80efc74ed7f5..883245a9d09460 100644 --- a/static/app/gettingStartedDocs/python/logs.spec.tsx +++ b/static/app/gettingStartedDocs/python/logs.spec.tsx @@ -1,47 +1,26 @@ -// Only import and test functions that don't have circular dependencies -const {logs} = jest.requireActual('sentry/gettingStartedDocs/python/logs'); +import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout'; +import {screen} from 'sentry-test/reactTestingLibrary'; +import {textWithMarkupMatcher} from 'sentry-test/utils'; -describe('logs', () => { - const mockParams = { - dsn: { - public: 'https://test@example.com/123', - }, - }; +import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/types'; - it('generates logs onboarding config with default parameters', () => { - const result = logs(); +import docs from '.'; - // Test install step - const installSteps = result.install(); - expect(installSteps).toHaveLength(1); - expect(installSteps[0].type).toBe('install'); - expect(installSteps[0].content).toHaveLength(2); - - // Test configure step - const configureSteps = result.configure(mockParams); - expect(configureSteps).toHaveLength(1); - expect(configureSteps[0].type).toBe('configure'); - expect(configureSteps[0].content[1].code).toContain('enable_logs=True'); - expect(configureSteps[0].content[1].code).toContain(mockParams.dsn.public); - - // Test verify step - const verifySteps = result.verify({isLogsSelected: true}); - expect(verifySteps).toHaveLength(1); - expect(verifySteps[0].type).toBe('verify'); - expect(verifySteps[0].content).toHaveLength(1); - expect(verifySteps[0].content[0].type).toBe('conditional'); - const conditionalContent = verifySteps[0].content[0].content; - expect(conditionalContent[1].code).toContain('sentry_sdk.logger.info'); - expect(conditionalContent[3].code).toContain('import logging'); - }); - - it('generates logs onboarding config with custom parameters', () => { - const result = logs({ - packageName: 'custom-sentry-sdk', - minimumVersion: '3.0.0', +describe('python logs onboarding docs', () => { + it('renders logs onboarding docs correctly', () => { + renderWithOnboardingLayout(docs, { + selectedProducts: [ProductSolution.LOGS], }); - const installSteps = result.install(); - expect(installSteps[0].content).toHaveLength(2); + // Verify logs configuration is shown + expect( + screen.getByText(textWithMarkupMatcher(/enable_logs=True/)) + ).toBeInTheDocument(); + + // Verify logs verification code is shown + expect( + screen.getByText(textWithMarkupMatcher(/sentry_sdk\.logger\.info/)) + ).toBeInTheDocument(); + expect(screen.getByText(textWithMarkupMatcher(/import logging/))).toBeInTheDocument(); }); }); From 539a83fde4caa58f85e609d22fe185f4e6fb6746 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:05:36 +0100 Subject: [PATCH 30/30] fix godot param --- static/app/gettingStartedDocs/godot/onboarding.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/gettingStartedDocs/godot/onboarding.tsx b/static/app/gettingStartedDocs/godot/onboarding.tsx index fc3ec525935c55..937dfa05726b0e 100644 --- a/static/app/gettingStartedDocs/godot/onboarding.tsx +++ b/static/app/gettingStartedDocs/godot/onboarding.tsx @@ -91,7 +91,7 @@ export const onboarding: OnboardingConfig = { { type: 'code', language: 'gdscript', - code: getVerifySnippet(params), + code: getVerifySnippet(), }, { type: 'text',