From 88d6e9cc4def008dc8196b9844bf2e2df63e7672 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 4 Feb 2026 15:08:37 +1300 Subject: [PATCH 1/4] Documented StringStackTraceFactory in the Troubleshooting docs --- .../platforms/dotnet/common/troubleshooting.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/platforms/dotnet/common/troubleshooting.mdx b/docs/platforms/dotnet/common/troubleshooting.mdx index e033884f178ac..fb3f6cb87af7b 100644 --- a/docs/platforms/dotnet/common/troubleshooting.mdx +++ b/docs/platforms/dotnet/common/troubleshooting.mdx @@ -159,6 +159,23 @@ If you're working with obfuscated code, you have several options: 3. **Contribute to Symbolic**: [Our symbolication library is open source](https://github.com/getsentry/symbolic). You could create a ticket to discuss adding support to it with the maintainers. +## Missing or unhelpful stack traces in AOT compiled apps + +If you're compiling your application AOT (ahead of time), you may see missing or unhelpful stack traces in Sentry. This can happen because the default stack trace extraction used by the SDK (`SentryStackTraceFactory`) relies on runtime metadata that may not be available in the same way in AOT compiled applications. + +One possible workaround is to use the `StringStackTraceFactory` instead of Sentry's default stack trace factory. The `StringStackTraceFactory` parses stack trace information from the string representations of stack traces and aims to produce at least a minimal set of frames when the default stack trace factory can't. + +To enable it, configure Sentry as follows: + +```csharp +SentrySdk.Init(options => { + // ...All the usual setup + options.UseStackTraceFactory(new StringStackTraceFactory(options)); +}); +``` + +This factory is more limited and experimental than the default one. Only enable it if you're not getting useful stack traces with the default configuration. + ## Proxy Server Often, your server can only access the internet through a proxy server. From f6d18b8595a5cfae9260c7292a54e7896abbf868 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Thu, 5 Feb 2026 13:46:57 +1300 Subject: [PATCH 2/4] Update docs/platforms/dotnet/common/troubleshooting.mdx Co-authored-by: Alex Krawiec --- docs/platforms/dotnet/common/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/dotnet/common/troubleshooting.mdx b/docs/platforms/dotnet/common/troubleshooting.mdx index fb3f6cb87af7b..8a509605c2c32 100644 --- a/docs/platforms/dotnet/common/troubleshooting.mdx +++ b/docs/platforms/dotnet/common/troubleshooting.mdx @@ -159,7 +159,7 @@ If you're working with obfuscated code, you have several options: 3. **Contribute to Symbolic**: [Our symbolication library is open source](https://github.com/getsentry/symbolic). You could create a ticket to discuss adding support to it with the maintainers. -## Missing or unhelpful stack traces in AOT compiled apps +## Missing or Unhelpful Stack Traces in AOT Compiled Apps If you're compiling your application AOT (ahead of time), you may see missing or unhelpful stack traces in Sentry. This can happen because the default stack trace extraction used by the SDK (`SentryStackTraceFactory`) relies on runtime metadata that may not be available in the same way in AOT compiled applications. From d246565bf49faeb412191fe500e187063b59313b Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 6 Feb 2026 09:43:09 +1300 Subject: [PATCH 3/4] Update docs/platforms/dotnet/common/troubleshooting.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com> --- docs/platforms/dotnet/common/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/dotnet/common/troubleshooting.mdx b/docs/platforms/dotnet/common/troubleshooting.mdx index 8a509605c2c32..74769c8686de7 100644 --- a/docs/platforms/dotnet/common/troubleshooting.mdx +++ b/docs/platforms/dotnet/common/troubleshooting.mdx @@ -174,7 +174,7 @@ SentrySdk.Init(options => { }); ``` -This factory is more limited and experimental than the default one. Only enable it if you're not getting useful stack traces with the default configuration. +This factory is experimental and more limited than the default one. Only enable it if you're not getting useful stack traces with the default configuration. ## Proxy Server From 14acf2be49432d87489f42ac4e59611bce0cc47d Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 6 Feb 2026 09:53:01 +1300 Subject: [PATCH 4/4] Change stack trace factory to use Sentry namespace Updated the stack trace factory initialization to use the Sentry namespace. --- docs/platforms/dotnet/common/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/dotnet/common/troubleshooting.mdx b/docs/platforms/dotnet/common/troubleshooting.mdx index 74769c8686de7..8e758e4e77f95 100644 --- a/docs/platforms/dotnet/common/troubleshooting.mdx +++ b/docs/platforms/dotnet/common/troubleshooting.mdx @@ -170,7 +170,7 @@ To enable it, configure Sentry as follows: ```csharp SentrySdk.Init(options => { // ...All the usual setup - options.UseStackTraceFactory(new StringStackTraceFactory(options)); + options.UseStackTraceFactory(new Sentry.Extensibility.StringStackTraceFactory(options)); }); ```