Skip to content

Commit

Permalink
[RUMF-1020] add doc for intakeApiVersion and `useAlternateIntakeDom…
Browse files Browse the repository at this point in the history
…ains`
  • Loading branch information
BenoitZugmeyer committed Sep 14, 2021
1 parent 2804754 commit dedd318
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
23 changes: 13 additions & 10 deletions packages/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,18 @@ window.DD_LOGS.init({

The following parameters are available to configure the Datadog browser logs SDK to send logs to Datadog:

| Parameter | Type | Required | Default | Description |
| --------------------- | ------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------- |
| `clientToken` | String | Yes | | A [Datadog client token][2]. |
| `site` | String | Yes | `datadoghq.com` | The Datadog site of your organization. US: `datadoghq.com`, EU: `datadoghq.eu` |
| `service` | String | No | | The service name for your application. |
| `env` | String | No | | The application’s environment, for example: prod, pre-prod, staging, etc. |
| `version` | String | No | | The application’s version, for example: 1.2.3, 6c44da20, 2020.02.13, etc. |
| `forwardErrorsToLogs` | Boolean | No | `true` | Set to `false` to stop forwarding console.error logs, uncaught exceptions and network errors to Datadog. |
| `sampleRate` | Number | No | `100` | The percentage of sessions to track: `100` for all, `0` for none. Only tracked sessions send logs. |
| `silentMultipleInit` | Boolean | No | | Prevent logging errors while having multiple init. |
| Parameter | Type | Required | Default | Description |
| --------------------------- | ------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------- |
| `clientToken` | String | Yes | | A [Datadog client token][2]. |
| `site` | String | Yes | `datadoghq.com` | The Datadog site of your organization. US: `datadoghq.com`, EU: `datadoghq.eu` |
| `service` | String | No | | The service name for your application. |
| `env` | String | No | | The application’s environment, for example: prod, pre-prod, staging, etc. |
| `version` | String | No | | The application’s version, for example: 1.2.3, 6c44da20, 2020.02.13, etc. |
| `forwardErrorsToLogs` | Boolean | No | `true` | Set to `false` to stop forwarding console.error logs, uncaught exceptions and network errors to Datadog. |
| `sampleRate` | Number | No | `100` | The percentage of sessions to track: `100` for all, `0` for none. Only tracked sessions send logs. |
| `silentMultipleInit` | Boolean | No | | Prevent logging errors while having multiple init. |
| `useAlternateIntakeDomains` | Boolean | No | `false` | Use the new intake domains for sending Logs data. Make sure to update [CSP][6] headers before enabling. |
| `intakeApiVersion` | Number | No | `1` | Set to `2` to use the new intake API for sending Logs data. |

Options that must have a matching configuration when using the `RUM` SDK:

Expand Down Expand Up @@ -652,3 +654,4 @@ window.DD_LOGS && DD_LOGS.logger.setHandler(['<HANDLER1>', '<HANDLER2>'])
[3]: https://www.npmjs.com/package/@datadog/browser-logs
[4]: https://github.com/DataDog/browser-sdk/blob/main/packages/logs/BROWSER_SUPPORT.md
[5]: /real_user_monitoring/guide/enrich-and-control-rum-data/
[6]: /real_user_monitoring/faq/content_security_policy/
11 changes: 11 additions & 0 deletions packages/rum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ Use a secure session cookie. This disables RUM events sent on insecure (non-HTTP
**Default**:`false`<br/>
Use a secure cross-site session cookie. This allows the RUM SDK to run when the site is loaded from another one (iframe). Implies `useSecureSessionCookie`.

`useAlternateIntakeDomains`
: Optional<br/>
**Default**:`false`<br/>
Use the new intake domains for sending RUM and Session Replay data. Make sure to update [CSP][11] headers before enabling.

`intakeApiVersion`
: Optional<br/>
**Default**:`1`<br/>
Set to `2` to use the new intake API for sending RUM and Session Replay data.

#### Example

Init must be called to start the tracking:
Expand Down Expand Up @@ -251,3 +261,4 @@ init(configuration: {
[8]: https://github.com/DataDog/browser-sdk/blob/main/packages/rum/BROWSER_SUPPORT.md
[9]: https://docs.datadoghq.com/real_user_monitoring/browser/tracking_user_actions#declaring-a-name-for-click-actions
[10]: https://docs.datadoghq.com/real_user_monitoring/browser/modifying_data_and_context/?tab=npm#override-default-rum-view-names
[11]: https://docs.datadoghq.com/real_user_monitoring/faq/content_security_policy/

0 comments on commit dedd318

Please sign in to comment.