Datadog
Overview
There are four key use-cases to the Datadog integration:
- Config Changes - Streaming changes made in Statsig into Datadog, so you can see what feature was turned on that may have caused a CPU usage spike or some other degradation of performance (most widely-used integration).
- Event Forwarding - Statsig will forward event-count totals to DataDog, purely for the purpose of monitoring your Statsig usage volumes.
- Datadog RUM integration - This allows you to enrich DataDog RUM data with flag/experiment assignment info, allowing customer to correlate product feature changes with their impact on system/performance metrics.
- DataDog triggers - When an alarm goes off in DataDog, it kills a Statsig feature gate.
Connecting to Datadog
- To create a Datadog API key, navigate to Organization Settings > API Keys. If you have the permission to create API keys, click New Key.
- Paste the API key in the text box at the top of the integration dialog, then hit "Confirm".
If the above is out of date, refer to the Datadog documentation on how to setup API Keys
Config Changes
This integration will send Datadog Events of your choice when your project's settings change. For instance, we will send an Event when someone edits a Feature Gate.
These events can be found in the Datadog Events Explorer.
Event Totals Forwarding
This integration will forward the number of Statsig SDK Events reported to Datadog. This is meant for monitoring your project's Statsig usage. This integration also has the option to allow non-production events to be forwarded to Datadog.
Statsig events are mapped to Datadog metrics with listed tags as follows:
-
statsig::gate_exposure -> statsig.check_gate.count
- environment
- name
- value
-
statsig::config_exposure -> statsig.get_config.count
- environment
-
statsig::experiment_exposure -> statsig.get_experiment.count
- environment
- group
- name
-
statsig::layer_exposure -> statsig.get_layer.count
- environment
- name
-
statsig::holdout_exposure -> statsig.get_holdout.count
- environment
- name
- value
Example of check_gate metric
Datadog RUM integration
This integration requires a client-side setup as outlined here in DataDog documentation.