Skip to content

Commit

Permalink
Adjust feature flags collection docs (#25823)
Browse files Browse the repository at this point in the history
Co-authored-by: buraizu <[email protected]>
  • Loading branch information
BenoitZugmeyer and buraizu authored Oct 24, 2024
1 parent 3fbd75d commit 961cdf3
Showing 1 changed file with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ By enriching your RUM data with feature flag data, you can be confident that you

Feature flag tracking is available in the RUM Browser SDK. To start, set up [RUM browser monitoring][1]. You need the Browser RUM SDK version >= 4.25.0.

To start collecting feature flag data, initialize the RUM SDK and configure the `enableExperimentalFeatures` initialization parameter with ` ["feature_flags"]`.
<details>
<summary>Before <code>v5.17.0</code></summary>

<details open>
<summary>npm</summary>
If you are using a version previous to 5.17.0, initialize the RUM SDK and configure the `enableExperimentalFeatures` initialization parameter with `["feature_flags"]` to start collecting feature flag data.

{{% collapse-content title="NPM" level="h4" %}}
```javascript
import { datadogRum } from '@datadog/browser-rum';

Expand All @@ -41,12 +42,9 @@ To start collecting feature flag data, initialize the RUM SDK and configure the
...
});
```
{{% /collapse-content %}}

</details>

<details>
<summary>CDN async</summary>

{{% collapse-content title="CDN async" level="h4" %}}
```javascript
window.DD_RUM.onReady(function() {
window.DD_RUM.init({
Expand All @@ -56,11 +54,9 @@ window.DD_RUM.onReady(function() {
})
})
```
</details>

<details>
<summary>CDN sync</summary>
{{% /collapse-content %}}

{{% collapse-content title="CDN sync" level="h4" %}}
```javascript
window.DD_RUM &&
window.DD_RUM.init({
Expand All @@ -69,6 +65,8 @@ window.DD_RUM &&
...
})
```
{{% /collapse-content %}}

</details>
<br/>

Expand Down

0 comments on commit 961cdf3

Please sign in to comment.