Datadog Triggers
#Overview
Triggers allow you to automatically disable a specific rule inside a Wingify Feature Flag when a metric threshold is breached. For example, if errors spike, Datadog can trigger Wingify to turn off the feature flag immediately.
#1. Creating the Trigger URL
To set this up, you need to construct the API URL for the specific rule you want to control.
#URL Format:
https://app.wingify.com/api/v2/accounts/{account_id}/environments/{environment_id_or_key}/features/{feature_id_or_key}/toggle
#How to find these values:
- account_id: Your Wingify Account ID.
- environment_id: The environment key .
- feature_key: The unique key of your feature flag.
#API Reference: For details on this endpoint, see Toggle Feature Flag Status.
You will also need a Authentication header for this which you can get from Access Wingify API
#2. Connecting to Datadog
Once you have your URL, you need to configure it in Datadog.
- Log in to Datadog and go to Integrations.
- Search for Webhooks and click Configure.
- Scroll down to create a New Webhook.
- Name: Give it a name (e.g.,
vwo-kill-feature). - URL: Paste the Trigger URL you constructed in Step 1.
- Payload: Paste this JSON to disable the feature:
{ "isEnabled": false }
- Custom Headers: You must add your Wingify API token here for authentication.
{ "token": "YOUR_VWO_API_TOKEN" }
- Click Save
#3. Setting up the Alert
Finally, link the webhook to a Monitor.
- Navigate to Monitors -> New Monitor in Datadog.
- Choose the metric you want to track (e.g., Error Rate).
- Set your threshold (e.g., above 5%).
- In the Notify your team section, type
@webhookand select the Wingify webhook you just created. - Click Create.
Now, whenever this alert fires, Datadog will hit the trigger and disable the feature flag in Wingify.
To learn more about how to configure a Datadog monitor, see