Skip to content

Commit

Permalink
Extract scope synchronization from configure scope include
Browse files Browse the repository at this point in the history
The android specific scope synchronization block was right after
the code block that demonstrated setting a user, and before the
code block that unsets a user. This made reading the documentation
confusing, so I extracted a new included page and added a new
platform section that only supports android to hold it.
  • Loading branch information
designedbyz committed Feb 19, 2022
1 parent 5e5279b commit 44654b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/includes/enriching-events/scopes/configure-scope/android.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
<PlatformContent includePath="enriching-events/scopes/configure-scope/java.mdx" />

### Scope Synchronization

If you want to set context data in the Java layer, then receive that context data when a native (C/C++) crash happens, you need to synchronize the Java `Scope` with the native `Scope`. This feature was introduced in version `3.0.0` of the Android SDK and requires an opt-in:

```xml {filename:AndroidManifest.xml}
<application>
<meta-data android:name="io.sentry.ndk.scope-sync.enable" android:value="true" />
</application>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Scope Synchronization

If you want to set context data in the Java layer, then receive that context data when a native (C/C++) crash happens, you need to synchronize the Java `Scope` with the native `Scope`. This feature was introduced in version `3.0.0` of the Android SDK and requires an opt-in:

```xml {filename:AndroidManifest.xml}
<application>
<meta-data android:name="io.sentry.ndk.scope-sync.enable" android:value="true" />
</application>
```
6 changes: 6 additions & 0 deletions src/platforms/common/enriching-events/scopes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ You can also apply this configuration when unsetting a user at logout:

<PlatformContent includePath="enriching-events/unset-user" />

<PlatformSection supported={["android"]}>

<PlatformContent includePath="enriching-events/scopes/scope-synchronization" />

</PlatformSection>

To learn what useful information can be associated with scopes see
[the context documentation](../context/).

Expand Down

0 comments on commit 44654b2

Please sign in to comment.