Skip to content

Commit

Permalink
RUMM-924 CR fix: wording
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Costanza <acgh@users.noreply.github.com>
  • Loading branch information
ncreated and acgh committed Feb 19, 2021
1 parent 325bfb9 commit 78e6a08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/rum_collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ For more details and available options, refer to the code documentation comments

## Data scrubbing

To modify RUM event attributes before it is send to Datadog or to drop particular event entirely, use event mappers API when configuring the SDK:
To modify the attributes of a RUM event before it is sent to Datadog or to drop an event entirely, use the event mappers API when configuring the SDK:
```swift
Datadog.Configuration
.builderUsing(...)
Expand All @@ -300,17 +300,17 @@ Datadog.Configuration
}
.build()
```
Each mapper is a Swift closure with a signature of `(T) -> T?`, where `T` is a concrete RUM event type. This allows changing portions of the event before it gets send, for example to redact sensitive information in RUM Resource's `url` you may implement custom `redacted(_:) -> String` function and use it in `RUMResourceEventMapper`:
Each mapper is a Swift closure with a signature of `(T) -> T?`, where `T` is a concrete RUM event type. This allows changing portions of the event before it gets sent, for example to redact sensitive information in RUM Resource's `url` you may implement a custom `redacted(_:) -> String` function and use it in `RUMResourceEventMapper`:
```swift
.setRUMResourceEventMapper { resourceEvent in
var resourceEvent = resourceEvent
resourceEvent.resource.url = redacted(resourceEvent.resource.url)
return resourceEvent
}
```
Returning `nil` from the mapper will drop the event entirely (it won't be send to Datadog).
Returning `nil` from the mapper will drop the event entirely (it won't be sent to Datadog).

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

| Event Type | Attribute key | Description |
|-------------------|-----------------------------------|-------------------------------------------------|
Expand Down

0 comments on commit 78e6a08

Please sign in to comment.