diff --git a/content/en/feature_flags/concepts/_index.md b/content/en/feature_flags/concepts/_index.md index e35b2149500..a833039b9de 100644 --- a/content/en/feature_flags/concepts/_index.md +++ b/content/en/feature_flags/concepts/_index.md @@ -12,4 +12,5 @@ Learn how Datadog Feature Flags work and how to configure flags, environments, t {{< nextlink href="/feature_flags/concepts/traffic_splitting" >}}Traffic Splitting and Randomization{{< /nextlink >}} {{< nextlink href="/feature_flags/concepts/distribution_channels" >}}Distribution Channels{{< /nextlink >}} {{< nextlink href="/feature_flags/concepts/flag_history" >}}Flag History{{< /nextlink >}} + {{< nextlink href="/feature_flags/concepts/flag_graphs" >}}Feature Flag Graphs{{< /nextlink >}} {{< /whatsnext >}} diff --git a/content/en/feature_flags/concepts/flag_graphs.md b/content/en/feature_flags/concepts/flag_graphs.md new file mode 100644 index 00000000000..135499b1994 --- /dev/null +++ b/content/en/feature_flags/concepts/flag_graphs.md @@ -0,0 +1,72 @@ +--- +title: Feature Flag Graphs +description: Understand the graphs on the feature flags list and details pages and how to use them to monitor your rollout. +further_reading: +- link: "/feature_flags/server/" + tag: "Documentation" + text: "Server-Side Feature Flags" +- link: "/feature_flags/client/" + tag: "Documentation" + text: "Client-Side Feature Flags" +- link: "/dashboards/" + tag: "Documentation" + text: "Dashboards" +--- + +## Overview + +Datadog Feature Flags provides graphs at two levels: the flags list page gives a snapshot of all your flags at a glance, and the flag details page shows in-depth graphs for a single flag. + +## Flags list page + +The flags list page shows a summary row for each flag, including total evaluation count and mini graph that let you assess activity across your flag inventory without opening each flag individually. + +{{< img src="feature_flags/flag_graphs/flag_list.png" alt="Feature flags list page showing evaluation counts and sparklines per flag" style="width:100%;" >}} + +Each row shows: + +- **Evaluation count**: total number of client and server evaluations in the past hour +- **Mini graph**: individual client and server evaluations in the past hour, grouped by variant +- **Variants**: the variant colors are the key for the mini graph + +## Flag details page + +The flag details page includes observability insights to help you quickly identify how a single flag is performing. + +### Targeting rule evaluation counts + +Shows the total client and server evaluations that fell through to each targeting rule in the given `Real-time metric overview` time range. + +{{< img src="feature_flags/flag_graphs/targeting_rule_distribution.png" alt="Targeting rule evaluation count" style="width:100%;" >}} + +Use this count to confirm that targeting rules are working as expected and to see how traffic is distributed across targeting rules in a given environment, including % of total traffic in the time range. + +### Client + Server evaluations + +{{< img src="feature_flags/flag_graphs/evaluations.png" alt="Client + Server evaluations graph split by variant" style="width:100%;" >}} + +Client SDK evaluations have two views, each grouped by variant: + +- **Unique**: count of unique users or entities that evaluated each variant (deduplicated by targeting key) +- **Total**: count of all evaluations by variant, including repeated evaluations of the same targeting key + + +Server SDK evaluations show count of all evaluations by variant. Requires flag evaluation metrics to be enabled. See [Set Up Server-Side Flag Evaluation Metrics][1]. + +### Errors and latency + +{{< img src="feature_flags/flag_graphs/errors_latency.png" alt="Error and latency graphs" style="width:100%;" >}} + +Error rate and latency graphs are available for client evaluations. Server evaluation support is coming soon. + +## Export to a dashboard + +{{< img src="feature_flags/flag_graphs/dashboard_export.png" alt="Export graph to a dashboard" style="width:100%;" >}} + +Choose **Export to Dashboard** to add it to a Datadog dashboard. From there, you can slice and dice the data for further insights. + +## Further reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: /feature_flags/guide/server_flag_evaluation_metrics/ diff --git a/content/en/feature_flags/guide/_index.md b/content/en/feature_flags/guide/_index.md index d880fa1646f..7bcf105c0ef 100644 --- a/content/en/feature_flags/guide/_index.md +++ b/content/en/feature_flags/guide/_index.md @@ -12,6 +12,7 @@ cascade: {{< whatsnext desc="Feature Flags Guides:" >}} {{< nextlink href="/getting_started/feature_flags" >}}Getting started with Feature Flags{{< /nextlink >}} + {{< nextlink href="/feature_flags/guide/server_flag_evaluation_metrics" >}}Set Up Server-Side Flag Evaluation Metrics{{< /nextlink >}} {{< nextlink href="/feature_flags/guide/migrate_from_launchdarkly" >}}Migrate Your Feature Flags from LaunchDarkly{{< /nextlink >}} {{< nextlink href="/feature_flags/guide/migrate_from_statsig" >}}Migrate Your Feature Flags from Statsig{{< /nextlink >}} {{< /whatsnext >}} diff --git a/content/en/feature_flags/guide/server_flag_evaluation_metrics.md b/content/en/feature_flags/guide/server_flag_evaluation_metrics.md new file mode 100644 index 00000000000..3fe3f66d656 --- /dev/null +++ b/content/en/feature_flags/guide/server_flag_evaluation_metrics.md @@ -0,0 +1,140 @@ +--- +title: Set Up Server-Side Flag Evaluation Metrics +description: Configure the Datadog Agent and your application to emit and visualize flag evaluation metrics for server-side feature flags. +further_reading: +- link: "/feature_flags/server/" + tag: "Documentation" + text: "Server-Side Feature Flags" +- link: "/feature_flags/concepts/flag_graphs/" + tag: "Documentation" + text: "Feature Flag Graphs" +- link: "/metrics/" + tag: "Documentation" + text: "Metrics" +- link: "/dashboards/" + tag: "Documentation" + text: "Dashboards" +--- + +## Overview + +Flag evaluation metrics let you measure how often each variant of a feature flag is returned by your server-side application. Use these metrics to track flag adoption over time, verify targeting rules are working as expected, and graph flag evaluation data on dashboards. + +
feature_flag.evaluations metric is experimental and may change or be removed in a future release.HOST_PROC=/proc on the Agent container to work around a known issue with the OTLP pipeline.DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true environment variable is required to enable the feature flagging provider. Java also supports the system property -Ddd.experimental.flagging.provider.enabled=true, and Ruby and Node.js support code-based configuration as an alternative. See the SDK-specific documentation for details.DD_REMOTE_CONFIG_ENABLED=true) if your tracer has Remote Configuration disabled and you need to override that setting.DD_METRICS_OTEL_ENABLED=true to enable flag evaluation metrics. Without this, the SDK does not emit metrics for flag evaluations. When enabled, each evaluation records a feature_flag.evaluations counter metric tagged with the flag key, result variant, and evaluation reason.feature_flag.evaluations metric. See Feature Flag Graphs for more information on available graphing.
## Testing with in-memory providers
diff --git a/content/en/feature_flags/server/dotnet.md b/content/en/feature_flags/server/dotnet.md
index e50e4c2b724..99c8a905e11 100644
--- a/content/en/feature_flags/server/dotnet.md
+++ b/content/en/feature_flags/server/dotnet.md
@@ -8,6 +8,12 @@ further_reading:
- link: "/tracing/trace_collection/dd_libraries/dotnet-core/"
tag: "Documentation"
text: ".NET Tracing"
+- link: "/feature_flags/guide/server_flag_evaluation_metrics/"
+ tag: "Guide"
+ text: "Set Up Server-Side Flag Evaluation Metrics"
+- link: "/feature_flags/concepts/flag_graphs/"
+ tag: "Concept"
+ text: "Feature Flag Graphs"
---
## Overview
@@ -33,7 +39,7 @@ Set the following environment variables:
DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
# Optional: Enable flag evaluation metrics
-DD_METRICS_OTEL_ENABLED=true
+# See "Set Up Server-Side Flag Evaluation Metrics" documentation
# Required: Service identification
DD_SERVICE=EXPERIMENTAL_ prefix is retained for backwards compatibility; the provider itself is stable.feature_flag.evaluations metric. See Feature Flag Graphs for more information on available graphing.
+
## Installation
Install the Datadog [.NET SDK][3] and [OpenFeature SDK][4] using NuGet:
diff --git a/content/en/feature_flags/server/go.md b/content/en/feature_flags/server/go.md
index d82569af67d..b64a3db8e52 100644
--- a/content/en/feature_flags/server/go.md
+++ b/content/en/feature_flags/server/go.md
@@ -8,6 +8,12 @@ further_reading:
- link: "/tracing/trace_collection/dd_libraries/go/"
tag: "Documentation"
text: "Go Tracing"
+- link: "/feature_flags/guide/server_flag_evaluation_metrics/"
+ tag: "Guide"
+ text: "Set Up Server-Side Flag Evaluation Metrics"
+- link: "/feature_flags/concepts/flag_graphs/"
+ tag: "Concept"
+ text: "Feature Flag Graphs"
---
## Overview
@@ -31,7 +37,7 @@ Set the following environment variables:
DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
# Optional: Enable flag evaluation metrics
-DD_METRICS_OTEL_ENABLED=true
+# See "Set Up Server-Side Flag Evaluation Metrics" documentation
# Required: Service identification
DD_SERVICE=EXPERIMENTAL_ prefix is retained for backwards compatibility; the provider itself is stable.feature_flag.evaluations metric. See Feature Flag Graphs for more information on available graphing.
+
## Installation
Install the Datadog OpenFeature provider package:
diff --git a/content/en/feature_flags/server/java.md b/content/en/feature_flags/server/java.md
index 7ffa4fcc54f..a68c3e8ef8e 100644
--- a/content/en/feature_flags/server/java.md
+++ b/content/en/feature_flags/server/java.md
@@ -8,10 +8,18 @@ further_reading:
- link: "/tracing/trace_collection/automatic_instrumentation/dd_libraries/java/"
tag: "Documentation"
text: "Java APM and Distributed Tracing"
+- link: "/feature_flags/guide/server_flag_evaluation_metrics/"
+ tag: "Guide"
+ text: "Set Up Server-Side Flag Evaluation Metrics"
+- link: "/feature_flags/concepts/flag_graphs/"
+ tag: "Concept"
+ text: "Feature Flag Graphs"
---
DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true. The EXPERIMENTAL_ prefix is kept for backwards compatibility; the provider is stable. See the Configuration section for details.feature_flag.evaluations metric. See Feature Flag Graphs for more information on available graphing.
+
## Overview
This page describes how to instrument a Java application with the Datadog Feature Flags SDK. Datadog feature flags provide a unified way to remotely control feature availability in your app, experiment safely, and deliver new experiences with confidence.
@@ -122,7 +130,7 @@ Configure your Java application with the required environment variables or syste
export DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
# Optional: Enable flag evaluation metrics
-export DD_METRICS_OTEL_ENABLED=true
+# See "Set Up Server-Side Flag Evaluation Metrics" documentation
# Required: Service name
export DD_SERVICE=EXPERIMENTAL_ prefix is retained for backwards compatibility; the provider itself is stable.feature_flag.evaluations metric. See Feature Flag Graphs for more information on available graphing.
+
Or enable the provider in code:
```javascript
diff --git a/content/en/feature_flags/server/python.md b/content/en/feature_flags/server/python.md
index 6c46d900916..3ea8aa9baec 100644
--- a/content/en/feature_flags/server/python.md
+++ b/content/en/feature_flags/server/python.md
@@ -8,6 +8,12 @@ further_reading:
- link: "/tracing/trace_collection/dd_libraries/python/"
tag: "Documentation"
text: "Python Tracing"
+- link: "/feature_flags/guide/server_flag_evaluation_metrics/"
+ tag: "Guide"
+ text: "Set Up Server-Side Flag Evaluation Metrics"
+- link: "/feature_flags/concepts/flag_graphs/"
+ tag: "Concept"
+ text: "Feature Flag Graphs"
---
## Overview
@@ -32,7 +38,7 @@ Set the following environment variables:
export DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
# Optional: Enable flag evaluation metrics
-export DD_METRICS_OTEL_ENABLED=true
+# See "Set Up Server-Side Flag Evaluation Metrics" documentation
# Required: Service identification
export DD_SERVICE=EXPERIMENTAL_ prefix is retained for backwards compatibility; the provider itself is stable.feature_flag.evaluations metric. See Feature Flag Graphs for more information on available graphing.
+
## Installation
Install the Datadog Python SDK and OpenFeature SDK:
diff --git a/content/en/feature_flags/server/ruby.md b/content/en/feature_flags/server/ruby.md
index a0fcb51bdee..0c18b29ed5a 100644
--- a/content/en/feature_flags/server/ruby.md
+++ b/content/en/feature_flags/server/ruby.md
@@ -11,6 +11,12 @@ further_reading:
- link: "/tracing/"
tag: "Documentation"
text: "Learn about Application Performance Monitoring (APM)"
+- link: "/feature_flags/guide/server_flag_evaluation_metrics/"
+ tag: "Guide"
+ text: "Set Up Server-Side Flag Evaluation Metrics"
+- link: "/feature_flags/concepts/flag_graphs/"
+ tag: "Concept"
+ text: "Feature Flag Graphs"
---
## Overview
@@ -44,11 +50,13 @@ You can enable Feature Flags with environment variables:
DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
# Optional: Enable flag evaluation metrics
-DD_METRICS_OTEL_ENABLED=true
+# See "Set Up Server-Side Flag Evaluation Metrics" documentation
```
EXPERIMENTAL_ prefix is retained for backwards compatibility; the provider itself is stable.feature_flag.evaluations metric. See Feature Flag Graphs for more information on available graphing.
+
Or enable the provider in code:
```ruby
diff --git a/content/en/getting_started/feature_flags/_index.md b/content/en/getting_started/feature_flags/_index.md
index 84fe206d23d..5af83445d78 100644
--- a/content/en/getting_started/feature_flags/_index.md
+++ b/content/en/getting_started/feature_flags/_index.md
@@ -368,6 +368,8 @@ Monitor the feature rollout from the feature flag details page, which provides r
{{< img src="getting_started/feature_flags/real-time-flag-metrics.png" alt="Real-time flag metrics panel" style="width:100%;" >}}
+For server-side applications, you can also enable flag evaluation metrics to track how often each variant is returned and graph the data on dashboards. See [Set Up Server-Side Flag Evaluation Metrics][9].
+
## Further reading
{{< partial name="whats-next/whats-next.html" >}}
@@ -380,3 +382,4 @@ Monitor the feature rollout from the feature flag details page, which provides r
[6]: /feature_flags/concepts/distribution_channels/
[7]: /feature_flags/concepts/targeting_rules/
[8]: /feature_flags/concepts/traffic_splitting/
+[9]: /feature_flags/guide/server_flag_evaluation_metrics/
diff --git a/static/images/feature_flags/flag_graphs/dashboard_export.png b/static/images/feature_flags/flag_graphs/dashboard_export.png
new file mode 100644
index 00000000000..7853da5b2a7
Binary files /dev/null and b/static/images/feature_flags/flag_graphs/dashboard_export.png differ
diff --git a/static/images/feature_flags/flag_graphs/errors_latency.png b/static/images/feature_flags/flag_graphs/errors_latency.png
new file mode 100644
index 00000000000..abb1ac902a4
Binary files /dev/null and b/static/images/feature_flags/flag_graphs/errors_latency.png differ
diff --git a/static/images/feature_flags/flag_graphs/evaluations.png b/static/images/feature_flags/flag_graphs/evaluations.png
new file mode 100644
index 00000000000..2a38a5de0bc
Binary files /dev/null and b/static/images/feature_flags/flag_graphs/evaluations.png differ
diff --git a/static/images/feature_flags/flag_graphs/flag_list.png b/static/images/feature_flags/flag_graphs/flag_list.png
new file mode 100644
index 00000000000..917a26b1be1
Binary files /dev/null and b/static/images/feature_flags/flag_graphs/flag_list.png differ
diff --git a/static/images/feature_flags/flag_graphs/targeting_rule_distribution.png b/static/images/feature_flags/flag_graphs/targeting_rule_distribution.png
new file mode 100644
index 00000000000..4cae31a7b9d
Binary files /dev/null and b/static/images/feature_flags/flag_graphs/targeting_rule_distribution.png differ