Set Up AI Impact

This product is not supported for your selected Datadog site. ().
Join the Preview!

AI Impact is available to all Datadog customers in Preview.

AI Impact classifies each pull request as AI-assisted or non-AI based on the sources it detects for your AI coding tools. A source is a signal that an AI coding tool contributed to a commit or PR.

Configure your AI coding tools and sources at Software Delivery > Delivery Performance > Settings > AI Impact. Datadog points you to the recommended source for the most accurate classification for each coding assistant, and preset mapping rules help detect activity from common review agents and autonomous agents.

Prerequisites

AI Impact requires setting up DORA Metrics with deployment, commit, and pull request data.

No AI-specific configuration is required to see initial data, such as AI co-authored commits and some activity attributed to AI reviews and autonomous agents. For more complete measurement, configure your AI coding tools and sources as described below.

How AI detection works

Datadog classifies AI activity from the following types of AI tools:

AI toolsHow detection works
Coding assistantsDetected by co-author patterns, configured integrations, pull request labels, or other data that indicate contributions from an AI tool. AI attribution can be either direct or inferred, depending on the tool’s source.
Review agentsDetected using mapping rules for pull request comments and GitHub reactions. A review agent is attributed to a pull request when a rule matches a review author to a named agent.
Autonomous agentsDetected using mapping rules for author logins, author emails, or commit trailers. An autonomous agent is attributed to a pull request when it creates the first commit in the PR.

AI attribution modes for coding assistants

AI Impact classifies each pull request as AI-assisted or non-AI, and every metric is built on that classification. A PR is AI-assisted when at least one of its commits is AI-assisted.

Each source emits signals that provide direct attribution, attribution inferred from user activity, or both.

Direct attributionInferred from user activity
A commit is AI-assisted whenThe tool reports AI contribution to that specific commit, for example, Cursor integration reporting AI-generated linesThe commit author created lines of code with the AI tool on the day the commit was created
Evidence is tied toThe commitThe author and the calendar day
What the metrics tell youHow AI-assisted code performs compared to code written without AI, and how users of one tool compare to users of anotherHow developers working with AI perform against those working without it, and how users of one tool compare to users of another

Direct attribution is more precise, because the signal is attached to the change itself. Inferred attribution covers tools that report usage without per-commit detail, and classifies every commit an active author made that day as AI-assisted. A user is active only on days the tool reports lines of code created by that user.

By default, the AI Impact dashboard displays metrics using the most precise attribution mode that all integrated tools have in common, so that metrics are comparable across tools on an equal basis. For example, if you’re using only Cursor, metrics use direct attribution because that’s the most precise method available. If you’re using both Cursor and Claude Code, metrics are inferred from user activity because direct attribution is not available for Claude Code.

To select which attribution mode your metrics use in the AI Impact dashboard, set the Default AI attribution UI filter in AI Impact settings. The setting affects only how data is displayed in the AI Impact UI, not what Datadog ingests. Both modes continue to collect data regardless of which mode you select.

Set up coding assistants

AI Impact Settings show which coding assistants and sources Datadog detects. Some coding assistants are detected automatically, when they add themselves as a co-author to the commits they generate. To more completely capture an AI coding assistant’s activity, configure a source for it.

Supported AI coding assistants and sources

Each supported coding assistant has one recommended source per context, listed in the following table. The recommended source is the most accurate one that most users can configure without manual work per pull request, and it ingests data automatically after setup.

Coding assistantRecommended sourceAttribution mode
Claude Code (API or Platform)Anthropic Usage and Costs integrationInferred
Claude Code (Enterprise plan)Claude Enterprise User Analytics integrationInferred
Claude Code (Teams plan)OpenTelemetryInferred
Claude Code (Amazon Bedrock or Google Vertex AI)OpenTelemetryInferred
CodexOpenAI Codex integrationInferred
CursorCursor integrationDirect
GitHub CopilotGitHub Copilot integrationInferred

To track other coding assistants or use a different source for a supported coding assistant, the following sources are available for all coding assistants:

  • PR labels: (Direct attribution) PRs with a designated label are marked as AI-assisted.
  • Public API: (Inferred from user activity) Send your own event data through the Datadog Public API, and Datadog infers AI attribution from it.

Configure a source for a coding assistant

  1. In AI Impact Settings, open the Coding assistants tab. The tab lists the AI tools automatically detected through co-author detection, as well as any other configured assistants.
  2. If the coding assistant you want to track is already listed, select it to configure a source. Otherwise, click Add a coding assistant and select the coding assistant.
  3. For Claude Code, select the plan you use or the gateway you route through. The recommended source differs for each.
  4. Follow the UI guidance to set up the source. Expand the following sections for details on each source type:

In many cases, the recommended source is a Datadog integration for the coding tool, which reports AI usage directly to Datadog. Of these, only the Cursor integration reports AI contribution directly per commit. The other integrations report user activity, which Datadog uses to infer AI assistance for the commits an active author created that day.

When configuring a coding assistant in AI Impact Settings, click the relevant button in the Integration section to open the integration tile in Datadog and complete the setup.

Use OpenTelemetry to report AI usage data from certain coding assistant deployments, such as Claude Code’s Teams plan. Additional configuration is required for Claude Code running through an external gateway such as Amazon Bedrock or Google Vertex AI.

  1. Configure Claude Code to send OpenTelemetry data to Datadog, following either Option 2: OpenTelemetry (OTLP) or Option 3: Forward data through the Datadog Agent.

  2. Amazon Bedrock or Google Vertex AI: Set a per-user resource attribute in your Claude Code settings file, for example ~/.claude/settings.json:

    "OTEL_RESOURCE_ATTRIBUTES": "user.email=user@company.com"
    

    AI Impact needs user.email to tie activity back to an individual developer and infer AI assistance for that developer’s commits.

  3. Restart Claude Code.

Because user.email differs for every developer, it cannot ship in a single shared configuration file. Distribute the settings file with a Mobile Device Management (MDM) system or a provisioning script that writes the value at login.

Pull request labels give direct attribution for any coding assistant, including assistants with no Datadog integration. Datadog marks every commit in a labeled pull request as AI-assisted.

  1. When configuring a coding assistant in AI Impact Settings, click Set Up in the PR Labels section.
  2. Enter one or more labels that your team uses to identify AI-assisted pull requests, and click Save.

Each rule applies to the whole pull request, so if any commits were written without AI assistance, they are classified as being AI-assisted. Label detection depends on consistent labeling by your team, which can be difficult to sustain across a large organization. Use it for a coding assistant with no Datadog integration, or for a single team that can maintain the practice.

Use the Datadog public API to send your own AI usage data to Datadog when your organization routes AI coding tools through an internal gateway. The API is also an option for tracking a coding assistant that has no Datadog integration. Datadog infers AI assistance from the user activity you report.

Some coding assistants add themselves as a co-author to the commits they generate. Datadog detects these co-author signatures automatically—no additional setup is required. Because the signature is attached to the commit, co-author detection provides direct attribution.

Co-author detection can undercount AI activity, as not all coding assistants add themselves as co-authors, and a rebase or squash can strip the co-author signature. To measure a coding assistant more fully, configure another source for it.

Set up review agents

Review agents review pull requests rather than writing the code in them. Datadog detects review agents from pull request comments and GitHub reactions, and attributes a review agent to a pull request when a mapping rule matches a review author to a named agent.

To track a review agent with a mapping rule:

  1. Open the Review agents tab in AI Impact settings.
  2. Click Add Review Agent.
  3. Enter an Agent name to identify the review agent in the UI.
  4. Define one or more rules that match the agent’s author login associated with review comments or reactions on PRs.

Set up autonomous agents

Autonomous agents open pull requests on their own rather than assisting a developer in an editor. Datadog detects most autonomous agents automatically from known agent patterns. You can also define mapping rules to identify agents that Datadog does not automatically detect.

To track an agent with a mapping rule:

  1. Open the Autonomous agents tab in AI Impact settings.
  2. Click Add Autonomous Agent.
  3. Enter an Agent name to identify the autonomous agent in the UI.
  4. Define one or more rules that identify the agent’s pull requests.

Identify automation bots

Automation bots, such as dependency updaters and release bots, are not AI agents, and their activity is not relevant to AI Impact. Identifying a bot prevents its activity from affecting your AI Impact metrics.

To detect automation bot-authored commits and PRs, enable automatic bot detection (for GitHub) and define custom mapping rules in Delivery Performance general settings.

Further Reading