Skip to content

Commit

Permalink
RUMM-924 Add notes on recent changes made in #415 and #418
Browse files Browse the repository at this point in the history
  • Loading branch information
ncreated committed Feb 19, 2021
1 parent 454adc5 commit 1d65b6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/rum_collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,14 @@ Each mapper is a Swift closure with a signature of `(T) -> T?`, where `T` is a c
return resourceEvent
}
```
Returning `nil` from the mapper will drop the event entirely (it won't be sent to Datadog).
Returning `nil` from the error, resource or action mapper will drop the event entirely (it won't be sent to Datadog). The value returned from the view event mapper must be not `nil`.

Depending on a given event's type, only some specific properties can be mutated:

| Event Type | Attribute key | Description |
|-------------------|-----------------------------------|-------------------------------------------------|
| RUMViewEvent | `viewEvent.view.url` | URL of the view |
| RUMViewEvent | `viewEvent.view.name` | Name of the view |
| | `viewEvent.view.url` | URL of the view |
| RUMActionEvent | `actionEvent.action.target?.name` | Name of the action |
| | `actionEvent.view.url` | URL of the view linked to this action |
| RUMErrorEvent | `errorEvent.error.message` | Error message |
Expand Down

0 comments on commit 1d65b6d

Please sign in to comment.