> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Flag evaluations

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

This topic explains how to use flag evaluations graphs to observe flag evaluations over time. Flag evaluations graphs give your engineering and product teams insight into how many times different contexts are receiving each variation of a flag over time, as well as any changes to the flag that could have affected how many times each flag was evaluated.

## About flag evaluations

The flag evaluations graph on a flag's **Monitoring** tab gives your engineering and product teams insight into how many times different contexts are receiving each variation of a flag over time, as well as any changes to the flag that could have affected how many times each flag was evaluated.

To view a flag's evaluations chart:

1. In the left sidebar, click **Code**. The CodeControl menu appears.
2. Click **Flags**.
3. Click the name of the flag you want to view evaluations over time for. The flag's **Targeting** tab appears.
4. Click the **Monitoring** tab.

The default evaluations chart displays the total number of flag evaluations for each flag variation over time. You can change the time range from the previous hour to the previous month:

<Frame caption="The flag evaluations chart on a flag's monitoring tab.">
  <img src="https://mintcdn.com/launchdarkly/Y_qcqLWSC5ccm6eB/images/__LD_UI_no_test/feature-monitoring-evaluations.png?fit=max&auto=format&n=Y_qcqLWSC5ccm6eB&q=85&s=6439b606700f9bee94c0474d63bdee83" alt="The enhanced flag evaluations chart on a flag's monitoring tab." width="1844" height="967" data-path="images/__LD_UI_no_test/feature-monitoring-evaluations.png" />
</Frame>

Click on a variation name above the chart to view a single variation at a time.

To share a direct link to the chart, click the **three-dot** overflow menu next to the chart name and select "Copy link."

<Note>
  **Only flag evaluations are recorded**

  LaunchDarkly generates the flag evaluations graph based on [analytics events](/docs/sdk/concepts/events), which are sent from `variation` calls from the LaunchDarkly SDKs. To learn more, read [Flag variation evaluation](/docs/sdk/features/evaluating).

  Other SDK methods, such as [getting all flags](/docs/sdk/features/all-flags), typically do not populate the flag evaluations graph. To learn more and review the exceptions to this, read [About the all flags feature](/docs/sdk/features/all-flags#about-the-all-flags-feature).
</Note>

### Evaluation display

LaunchDarkly generates the flag evaluations graph on a per-flag evaluation basis, not a per-context instance basis. This means that if the same context instance is evaluated 20 times, the flag evaluations graph records and displays all 20 evaluations. New evaluations appear on the flag evaluations graph within one to two minutes.

If a flag you have removed from your codebase is still showing evaluations, read these related LaunchDarkly help center articles:

* [Flag removed from code is still showing evaluations](https://support.launchdarkly.com/hc/en-us/articles/14030042957083-Flag-removed-from-code-is-still-showing-evaluations)
* [Troubleshooting unexpected variations on the evaluations graph](https://support.launchdarkly.com/hc/en-us/articles/35735454990363-Troubleshooting-unexpected-variations-on-the-evaluations-graph)

### View unique client-side context evaluations

You can view flag evaluations by the number of unique client-side contexts, by context kind, that encountered the flag within your chosen time range. For example, if you are viewing `user` contexts, each individual user is counted only once, even if it encounters the flag multiple times.

To view flag evaluation by unique client-side contexts per context kind:

1. In the evaluations chart, click **Unique count of**. The context kind selection menu opens.
2. Select the context kind you want to view.

The chart updates to display the number of unique client-side contexts of that context kind that encountered the flag.

<Frame caption="The context kind selection menu on the enhanced flag evaluations chart.">
  <img src="https://mintcdn.com/launchdarkly/N_-ErmLoVmvOqMOo/images/__LD_UI_no_test/feature-monitoring-evaluations-context-kind.png?fit=max&auto=format&n=N_-ErmLoVmvOqMOo&q=85&s=f53c36be09b748a9b48854fe6ba5d09c" alt="The context kind selection menu on the enhanced flag evaluations chart." width="916" height="724" data-path="images/__LD_UI_no_test/feature-monitoring-evaluations-context-kind.png" />
</Frame>

If you don't see the context kind that you expect, it may be because:

* no contexts of that context kind have ever encountered the flag
* no contexts of that context kind have encountered the flag within your selected time range
* the only contexts of that context kind that have encountered the flag are from server-side SDKs
* you're using an older version of a client-side SDK that doesn't support displaying unique evaluations

<Note>
  **V3 of the JavaScript SDK does not send all events automatically**

  The evaluations chart counts a context only when LaunchDarkly receives an evaluation event for it. Version 3.x of the JavaScript SDK queues analytics events and sends them at intervals. If the page navigates away or the browser tab is hidden or closed before the SDK sends the queue, those events are lost. This can affect variations unevenly. For example, if one variation redirects and another doesn't, unique counts won't match your rollout percentages. To avoid this, call `flush()` after evaluating the flag and before navigating, or upgrade to the latest version of the JavaScript SDK. To learn more, read [Flushing events](/docs/sdk/features/flush).
</Note>

### View evaluations by application or SDK

Depending on your SDK and its configuration, you can view flag evaluations by specific applications or specific SDKs. To do this:

1. In the evaluations chart, click **Breakdown**.
2. Select **Application** or **SDK**.

Individual charts appear for each application or SDK that is sending flag evaluations to LaunchDarkly. Each chart lists the percentage of overall evaluations coming from that specific app or SDK.

To learn how to configure your SDK to send application metadata to LaunchDarkly, read [Automatic environment attributes and application metadata configuration](/docs/sdk/features/environment-attributes#automatic-environment-attributes-and-application-metadata-configuration).

<Frame caption="Flag evaluations broken down by SDK.">
  <img src="https://mintcdn.com/launchdarkly/Y_qcqLWSC5ccm6eB/images/__LD_UI_no_test/feature-monitoring-breakdown.png?fit=max&auto=format&n=Y_qcqLWSC5ccm6eB&q=85&s=ce42dceb8ca1b9bfee7772081c3b3ae0" alt="Flag evaluations broken down by SDK." width="2062" height="612" data-path="images/__LD_UI_no_test/feature-monitoring-breakdown.png" />
</Frame>
