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-9781- added the react native content #28589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all 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
50 changes: 50 additions & 0 deletions content/en/error_tracking/error_grouping.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ logger.error(
);
```
{{% /tab %}}

{{% tab "React Native" %}}
To use custom grouping, you need the Datadog RUM SDK `2.4.2` or higher.
```dart
DdLogs.error(
'message',
'my-error-type',
'my-error-message',
'my-stack-trace',
{ my: 'context' },
'my-custom-fingerprint'
);
```
{{% /tab %}}
{{< /tabs >}}

Or, you can add or adjust the fingerprint in the log mapper:
Expand Down Expand Up @@ -198,6 +212,18 @@ final configuration = DatadogConfiguration(
);
```
{{% /tab %}}

{{% tab "React Native" %}}
To use custom grouping, you need the Datadog RUM SDK `2.4.2` or higher.

```dart
configuration.errorEventMapper = event => {
event.fingerprint = 'my-custom-fingerprint'
return event;
};
```
{{% /tab %}}

{{< /tabs >}}

### RUM
Expand Down Expand Up @@ -333,6 +359,30 @@ final configuration = DatadogConfiguration(
rumConfiguration: rumConfiguration,
);
```
{{% /tab %}}

{{% tab "React Native" %}}
To use custom grouping, you need the Datadog RUM SDK `2.4.2` or higher.

```dart
DdRum.addError(
'message',
'my-source',
'my-stack-trace',
{ my: 'context' },
Date.now(),
'my-custom-fingerprint'
);
```
Or, you can use the `errorEventMapper`:

```dart
configuration.errorEventMapper = event => {
event.fingerprint = 'my-custom-fingerprint'
return event;
};
```

{{% /tab %}}
{{< /tabs >}}

Expand Down
Loading