Live events
This topic explains how to use live events.
The Live events page gives you insight into the events your application sends to LaunchDarkly, so you can ensure that you’ve set up LaunchDarkly correctly. You can explore the events LaunchDarkly received during a time range you choose, review event volume and SDK activity, and diagnose configuration problems.
About live events
To open the Live events page, click Code in the left sidebar, then click Live events.
The page displays the events LaunchDarkly received for the project and environment you select, across the time range you select. Use it to:
- Review the events LaunchDarkly received during a time range, including ranges in the past.
- Review event volume, SDK distribution, and payload size for that range.
- Find flag keys your SDKs evaluated that do not map to a live flag.
- Run diagnostics that explain why an environment is not receiving the events you expect.
In high-volume environments, the page may display sampled events, rather than 100% of events.
Set the time range
Use the time range controls to choose the window of events to display. You can select the last 15 minutes, hour, six hours, 24 hours, or seven days, or set a custom start and end time.
By default, the page is live and displays a window that trails the current time and loads new events every 30 seconds. Live updates pause while the page is not the active tab in your browser.
To pause updates, click Live. The page displays a fixed window, and you can step backward and forward through time one window at a time. To resume updates and jump back to now, click the paused indicator or select a time range preset.
Search and filter events
Use the search field to find events whose flag key or event key starts with the text you enter.
To display only some kinds of events, click the All events menu, then select the event kinds you want:
- Feature: Individual flag evaluations.
- Summary: Rolled-up counts of flag evaluations.
- Custom: Events your application sends with the SDK’s
trackmethod. - Click: Click events from clicked or tapped metrics.
- Page view: Page view events from page viewed metrics.
To select a single kind, click Only next to that kind. To remove all filters, including the search text, click Clear filters.
Because SDKs roll up many flag evaluations into a single summary event before they send them, summary events represent many more evaluations than the number of events suggests. To learn more, read Summary events.
Your time range, search text, and filters appear in the page URL, so you can share a link to what you are viewing.
Review event diagnostics
Above the list of events, four cards summarize the events LaunchDarkly received during the selected time range:
- The “Event volume” card displays the total number of events, the current event rate, and a chart of event volume over time, broken down by event kind.
- The “SDK distribution” card displays how many SDK name and version pairs sent events, and what share of events each pair sent. Less active SDKs are grouped into an “Other” category. Use this card to confirm which SDKs and versions are active in the environment.
- The “Payload size” card displays the number of batches your SDKs published, the number of events those batches contained, the throughput in bytes, and the average size per batch and per event. LaunchDarkly SDKs bundle multiple events into a single batch before sending them, to reduce the number of network requests.
- The “Misconfigured flag keys” card displays flag keys your SDKs evaluated that do not map to a live, available flag. To learn more, read Misconfigured flag keys.
Misconfigured flag keys
A misconfigured flag key is a flag key that an SDK evaluated, but that does not map to a live flag in your environment. LaunchDarkly groups these keys into categories so you can tell configuration mistakes apart from expected behavior:
- “Active flags not configured for this SDK”: The flag exists, but it is only available to server-side SDKs. Open the flag to review the warning on its Targeting tab, where you can make the flag available to client-side SDKs. To learn more, read Make flags available to client-side and mobile SDKs.
- “Archived flags”: The flag key still appears in evaluations, but the flag is archived. Your code is likely still evaluating a flag you no longer maintain.
- “Known flags with unknown evals”: The flag exists and is available to the SDK type that evaluated it. These may be evaluations from a stale SDK or persistent store.
- “Unknown or deleted flags”: LaunchDarkly found no flag for this key. The key may be misspelled in your code, or the flag may have been deleted.
To display only one category, click the filter menu in the card’s header, then select the category. To open a flag key that maps to an existing flag, click the flag key.
Inspect individual events
The list of events displays the time, kind, key, context, event summary, and SDK for each event. The summary depends on the kind of event:
- Flag evaluations display the variation the SDK served and the evaluation reason, such as “Default rule” or “Rule match”. Click an evaluation reason to open the part of the flag’s targeting configuration that produced it.
- Custom events display the event key and any metric value your application sent.
- Click events display the clicked element or URL.
- Page view events display the URL.
To review an individual event, click its row. A details panel appears with the event’s kind, timestamp, variation, SDK name and version, application ID and version, contexts, and raw event fields. To copy the raw fields, click the copy button.
To review the contexts that generated these events, read The Contexts list.
Troubleshoot when no events appear
When an environment received no events during the selected time range, LaunchDarkly runs a set of diagnostics to help you understand why. The diagnostics check whether:
- LaunchDarkly received any events in the environment during the last seven days.
- Other environments in the project received events.
- The project has any flags configured.
The “Diagnostic results” section displays the outcome of each check, what LaunchDarkly found, and what the findings mean. For example, if your SDK sent events to a different environment, LaunchDarkly reports which environments received events, and prompts you to check that your application uses the SDK key for the environment you are viewing. This most often happens when an application initializes an SDK with the SDK key for another environment.
Depending on the findings, the page displays the setup steps for initializing an SDK, links to the environments that received events, or a link to create your first flag. To run the checks again, click Run diagnostics again. To check for new events immediately, click Check for events.
To stop displaying the diagnostics for a project, click Hide setup helper. LaunchDarkly displays them again after 24 hours.
If you still don’t get the events you expect, read the troubleshooting article in the LaunchDarkly Customer Knowledge Base.
Event schema
For details on the JSON schema for each type of event described in this topic, read Streaming Data Export schema reference.