turbot/launchdarkly
steampipe plugin install launchdarkly

Table: launchdarkly_feature_flag - Query LaunchDarkly Feature Flags using SQL

LaunchDarkly is a feature management platform that allows software teams to control feature rollouts, test in production, and perform progressive delivery. It provides a centralized way to manage and control the visibility and rollout of features in your applications. LaunchDarkly helps you mitigate the risk of software releases and improve the speed and reliability of your delivery pipeline.

Table Usage Guide

The launchdarkly_feature_flag table provides insights into feature flags within LaunchDarkly. As a software engineer or product manager, explore feature-specific details through this table, including the key, state, and description. Utilize it to uncover information about features, such as their rollout status, enabling or disabling features, and understanding the impact of feature changes.

Examples

Basic info

Explore the characteristics of different feature flags, including their names, keys, versions, creation dates, and types. This information can be useful to understand the various aspects of your feature flags and to track their history over time.Explore the fundamental details of your feature flags, such as their names, versions, and creation dates, to gain a comprehensive overview and better manage your feature releases. This can be particularly useful in scenarios where you need to assess the overall status of your feature flags or identify any issues.

select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag;
select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag;

List the feature flags that have been created in the last 30 days

Discover the recently created feature flags within the past month. This is useful for keeping track of new features or changes that have been introduced to your application or service.Discover the segments that have been introduced in the past month. This can be useful for understanding recent changes or additions to your product's functionality.

select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag
where
creation_date >= now() - interval '30' day;
select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag
where
creation_date >= datetime('now', '-30 day');

List out the archived feature flags

Explore which feature flags have been archived to manage your application's features more effectively. This could be useful in understanding the evolution of your application's features and make informed decisions about future development.Explore which feature flags have been archived in LaunchDarkly to better manage your flag inventory and understand the evolution of your feature rollout strategies.

select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag
where
archived;
select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag
where
archived = 1;

List out all the temporary feature flags

Discover the segments that utilize temporary feature flags, allowing for a better understanding of how these are used in your application and potentially highlighting areas for optimization or risk. This can be especially useful in managing and tracking the use of feature flags for testing or temporary features.Explore which feature flags are temporary in your LaunchDarkly setup. This can help manage and clean up temporary flags that are no longer needed, improving system efficiency.

select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag
where
temporary;
select
name,
key,
version,
creation_date,
kind
from
launchdarkly_feature_flag
where
temporary = 1;

List out the maintainer details of a feature flag

Discover the individuals responsible for maintaining specific feature flags. This is beneficial for understanding who to contact regarding changes or issues with a particular feature flag.Explore which feature flags are being managed by whom, to identify the individuals responsible for specific functions and their roles. This is useful for understanding accountability and communication paths within a team managing feature flags.

select
name,
key,
version,
maintainer ->> '_id' as maintainer_id,
maintainer ->> 'email' as maintainer_email_id,
(maintainer ->> 'firstName') || ' ' || (maintainer ->> 'lastName') as maintainer_name,
maintainer ->> 'role' as maintainer_role
from
launchdarkly_feature_flag;
select
name,
key,
version,
json_extract(maintainer, '$._id') as maintainer_id,
json_extract(maintainer, '$.email') as maintainer_email_id,
(json_extract(maintainer, '$.firstName')) || ' ' || (json_extract(maintainer, '$.lastName')) as maintainer_name,
json_extract(maintainer, '$.role') as maintainer_role
from
launchdarkly_feature_flag;

Schema for launchdarkly_feature_flag

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
archivedbooleanBoolean indicating if the feature flag is archived.
archived_datetimestamp with time zoneTime when the feature flag has been archived.
client_side_availabilityjsonbAn array of possible variations for the flag.
creation_datetimestamp with time zoneAPI key to use with mobile SDKs.
custom_propertiesjsonbInformation about the custom properties.
defaultsjsonbThe index, from the array of variations for this flag, of the variation to serve by default when targeting is on or off.
descriptiontextDescription of the feature flag.
environmentsjsonbA JSON object containing configuration information for different environments.
experimentsjsonbInformation about the experiments related to the feature flag.
goal_idsjsonbAn array of goal IDs.
include_in_snippetbooleanTDeprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK
keytext=A unique key used to reference the flag in your code.
kindtextKind of feature flag.
linksjsonbThe location and content type of related resources.
maintainerjsonbDetails of the maintainer for the feature flags.
maintainer_idtextAssociated maintainerId for the feature flag.
maintainer_team_keytextThe key of the associated team that maintains this feature flag.
nametextA human-friendly name for the feature flag.
project_keytext=The key of this project.
tagsjsonbTags for the feature flag.
temporarybooleanWhether the flag is a temporary flag.
titletextTitle of the resource.
variationjsonbAn array of possible variations for the flag.
versionbigintVersion of the feature flag.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- launchdarkly

You can pass the configuration to the command with the --config argument:

steampipe_export_launchdarkly --config '<your_config>' launchdarkly_feature_flag