For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Get started
    • Overview
    • Onboarding
    • Get started
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • AgentControl
    • AgentControl
    • Manage AgentControl
  • Feature flags
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
    • Contexts
    • Segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
      • Approvals
      • Flag triggers
        • Creating flag triggers
        • Managing flag triggers
      • Required comments
      • Required confirmation
      • Scheduled flag changes
      • Workflows
    • Applications and app versions
    • Change history
    • Restoring previous flag versions
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • Observability metrics
    • Product analytics events
    • LLM observability
    • Alerts
    • Dashboards
    • Service map
    • Vega for auto-remediation
    • Observability MCP server
    • Search specification
    • Observability settings
    • Observability integrations
  • Experimentation
    • Experimentation
    • Experiment metric types
    • Experiment configuration
    • Managing experiments
    • Analyzing experiments
    • Multi-armed bandits
    • Holdouts
  • Metrics and events
    • Metrics in LaunchDarkly
    • Creating metrics
    • Metric groups
    • Events
    • Autogenerated metrics
  • Warehouse native
    • Warehouse native metrics
    • Setting up external warehouses
    • Creating experiments using warehouse native metrics
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Feature previews
    • Billing and usage
    • Changelog
Sign inTry it free
LogoLogo
On this page
  • Overview
  • About flag triggers
  • Flag trigger security
  • Integrations that use flag triggers
ReleasesRelease management tools

Flag triggers

Was this page helpful?
Previous

Creating flag triggers

Next
Built with
Flag triggers are available to customers on select plans

Flag triggers are only available to customers on select plans. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Overview

This topic explains how to use LaunchDarkly’s flag triggers feature, which lets you make changes to flag targeting remotely from a third-party application, like an APM tool. You can use triggers to turn flag targeting on or off.

You can also use the REST API: Flag triggers

About flag triggers

A trigger lets you initiate flag changes remotely using a unique webhook URL. Triggers integrate with your existing tools to let you enable or disable flags when you hit specific operational health thresholds or receive certain alerts. A flag can have multiple triggers attached to multiple tools or alerts.

Triggers work by creating unique URLs to connect feature flags to third-party tools. When the third-party tool generates a specific alert, the trigger sets the flag’s targeting to On or Off.

Each URL controls one action, and the URLs are distinct from each other. Subsequent requests to the flag’s On URL will not change the flag’s state after the initial contact turns the flag On.

Triggers are environment-specific

Triggers are unique to each flag within a given environment. This means that you can add multiple tools and multiple triggers to every flag, but if you wish to use the same trigger in multiple environments, you must create a new trigger for each flag in each environment as flags do not share URLs across environments.

Flag triggers are rate limited to prevent a flag turning on and off indefinitely if the triggering metric changes frequently.

To learn how to create and manage flag triggers, read Creating flag triggers and Managing flag triggers.

Flag trigger security

Although flag triggers use public URLs, they’re still a very secure way to initiate changes to your feature flags. Here’s why:

  • Triggers use unguessable URLs, and
  • Only some people in your LaunchDarkly project can create or modify triggers.

An unguessable URL is functionally similar to an access token in that it does not require an active connection between LaunchDarkly and other services to work. To learn more about unguessable URLs, read Google’s Unguessable URLs.

When you create a new trigger, its URL only displays once and prompts you to copy it locally. After the initial display, URLs are obscured so future viewers of the flag cannot view them.

If you lose a trigger’s URL, you can reset it from the trigger’s overflow menu. To learn more, read Managing flag triggers.

Additionally, not all LaunchDarkly account members can interact with triggers. To modify existing triggers or create new ones, account members must have the LaunchDarkly Project Admin or Maintainer project role, or the Writer, Admin, or Owner base role, or another role with the createTriggers and updateTriggers permission.

If you use custom roles to manage your team, every account member who needs to manage triggers must be able to use the createTriggers, updateTriggers and deleteTriggers actions. To learn more, read Roles.

Integrations that use flag triggers

Triggers are available on the following tools. Read each tool’s documentation to learn how to set up triggers for them.

The tools are:

  • Datadog
  • Dynatrace
  • Honeycomb
  • New Relic One
  • Splunk Observability Cloud

LaunchDarkly also supports generic triggers that you can use with other tools. To learn more, read Creating flag triggers.

Generic triggers can connect to anything that fires a webhook. If a tool or service accepts an inbound connection from a webhook, you can use that service to turn flag targeting on or off. For example, if your company has an in-house monitoring application, you can use a generic trigger to turn flags on or off directly from your application.

Generic triggers work without any request body, but if you want to enhance the flag’s change history with more information, you can add different attributes. Any combination of properties will return information, and every attribute is optional.

To do this, send a JSON payload with the following shape:

JSON
1{
2 "eventName": "system CPU at 90%", // a name or description associated with the event
3 "url": "https://yourlinkhere.com" // put a link here to direct a member to more information
4}