Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS-8873] Guide about deobfuscating stack traces in RUM #25351

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions content/en/error_tracking/frontend/browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Error Tracking can use this information to correlate errors with your source cod

For more information, see the [Datadog Source Code Integration][14].

## List uploaded source maps

See the [RUM Debug Symbols][15] page to view all uploaded symbols.

### Limitations

{{< site-region region="us,us3,us5,eu,gov" >}}
Expand Down Expand Up @@ -69,3 +73,4 @@ You can monitor unhandled exceptions, unhandled promise rejections, handled exce
[12]: https://about.gitlab.com
[13]: https://bitbucket.org/product
[14]: /integrations/guide/source-code-integration/
[15]: https://app.datadoghq.com/source-code/setup/rum
6 changes: 6 additions & 0 deletions content/en/real_user_monitoring/browser/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ On Chromium-based browsers, when the RUM Browser SDK sends data to the Datadog i

The warning is shown because the intake returns a non-empty JSON object. This behavior is a reported [Chromium issue][8]. It does not impact the RUM Browser SDK and can safely be ignored.

## "Deobfuscation failed" warning

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page][14] to view all your uploaded source maps. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols][15].

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}
Expand All @@ -147,3 +151,5 @@ The warning is shown because the intake returns a non-empty JSON object. This be
[11]: /real_user_monitoring/browser/advanced_configuration/?tab=npm#user-session
[12]: /real_user_monitoring/guide/setup-feature-flag-data-collection/?tab=browser
[13]: /real_user_monitoring/browser/setup/#initialization-parameters
[14]: https://app.datadoghq.com/source-code/setup/rum
[15]: /real_user_monitoring/guide/debug-symbols
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ Depending on the [Android Gradle plugin][1] version, the matching of stack trace
{{% /tab %}}
{{< /tabs >}}

#### List uploaded mapping files

See the [RUM Debug Symbols][11] page to view all uploaded symbols.

### Plugin Configuration Options

There are several plugin properties that can be configured through the plugin extension. In case you are using multiple variants, you can set a property value for a specific flavor in the variant.
Expand Down Expand Up @@ -282,3 +286,4 @@ To test your implementation:
[8]: https://developer.android.com/tools/releases/platforms#11
[9]: https://developer.android.com/tools/releases/platforms#10
[10]: /real_user_monitoring/mobile_and_tv_monitoring/setup/android/#track-background-events
[11]: https://app.datadoghq.com/source-code/setup/rum
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ If you are using EAS to build your Expo application, set `cli.requireCommit` to
}
}
```
### List uploaded source maps

See the [RUM Debug Symbols][4] page to view all uploaded symbols.

## Limitations

Expand Down Expand Up @@ -178,3 +181,4 @@ If you are using the `expo-dev-client` and already have the `expo-datadog` plugi
[1]: https://app.datadoghq.com/rum/error-tracking
[2]: https://github.com/DataDog/expo-datadog
[3]: /real_user_monitoring/mobile_and_tv_monitoring/setup/expo/#usage
[4]: https://app.datadoghq.com/source-code/setup/rum
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ datadog-ci flutter-symbols upload --service-name <your_service_name> --dart-symb

For a full list of options, see the `datadog-ci` [Flutter Symbols documentation][5].

### List uploaded symbol files

See the [RUM Debug Symbols][10] page to view all uploaded symbols.

## Limitations

{{< site-region region="us,us3,us5,eu,gov" >}}
Expand Down Expand Up @@ -163,3 +167,4 @@ datadog-ci flutter-symbols upload --service-name <your_service_name> --dart-symb
[7]: https://docs.flutter.dev/deployment/flavors
[8]: https://pub.dev/documentation/datadog_flutter_plugin/latest/datadog_flutter_plugin/DatadogConfiguration/flavor.html
[9]: https://pub.dev/documentation/datadog_flutter_plugin/latest/datadog_flutter_plugin/DatadogConfiguration/version.html
[10]: https://app.datadoghq.com/source-code/setup/rum
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ Mapping files are used to deobfuscate stack traces, which helps in debugging err

For iOS applications, the matching of stack traces and symbol files relies on their `uuid` field.

### List uploaded .dSYMs

See the [RUM Debug Symbols][20] page to view all uploaded symbols.

### Symbolicate crash reports

Crash reports are collected in a raw format and mostly contain memory addresses. To map these addresses into legible symbol information, Datadog requires .`dSYM` files, which are generated in your application's build or distribution process.
Expand Down Expand Up @@ -491,3 +495,4 @@ To verify your iOS Crash Reporting and Error Tracking configuration, issue a cra
[17]: /real_user_monitoring/explorer/search/#facets
[18]: /dashboards/widgets/timeseries
[19]: /real_user_monitoring/error_tracking/mobile/ios/?tab=cocoapods#add-crash-reporting
[20]: https://app.datadoghq.com/source-code/setup/rum
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ Use the `DATADOG_RELEASE_VERSION` environment variable to specify a different re

When the SDK is initialized with a version suffix, you must manually override the release version in order for the source map and build versions to match.

### List uploaded source maps

See the [RUM Debug Symbols][16] page to view all uploaded symbols.

## Limitations

{{< site-region region="us,us3,us5,eu,gov" >}}
Expand Down Expand Up @@ -482,3 +486,4 @@ Inside the loop, add the following snippet:
[13]: https://github.com/DataDog/datadog-react-native-wizard
[14]: https://github.com/DataDog/react-native-performance-limiter
[15]: https://plugins.gradle.org/plugin/com.datadoghq.dd-sdk-android-gradle-plugin
[16]: https://app.datadoghq.com/source-code/setup/rum
1 change: 1 addition & 0 deletions content/en/real_user_monitoring/guide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ cascade:
{{< nextlink href="/real_user_monitoring/guide/getting-started-feature-flags" >}}Getting started with Feature Flag Tracking{{< /nextlink >}}
{{< nextlink href="/real_user_monitoring/guide/monitor-kiosk-sessions-using-rum" >}}Monitor kiosk sessions using RUM{{< /nextlink >}}
{{< nextlink href="real_user_monitoring/guide/best-practices-for-rum-sampling" >}}Best practices for RUM sampling{{< /nextlink >}}
{{< nextlink href="real_user_monitoring/guide/debug-symbols" >}}Investigate obfuscated stack traces with RUM debug symbols{{< /nextlink >}}
{{< /whatsnext >}}

{{< whatsnext desc="Browser RUM:" >}}
Expand Down
42 changes: 42 additions & 0 deletions content/en/real_user_monitoring/guide/debug-symbols.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Investigate Obfuscated Stack Traces with RUM Debug Symbols
---

The [RUM Debug Symbols page][1] lists all the debug symbols that are uploaded for a given type of RUM application. You can use this page to investigate obfuscated stack traces.

The following error message appears when a stack trace is not properly deobfuscated in RUM or Error Tracking: _The stack trace could not be deobfuscated because no debug symbols could be found for this application. If you are not obfuscating your application, ignore this message. Otherwise, upload your debug symbols to see deobfuscated stack traces. You can view all your uploaded symbols on the RUM Debug Symbols page._

{{< img src="real_user_monitoring/guide/debug-symbols/deobfuscation-failed-message.png" alt="Deobfuscation failed: The stack trace could not be deobfuscated because no mapping files could be found for this application. If you are not obfuscating your application, ignore this message. Otherwise, upload your mapping files to see deobfuscated stack traces. You can view all your uploaded files on the RUM Debug Symbols page." >}}

This can occur for a number of reasons:

### The stack trace was not obfuscated

Datadog tries to deobfuscate all stack traces, including stack traces that are not obfuscated (for example, from running local tests or for non-production builds).

You can ignore this warning. The stack trace is already readable.

### No debug symbols uploaded for this version

Use the [RUM Debug Symbols page][1] to see if there are debug symbols for your application. This page is filtered by **type** (JavaScript, Android, iOS, React Native, Flutter). Use the filter to find the debug symbols you are looking for.

If there are no debug symbols for your application, [upload them][2].

### Debug symbol tags do not match

Datadog relies on different tags to match debug symbols with stack traces. These tags vary for each type of application:

| Application type | Tag combination used for matching |
| ---- | ---- |
| JavaScript | `service`, `version`, `path`|
| Android | v1.13.0: `build_id`<br/> Older versions: `service`, `version`, `variant`|
| iOS | `uuid` |
| React Native | `service`, `version`, `bundle_name`, `platform`; if multiple source maps match on these fields, the one with the highest `build_number` is selected |
| Flutter | `service`, `version`, `variant`, `architecture` |

The [RUM Debug Symbols page][1] displays the values of these tags. If you find a mismatch, [upload the debug symbols][2] again with a corrected set of tags.



[1]: https://app.datadoghq.com/source-code/setup/rum
[2]: /real_user_monitoring/error_tracking/mobile/android/?tab=us#upload-your-mapping-file
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ Datadog.setVerbosity(Log.INFO)

If you've been using the SDK v1, there are some breaking changes introduced in version `2.0.0`. See the [migration guide][2] for more information.

## "Deobfuscation failed" warning

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page][3] to view all your uploaded mapping files. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols][4].

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: /help
[2]: https://github.com/DataDog/dd-sdk-android/blob/develop/MIGRATION.MD
[3]: https://app.datadoghq.com/source-code/setup/rum
[4]: /real_user_monitoring/guide/debug-symbols
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ If you are still having issues, check that your `firstPartyHosts` property is se
✅ Good - 'example.com', 'api.example.com', 'us1.api.sample.com'
❌ Bad - 'https://example.com', '*.example.com', 'us1.sample.com/api/*', 'api.sample.com/api'

## "Deobfuscation failed" warning

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page][6] to view all your uploaded symbol files, dSYMs, and mapping files. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols][7].

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}
Expand All @@ -108,3 +112,5 @@ If you are still having issues, check that your `firstPartyHosts` property is se
[3]: https://pub.dev/packages/datadog_tracking_http_client
[4]: https://pub.dev/packages/http
[5]: https://pub.dev/packages/dio
[6]: https://app.datadoghq.com/source-code/setup/rum
[7]: /real_user_monitoring/guide/debug-symbols
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ private class YourCustomDelegateURLSessionDelegate: NSObject, URLSessionTaskDele
* implement `URLSessionDataDelegate` and forward:
* [`urlSession(_:dataTask:didReceive:)`][6]

## "Deobfuscation failed" warning

A warning appears when symbolication fails for a stack trace. If the stack trace is not symbolicated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page][7] to view all your uploaded dSYMs. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols][8].
Copy link
Contributor

Choose a reason for hiding this comment

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

Just confirming that we are intentionally using symbolication instead of deobfuscation here, feel free to disregard the comment if we are!

Suggested change
A warning appears when symbolication fails for a stack trace. If the stack trace is not symbolicated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page][7] to view all your uploaded dSYMs. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols][8].
A warning appears when deobfuscation fails for a stack trace. If the stack trace is not deobfuscation to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page][7] to view all your uploaded dSYMs. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols][8].

Copy link
Contributor

@rtrieu rtrieu Oct 1, 2024

Choose a reason for hiding this comment

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

They mean the same thing, but "deobfuscation" term is more closely associated with Android, while "symbolication" is with iOS. Will refine the suggestion here.

rtrieu marked this conversation as resolved.
Show resolved Hide resolved

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}
Expand All @@ -94,3 +98,5 @@ private class YourCustomDelegateURLSessionDelegate: NSObject, URLSessionTaskDele
[4]: https://developer.apple.com/documentation/foundation/urlsessiontaskdelegate/1643148-urlsession
[5]: https://developer.apple.com/documentation/foundation/urlsessiontaskdelegate/1411610-urlsession
[6]: https://developer.apple.com/documentation/foundation/urlsessiondatadelegate/1411528-urlsession
[7]: https://app.datadoghq.com/source-code/setup/rum
[8]: /real_user_monitoring/guide/debug-symbols
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ dependencies {
}
```

## "Deobfuscation failed" warning

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page][6] to view all your uploaded source maps, dSYMs, and mapping files. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols][7].

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}
Expand All @@ -288,3 +292,5 @@ dependencies {
[3]: https://github.com/JakeWharton/pidcat/issues/180#issuecomment-1124019329
[4]: https://github.com/facebook/react-native/commit/6e08f84719c47985e80123c72686d7a1c89b72ed
[5]: https://github.com/facebook/react-native/issues/28801
[6]: https://app.datadoghq.com/source-code/setup/rum
[7]: /real_user_monitoring/guide/debug-symbols
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading