π π πΆ A Launch Darkly webhook handler that records changes as datadog events
Your observability and monitoring strategy should include visibility into notable events in your system in order to understand system triggers. In a continuously deployed system, production testing often happens at runtime via feature flag toggles.
This lambda is triggered on updates to Launch Darkly feature flags and records them as events in Data Dog which makes them available to overlay your system and application metrics.
This is a rustlang application. Go grab yourself a copy of rustup.
This is a rust application deployed using β‘ serverless β‘.
You'll need the following
-
A configured Launch Darkly Webhook
Enable web hook secret signing to verify requests come from Launch Darkly.
To reduce the the number of events you recieve you can be selective of which resources an actions trigger your webhook. Below is a policy that restrictions actions to flags and a subset of target actions.
[
{
"resources": [
"proj/*:env/*:flag/*"
],
"actions": [
"createFlag",
"updateOn",
"updateRules",
"updateTargets",
"updateOffVariation",
"updateFlagVariations",
"deleteFlag",
"updateName"
],
"effect": "allow"
}
]
Deployments expect an DD_API_KEY
and LD_SECRET
environment variable.
In Datadog's event stream you can search for sources:launch-darkly
. The following metric tags
are extracted from LaunchDarkly events
Tag | Description |
---|---|
kind |
The kind of target entity Launch Darkly was triggered for, currently only "flag" |
name |
The name of the flag |
action |
Action that triggered the change |