8000 DOC 9781 - Reordered the tabs by iadjivon · Pull Request #28939 · DataDog/documentation · GitHub
[go: up one dir, main page]

Skip to content

DOC 9 8000 781 - Reordered the tabs #28939

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

Merged
merged 1 commit into from
Apr 23, 2025
Merged
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
10000
Diff view
184 changes: 94 additions & 90 deletions content/en/error_tracking/error_grouping.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,6 @@ In Datadog's mobile SDKs, you can add a custom error fingerprint when logging an
a predefined attribute to the log call:

{{< tabs >}}
{{% tab "iOS" %}}
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.

```swift
let errorFingerprint = "my-custom-grouping-material"
logger.error(
"My error message",
error: error,
attributes: [
Logs.Attributes.errorFingerprint: errorFingerprint
]
)
```
{{% /tab %}}

{{% tab "Android" %}}
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.
Expand All @@ -141,6 +127,21 @@ logger.error(
```
{{% /tab %}}

{{% tab "iOS" %}}
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.

```swift
let errorFingerprint = "my-custom-grouping-material"
logger.error(
"My error message",
error: error,
attributes: [
Logs.Attributes.errorFingerprint: errorFingerprint
]
)
```
{{% /tab %}}

{{% tab "React Native" %}}
To use custom grouping, you need the Datadog RUM SDK `2.4.2` or higher.
```dart
Expand All @@ -159,22 +160,6 @@ DdLogs.error(
Or, you can add or adjust the fingerprint in the log mapper:

{{< tabs >}}
{{% tab "iOS" %}}
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.

```swift
let logsConfiguration = Logs.Configuration(
eventMapper: { log in
var log = log
log.error?.fingerprint = "my-custom-grouping-material"
return log
}
)
Logs.enable(
with: logsConfiguration
)
```
{{% /tab %}}

{{% tab "Android" %}}
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.
Expand Down Expand Up @@ -213,6 +198,23 @@ final configuration = DatadogConfiguration(
```
{{% /tab %}}

{{% tab "iOS" %}}
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.

```swift
let logsConfiguration = Logs.Configuration(
eventMapper: { log in
var log = log
log.error?.fingerprint = "my-custom-grouping-material"
return log
}
)
Logs.enable(
with: logsConfiguration
)
```
{{% /tab %}}

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

Expand All @@ -232,6 +234,38 @@ configuration.errorEventMapper = event => {
If you aren't already collecting Browser RUM events with Datadog, see the [RUM Browser Monitoring setup documentation][3] or the [RUM Mobile and TV Monitoring setup documentation][4].

{{< tabs >}}

{{% tab "Android" %}}
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.

To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:

```kotlin
GlobalRumMonitor.get().addError(
"My error message",
RumErrorSource.SOURCE,
exception,
mapOf(
RumAttributes.ERROR_CUSTOM_FINGERPRINT to "my-custom-grouping-fingerprint"
)
)
```

Or, you can use the `errorEventMapper`:

```kotlin
val rumConfiguration = RumConfiguration.Builder("rum-application-id")
.setErrorEventMapper(object : EventMapper<ErrorEvent> {
override fun map(event: ErrorEvent): ErrorEvent {
event.error.fingerprint = "my-custom-grouping-fingerprint"
return event
}
}).build()
RUM.enable(rumConfiguration)
```

{{% /tab %}}

{{% tab "Browser" %}}
To use custom grouping, you need the Datadog Browser SDK [v4.42.0 or later][2], a [browser RUM error][1], and an additional string attribute.

Expand Down Expand Up @@ -266,66 +300,6 @@ In both cases, `my-custom-grouping-material` is used to group the Browser RUM er
[2]: https://github.com/DataDog/browser-sdk/releases/tag/v4.42.0
{{% /tab %}}

{{% tab "iOS" %}}
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.

To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:

```swift
RUMMonitor.shared().addError(
message: "My error message",
source: .source,
attributes: [
RUM.Attributes.errorFingerprint: "my-custom-grouping-fingerprint"
]
)
```

Or, you can use the `errorEventMapper`:

```swift
var config = RUM.Configuration(applicationID: "rum-application-id")
config.errorEventMapper = { errorEvent in
var errorEvent = errorEvent
errorEvent.error.fingerprint = "my-custom-grouping-fingerprint"
return errorEvent
}
RUM.enable(with: config)
```

{{% /tab %}}

{{% tab "Android" %}}
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.

To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:

```kotlin
GlobalRumMonitor.get().addError(
"My error message",
RumErrorSource.SOURCE,
exception,
mapOf(
RumAttributes.ERROR_CUSTOM_FINGERPRINT to "my-custom-grouping-fingerprint"
)
)
```

Or, you can use the `errorEventMapper`:

```kotlin
val rumConfiguration = RumConfiguration.Builder("rum-application-id")
.setErrorEventMapper(object : EventMapper<ErrorEvent> {
override fun map(event: ErrorEvent): ErrorEvent {
event.error.fingerprint = "my-custom-grouping-fingerprint"
return event
}
}).build()
RUM.enable(rumConfiguration)
```

{{% /tab %}}

{{% tab "Flutter" %}}
To use custom grouping, you need the Datadog Flutter SDK `2.4.0` or higher.

Expand Down Expand Up @@ -361,6 +335,36 @@ final configuration = DatadogConfiguration(
```
{{% /tab %}}

{{% tab "iOS" %}}
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.

To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:

```swift
RUMMonitor.shared().addError(
message: "My error message",
source: .source,
attributes: [
RUM.Attributes.errorFingerprint: "my-custom-grouping-fingerprint"
]
)
```

Or, you can use the `errorEventMapper`:

```swift
var config = RUM.Configuration(applicationID: "rum-application-id")
config.errorEventMapper = { errorEvent in
var errorEvent = errorEvent
errorEvent.error.fingerprint = "my-custom-grouping-fingerprint"
return errorEvent
}
RUM.enable(with: config)
```

{{% /tab %}}


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

Expand Down
Loading
0