---
title: Optimize Performance with Bits AI
description: >-
  Start Bits Investigations from RUM recommendation cards to improve Core Web
  Vitals and the health of your critical user journeys.
breadcrumbs: Docs > RUM & Session Replay > Bits in RUM > Optimize Performance with Bits AI
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Optimize Performance with Bits AI

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

RUM analyzes your sessions and surfaces recommendation cards that point to the highest-impact improvements across your pages and your critical user journeys. From any card, you can start a [Bits Investigation](https://docs.datadoghq.com/bits_ai/bits_investigation.md) that analyzes the issue, including the responsible code when the Source Code Integration is set up.

You can start investigations from two places:

- The Optimization page, to improve Core Web Vitals for a specific page
- Operations Monitoring, to improve the success rate and latency of an operation

## Optimization page{% #optimization-page %}

The [**Optimization** page](https://app.datadoghq.com/rum/optimization) shows how each page of your application performs on a given vital. For each page and vital, RUM displays recommendation cards ranked by impact. Each card describes a likely cause of poor performance, such as a render-blocking script, a long task on the main thread, or a slow resource delaying Largest Contentful Paint.

You can start a Bits Investigation from recommendation cards for the following vitals:

| Platform | Vitals                                                          |
| -------- | --------------------------------------------------------------- |
| Browser  | Largest Contentful Paint (LCP), Interaction to Next Paint (INP) |
| Mobile   | Time to Initial Display (TTID)                                  |

### Start an investigation{% #start-an-investigation %}

1. Go to the [**Optimization** page](https://app.datadoghq.com/rum/optimization) and select an application.
1. Select a page and a supported vital.
1. On a recommendation card, click **Investigate**.

The Bits Investigation opens in a new tab, scoped to the page, vital, and time window of the card.

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/bits_ai/optimization-recommendation-cards.d1b940acb1197a43181ee859caf49ad2.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/bits_ai/optimization-recommendation-cards.d1b940acb1197a43181ee859caf49ad2.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The Optimization page for the Largest Contentful Paint of a page, showing recommendation cards ranked by impact, each with an Investigate button." /%}

### What Bits investigates{% #what-bits-investigates %}

Bits compares slow page loads with fast ones and reconstructs what happened in the time leading up to the vital: which resources loaded, which scripts ran, and which long tasks blocked the main thread. When the page's requests are [correlated with APM traces](https://docs.datadoghq.com/real_user_monitoring/correlate_with_other_telemetry/apm.md), Bits follows slow requests into your backend services. When the [Source Code Integration](https://docs.datadoghq.com/source_code.md) is set up, Bits links the issue to the files and functions responsible.

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/bits_ai/optimization-bits-investigation.0796a15a41e10ac65ed302113fc36264.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/bits_ai/optimization-bits-investigation.0796a15a41e10ac65ed302113fc36264.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A Bits Investigation started from an Optimization recommendation card, concluding that late discovery of the hero image degraded the homepage Largest Contentful Paint, with its impact, a timeline, and suggested next steps." /%}

## Operations Monitoring{% #operations-monitoring %}

[Operations Monitoring](https://docs.datadoghq.com/real_user_monitoring/operations_monitoring.md) tracks the success rate and latency of the user journeys in your application, such as signing up, searching, or checking out. When you open an operation, RUM displays recommendation cards ranked by severity. Each card covers one type of problem.

### Start an investigation{% #start-an-investigation-1 %}

1. Go to [Operations Monitoring](https://docs.datadoghq.com/real_user_monitoring/operations_monitoring.md) and select an operation.
1. On a recommendation card, click **Investigate**. You can also click **Investigate with Bits** in the operations table.

The Bits Investigation opens in a new tab, scoped to the operation, the type of problem, and the time window of the card.

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/bits_ai/operations-recommendation-cards.cc2ed103c2118022186f5270cd2d3c4e.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/bits_ai/operations-recommendation-cards.cc2ed103c2118022186f5270cd2d3c4e.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The page of an operation in Operations Monitoring, showing recommendation cards for errors and timeouts ranked by severity, each with an Investigate button." /%}

### What Bits investigates{% #what-bits-investigates-1 %}

Bits adapts its analysis to the type of problem on the card:

| Problem type | What Bits examines                                                                                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Errors       | The failure breakdown and trend of the operation, the top failing endpoints, attributes over-represented on failed runs, and the correlated backend traces.                                                         |
| Abandonment  | How long users waited before giving up, which resources were still loading when they left, where they navigated next, and whether abandonment concentrates in one browser, device, country, or application version. |
| Crashes      | Stack traces from the affected sessions, and whether the crash is concentrated in a specific application version, device, or operating system.                                                                      |
| Slowness     | A comparison of slow and fast runs to determine whether time is spent in the backend, the frontend, or resource loading, followed down to the backend trace or long task responsible.                               |
| Timeouts     | Whether an instrumentation gap causes the timeouts, such as an operation definition that no longer matches a renamed route or regrouped path. Bits checks for this before investigating performance.                |

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/bits_ai/operations-bits-investigation.20f7294ed9b744e3ff0e5af67e621bb4.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/bits_ai/operations-bits-investigation.20f7294ed9b744e3ff0e5af67e621bb4.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A Bits Investigation started from an Operations Monitoring recommendation card, concluding that an exhausted third-party payment API rate limit broke checkout, with its impact, a timeline, and suggested next steps." /%}

## After the investigation{% #after-the-investigation %}

Investigations started from RUM are standard Bits Investigations. You can:

- Find them later in the [Bits Investigations list](https://app.datadoghq.com/bits-ai/investigations) and share them with your team.
- [Give feedback](https://docs.datadoghq.com/bits_ai/bits_investigation/improve_accuracy.md) that Bits takes into account in future investigations.
- Send the investigation to [Bits Code](https://docs.datadoghq.com/bits_ai/bits_code.md) to generate a suggested code change or open a pull request.

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Bits in RUM](https://docs.datadoghq.com/real_user_monitoring/bits_ai.md)
- [Optimizing performance](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/optimizing_performance.md)
- [Operations Monitoring](https://docs.datadoghq.com/real_user_monitoring/operations_monitoring.md)
