8000 reordered the tabs to be in alphabetical order from android to react … · DataDog/documentation@d496cee · GitHub
[go: up one dir, main page]

Skip to content

Commit d496cee

Browse files
authored
reordered the tabs to be in alphabetical order from android to react (#28939)
1 parent 33660ec commit d496cee

File tree

1 file changed

+94
-90
lines changed

1 file changed

+94
-90
lines changed

content/en/error_tracking/error_grouping.md

Lines changed: 94 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,6 @@ In Datadog's mobile SDKs, you can add a custom error fingerprint when logging an
105105
a predefined attribute to the log call:
106106

107107
{{< tabs >}}
108-
{{% tab "iOS" %}}
109-
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.
110-
111-
```swift
112-
let errorFingerprint = "my-custom-grouping-material"
113-
logger.error(
114-
"My error message",
115-
error: error,
116-
attributes: [
117-
Logs.Attributes.errorFingerprint: errorFingerprint
118-
]
119-
)
120-
```
121-
{{% /tab %}}
122108

123109
{{% tab "Android" %}}
124110
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.
@@ -145,6 +131,21 @@ logger.error(
145131
```
146132
{{% /tab %}}
147133

134+
{{% tab "iOS" %}}
135+
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.
136+
137+
```swift
138+
let errorFingerprint = "my-custom-grouping-material"
139+
logger.error(
140+
"My error message",
141+
error: error,
142+
attributes: [
143+
Logs.Attributes.errorFingerprint: errorFingerprint
144+
]
145+
)
146+
```
147+
{{% /tab %}}
148+
148149
{{% tab "React Native" %}}
149150
To use custom grouping, you need the Datadog RUM SDK `2.4.2` or higher.
150151
```dart
@@ -163,22 +164,6 @@ DdLogs.error(
163164
Or, you can add or adjust the fingerprint in the log mapper:
164165

165166
{{< tabs >}}
166-
{{% tab "iOS" %}}
167-
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.
168-
169-
```swift
170-
let logsConfiguration = Logs.Configuration(
171-
eventMapper: { log in
172-
var log = log
173-
log.error?.fingerprint = "my-custom-grouping-material"
174-
return log
175-
}
176-
)
177-
Logs.enable(
178-
with: logsConfiguration
179-
)
180-
```
181-
{{% /tab %}}
182167

183168
{{% tab "Android" %}}
184169
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.
@@ -217,6 +202,23 @@ final configuration = DatadogConfiguration(
217202
```
218203
{{% /tab %}}
219204

205+
{{% tab "iOS" %}}
206+
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.
207+
208+
```swift
209+
let logsConfiguration = Logs.Configuration(
210+
eventMapper: { log in
211+
var log = log
212+
log.error?.fingerprint = "my-custom-grouping-material"
213+
return log
214+
}
215+
)
216+
Logs.enable(
217+
with: logsConfiguration
218+
)
219+
```
220+
{{% /tab %}}
221+
220222
{{% tab "React Native" %}}
221223
To use custom grouping, you need the Datadog RUM SDK `2.4.2` or higher.
222224

@@ -236,6 +238,38 @@ configuration.errorEventMapper = event => {
236238
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].
237239

238240
{{< tabs >}}
241+
242+
{{% tab "Android" %}}
243+
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.
244+
245+
To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:
246+
247+
```kotlin
248+
GlobalRumMonitor.get().addError(
249+
"My error message",
250+
RumErrorSource.SOURCE,
251+
exception,
252+
mapOf(
253+
RumAttributes.ERROR_CUSTOM_FINGERPRINT to "my-custom-grouping-fingerprint"
254+
)
255+
)
256+
```
257+
258+
Or, you can use the `errorEventMapper`:
259+
260+
```kotlin
261+
val rumConfiguration = RumConfiguration.Builder("rum-application-id")
262+
.setErrorEventMapper(object : EventMapper<ErrorEvent> {
263+
override fun map(event: ErrorEvent): ErrorEvent {
264+
event.error.fingerprint = "my-custom-grouping-fingerprint"
265+
return event
266+
}
267+
}).build()
268+
RUM.enable(rumConfiguration)
269+
```
270+
271+
{{% /tab %}}
272+
239273
{{% tab "Browser" %}}
240274
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.
241275

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

273-
{{% tab "iOS" %}}
274-
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.
275-
276-
To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:
277-
278-
```swift
279-
RUMMonitor.shared().addError(
280-
message: "My error message",
281-
source: .source,
282-
attributes: [
283-
RUM.Attributes.errorFingerprint: "my-custom-grouping-fingerprint"
284-
]
285-
)
286-
```
287-
288-
Or, you can use the `errorEventMapper`:
289-
290-
```swift
291-
var config = RUM.Configuration(applicationID: "rum-application-id")
292-
config.errorEventMapper = { errorEvent in
293-
var errorEvent = errorEvent
294-
errorEvent.error.fingerprint = "my-custom-grouping-fingerprint"
295-
return errorEvent
296-
}
297-
RUM.enable(with: config)
298-
```
299-
300-
{{% /tab %}}
301-
302-
{{% tab "Android" %}}
303-
To use custom grouping, you need the Datadog Android SDK `2.7.0` or higher.
304-
305-
To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:
306-
307-
```kotlin
308-
GlobalRumMonitor.get().addError(
309-
"My error message",
310-
RumErrorSource.SOURCE,
311-
exception,
312-
mapOf(
313-
RumAttributes.ERROR_CUSTOM_FINGERPRINT to "my-custom-grouping-fingerprint"
314-
)
315-
)
316-
```
317-
318-
Or, you can use the `errorEventMapper`:
319-
320-
```kotlin
321-
val rumConfiguration = RumConfiguration.Builder("rum-application-id")
322-
.setErrorEventMapper(object : EventMapper<ErrorEvent> {
323-
override fun map(event: ErrorEvent): ErrorEvent {
324-
event.error.fingerprint = "my-custom-grouping-fingerprint"
325-
return event
326-
}
327-
}).build()
328-
RUM.enable(rumConfiguration)
329-
```
330-
331-
{{% /tab %}}
332-
333307
{{% tab "Flutter" %}}
334308
To use custom grouping, you need the Datadog Flutter SDK `2.4.0` or higher.
335309

@@ -365,6 +339,36 @@ final configuration = DatadogConfiguration(
365339
```
366340
{{% /tab %}}
367341

342+
{{% tab "iOS" %}}
343+
To use custom grouping, you need the Datadog iOS SDK `2.8.1` or higher.
344+
345+
To add a custom fingerprint when manually reporting errors, you can add a predefined attribute when calling `addError`:
346+
347+
```swift
348+
RUMMonitor.shared().addError(
349+
message: "My error message",
350+
source: .source,
351+
attributes: [
352+
RUM.Attributes.errorFingerprint: "my-custom-grouping-fingerprint"
353+
]
354+
)
355+
```
356+
357+
Or, you can use the `errorEventMapper`:
358+
359+
```swift
360+
var config = RUM.Configuration(applicationID: "rum-application-id")
361+
config.errorEventMapper = { errorEvent in
362+
var errorEvent = errorEvent
363+
errorEvent.error.fingerprint = "my-custom-grouping-fingerprint"
364+
return errorEvent
365+
}
366+
RUM.enable(with: config)
367+
```
368+
369+
{{% /tab %}}
370+
371+
368372
{{% tab "React Native" %}}
369373
To use custom grouping, you need the Datadog RUM SDK `2.4.2` or higher.
370374

0 commit comments

Comments
 (0)
0