Skip to content

Commit

Permalink
feat(.NET): Added obfuscation to troubleshooting (#12272)
Browse files Browse the repository at this point in the history
* added obfuscation to troubleshooting

* Update docs/platforms/dotnet/common/troubleshooting.mdx

Co-authored-by: Bruno Garcia <[email protected]>

* Update docs/platforms/dotnet/common/troubleshooting.mdx

Co-authored-by: Bruno Garcia <[email protected]>

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <[email protected]>

* Update docs/platforms/dotnet/common/troubleshooting.mdx

---------

Co-authored-by: Bruno Garcia <[email protected]>
Co-authored-by: Alex Krawiec <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent c06acb9 commit c1ed04b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/platforms/dotnet/common/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,19 @@ Additionally, if you were using an async main, associated transactions might not
These issues have been fully resolved as of version 3.31.0 of the Sentry .NET SDK. To safely use an async main, update your version to the newest release.
It's no longer required to dispose of the result of calling `SentrySdk.Init`.

## Obfuscated Code and Stack Traces


It's important to define what obfuscation means. If you're getting illegible stack traces because of missing [debug files](/platforms/dotnet/data-management/debug-files/), all you need to do is enabling debug file upload, which is done automatically by the [Sentry SDK via MSBuild](/platforms/dotnet/guides/aspnet/configuration/msbuild/).

Some custom tools obfuscate .NET Intermediate Language (IL) in order to make apps harder to reverse-engineer; Sentry does not currently support these tools. This is because each obfuscator uses its own custom logic when dealing with deobfuscation, making it impractical to implement universal support.

If you're working with obfuscated code, you have several options:

1. **Use a proxy service**: You can route exceptions through your own web service proxy where you can deobfuscate the stack traces before sending them to Sentry. This gives you full control over the deobfuscation process.

2. **Preserve method names**: Many obfuscation tools allow you to disable method name obfuscation while still obfuscating the code inside methods. This approach results in more readable stack traces while maintaining code protection. Configure your obfuscator to preserve method names if this balance of readability and security meets your needs.

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.

<PlatformContent includePath="troubleshooting" />

0 comments on commit c1ed04b

Please sign in to comment.