---
title: Cursor
description: Datadog Extension for Cursor
breadcrumbs: Docs > Integrations > Cursor
---

# Cursor
Supported OS   Error Tracking insights in CursorCursor Productivity Overview Dashboard
## Overview{% #overview %}

Datadog supports Cursor in two separate ways:

{% tab title="Datadog Extension for Cursor" %}
The [Datadog Extension for Cursor](https://docs.datadoghq.com/developers/ide_plugins/vscode.md?tab=cursor) helps you improve your software by providing code-level insights directly in the IDE, based on real-time observability data from:

- Logs
- Error Tracking
- CI Visibility
- App and API Protection
- Synthetics
- Static Analysis
- Datadog Model Context Protocol (MCP) server

**Use this when you want Datadog context directly in Cursor while coding.**
{% /tab %}

{% tab title="Cursor integration in Datadog" %}
The Cursor integration in Datadog ingests Cursor usage and spend telemetry (for example, `cursor.daily_usage.*`, `cursor.usage_events.*`, and `cursor.spending.*`) so you can monitor adoption, usage patterns, and cost in Datadog.

**Use this when you want to monitor Cursor activity from Datadog dashboards, notebooks, and monitors.**
{% /tab %}

## Setup{% #setup %}

Choose the setup flow based on which product you are configuring.

### Installation and configuration{% #installation-and-configuration %}

{% tab title="Datadog Extension for Cursor" %}
#### Installation (Cursor IDE){% #installation-cursor-ide %}

From Cursor:

1. Open the **Extensions** view and search for `Datadog`. Alternatively, find the [Datadog Extension in the Open VSX registry](https://open-vsx.org/extension/datadog/datadog-vscode).
1. Click **Install** to download and install the extension in your IDE.
1. If prompted that Datadog is a third-party extension, click **Accept**.
1. Click **Restart IDE**.

#### Configuration (Cursor IDE){% #configuration-cursor-ide %}

You can find the extension settings within the IDE settings, under **Datadog**.

In the extension settings, select the Datadog services relevant to your project.
{% /tab %}

{% tab title="Cursor integration in Datadog" %}
#### Installation (Datadog){% #installation-datadog %}

1. In Datadog, open the [Cursor integration tile](https://app.datadoghq.com/integrations/cursor).
1. Log in to the [Cursor Admin Portal Team Settings](https://cursor.com/dashboard/team-settings) with an admin account.
1. Under **Advanced**, open **API Keys** and generate a new API key with Admin scope.
1. Copy the generated Admin API key.
1. In Datadog, add an account name and paste the key into the **API Key** field.
1. Choose the telemetry you want to collect:
   - Enable Daily Usage Data
   - Enable Spending Data
   - Enable Usage Events
   - Enable AI Commit Metrics (Enterprise)
   - Enable AI Code Change Metrics (Enterprise)
1. Save the configuration, then confirm metrics are arriving by searching for `cursor.` in Datadog Metrics Explorer.

#### Configuration (Datadog){% #configuration-datadog %}

After setup, configure monitors and dashboards for the `cursor.*` metrics that matter to your teams (for example, usage volume or spend trends).

The **AI Commit Metrics** and **AI Code Change Metrics** options are available for Cursor Enterprise organizations.
{% /tab %}

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **cursor.daily\_usage.total\_lines\_added**(gauge)              | Total number of lines added in a day.*Shown as unit*                            |
| **cursor.daily\_usage.total\_lines\_deleted**(gauge)            | Total number of lines deleted in a day.*Shown as unit*                          |
| **cursor.daily\_usage.accepted\_lines\_added**(gauge)           | Total number of suggested line additions accepted in a day.*Shown as unit*      |
| **cursor.daily\_usage.accepted\_lines\_deleted**(gauge)         | Total number of suggested line deletions accepted in a day.*Shown as unit*      |
| **cursor.daily\_usage.total\_applies**(gauge)                   | Total number of code change suggestions accepted in a day.*Shown as unit*       |
| **cursor.daily\_usage.total\_rejects**(gauge)                   | Total number of code change suggestions rejected in a day.*Shown as unit*       |
| **cursor.daily\_usage.total\_tabs\_shown**(gauge)               | Total number of autocomplete suggestions shown in a day.*Shown as unit*         |
| **cursor.daily\_usage.total\_tabs\_accepted**(gauge)            | Total number of autocomplete suggestions accepted in a day.*Shown as unit*      |
| **cursor.daily\_usage.composer\_requests**(gauge)               | Total number of composer requests made in a day.*Shown as unit*                 |
| **cursor.daily\_usage.bugbot\_usages**(gauge)                   | Total number of bugbot usages in a day.*Shown as unit*                          |
| **cursor.daily\_usage.chat\_requests**(gauge)                   | Total number of chat requests made in a day.*Shown as request*                  |
| **cursor.daily\_usage.agent\_requests**(gauge)                  | Total number of agent requests made in a day.*Shown as request*                 |
| **cursor.daily\_usage.cmdk\_usages**(gauge)                     | Total number of inline edit prompt bar calls in a day.*Shown as unit*           |
| **cursor.daily\_usage.subscription\_included\_requests**(gauge) | Total number of subscription included requests made in a day.*Shown as request* |
| **cursor.daily\_usage.api\_key\_requests**(gauge)               | Total number of API key requests made in a day.*Shown as request*               |
| **cursor.daily\_usage.usage\_based\_requests**(gauge)           | Total number of usage based requests made in a day.*Shown as request*           |
| **cursor.spending.spend\_cents**(gauge)                         | Total number of cents spent.*Shown as cent*                                     |
| **cursor.spending.fast\_premium\_requests**(gauge)              | Total number of fast premium requests made.*Shown as request*                   |
| **cursor.usage\_events.input\_tokens**(count)                   | Total number of input tokens used for a session.*Shown as unit*                 |
| **cursor.usage\_events.output\_tokens**(count)                  | Total number of output tokens used for a session.*Shown as unit*                |
| **cursor.usage\_events.cache\_write\_tokens**(count)            | Total number of cache write tokens used for a session.*Shown as unit*           |
| **cursor.usage\_events.cache\_read\_tokens**(count)             | Total number of cache read tokens used for a session.*Shown as unit*            |
| **cursor.usage\_events.total\_cents**(count)                    | Total number of cents spent for a session.*Shown as cent*                       |
| **cursor.ai\_commits.tab\_lines\_added**(count)                 | Total number of lines added using tab completion in a commit.*Shown as unit*    |
| **cursor.ai\_commits.tab\_lines\_deleted**(count)               | Total number of lines deleted using tab completion in a commit.*Shown as unit*  |
| **cursor.ai\_commits.composer\_lines\_added**(count)            | Total number of lines added using the Composer in a commit.*Shown as unit*      |
| **cursor.ai\_commits.composer\_lines\_deleted**(count)          | Total number of lines deleted using the Composer in a commit.*Shown as unit*    |
| **cursor.ai\_commits.non\_ai\_lines\_added**(count)             | Total number of lines added without AI assistance in a commit.*Shown as unit*   |
| **cursor.ai\_commits.non\_ai\_lines\_deleted**(count)           | Total number of lines deleted without AI assistance in a commit.*Shown as unit* |
| **cursor.ai\_changes.lines\_added**(count)                      | Total number of lines added in a specific code change.*Shown as unit*           |
| **cursor.ai\_changes.lines\_deleted**(count)                    | Total number of lines deleted in a specific code change.*Shown as unit*         |

## Support{% #support %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).

For issues specific to the Datadog Extension for Cursor, open an [issue on GitHub](https://github.com/DataDog/datadog-for-vscode).

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

- [IDE (Integrated Development Environment) Plugins](https://www.datadoghq.com/product/platform/ides/)
- [Datadog Extension for VS Code & Cursor](https://docs.datadoghq.com/developers/ide_plugins/vscode.md?tab=cursor)
