A Claude Code plugin that helps your agent add high-quality logs, metrics, and traces to source code.
Coding agents struggle to add useful and well-structured observability to source code. This plugin hooks into your Claude Code session to surface Datadog telemetry best practices while your agent works. At session start and on relevant file edits, it nudges the agent to fetch relevant observability guidance and to apply it when planning features or implementing tasks.
- Claude Code with plugin support
- Python 3.10+ (standard library only -- no third-party dependencies)
- A Datadog account: your Datadog site and an API/Application key pair, used to fetch telemetry guidance. The Application Key should have
Datadog Standard Roleas its Owner Role - The
gitCLI available onPATH - The
claudeCLI available onPATH(needed if you enable on-commit telemetry review)
Add the marketplace and install the plugin, filling in your Datadog site/credentials:
claude plugin marketplace add datadog-labs/datadog-code-analysis
claude plugin install datadog-code-analysis@datadog-code-analysis \
--config dd_site=<your datadog site e.g. datadoghq.com> \
--config dd_api_key=<your-api-key> \
--config dd_app_key=<your-app-key> \
--config enable_on_commit_telemetry_review=<true or false> \
--config enable_datadog_resource_suggestions=<true or false>Or install interactively from within a Claude Code session:
/plugin marketplace add datadog-labs/datadog-code-analysis
/plugin install datadog-code-analysis@datadog-code-analysis
Auto-updates: Enable auto-update so Claude Code automatically picks up plugin improvements. Run /plugin, select the Marketplaces tab, select datadog-code-analysis, then select Enable auto-update.
Once installed, the plugin runs automatically in the background during your Claude Code sessions -- there's nothing to invoke directly. If you've configured on commit telemetry review or datadog resource suggestions:
- On-commit telemetry review: after each commit, reviews the diff against Datadog guidance and reports any observability gaps back into your session as suggestions.
- Datadog resource suggestions: after a commit that adds telemetry for a new feature, nudges the agent to offer creating a supporting Datadog Notebook.
The plugin sends basic usage telemetry events back to Datadog. No code content, session content, or user identifiers are sent:
- Session Started -- Emitted once at the start of a session
- Coding Session Started -- Emitted at most once per session when the agent updates a coding file
- Edit Nudge Fired -- Emitted at most once per session if the agent was reminded to consider listing telemetry best practices after a file edit
- Skills Listed -- Emitted when the agent lists telemetry best practices
- Skills Loaded -- Emitted when the agent loads telemetry best practices
- Agent Feedback -- Emitted at most once per session for each loaded best practice; the agent reports whether the best practice was useful
- Reviewer Ran -- (If applicable) Emitted at most once per session after the on-commit telemetry reviewer runs
- Agent Review Feedback -- (If applicable) Emitted at most once per session; the agent reports whether the review findings were addressed
- Datadog Resource Creation Nudge Fired -- (If applicable) Emitted at most once per session when the agent is nudged to offer to create a supporting Datadog resource (e.g. a Notebook)
Two feedback events (Agent Feedback, Agent Review Feedback) cost tokens since the main agent
is being asked to assess utility of guidance/reviews. The cost, however, is minimal since the feedback
is in the form of enums (yes/no, all/some/none).
All other feedback events are emitted automatically as side-effect of the plugin's hooks. These impose no token cost on your agent.
We welcome contributions. Please read CONTRIBUTING.md for guidelines on submitting issues and pull requests.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2026 Datadog, Inc.