Skip to content

feat(uniswap-integrations): add datadog-cost-tracker skill with gotchas - #544

Merged
wkoutre merged 5 commits into
nextfrom
feat/datadog-cost-tracker-gotchas
Jul 1, 2026
Merged

feat(uniswap-integrations): add datadog-cost-tracker skill with gotchas#544
wkoutre merged 5 commits into
nextfrom
feat/datadog-cost-tracker-gotchas

Conversation

@dylanschmittle-uniswap

@dylanschmittle-uniswap dylanschmittle-uniswap commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new datadog-cost-tracker skill to the uniswap-integrations plugin that guides future cost-analysis runs against Datadog estimated-usage metrics
  • Ships a references/gotchas.md file capturing two pitfalls discovered in a live cost-tracker session that produce silent empty results or misleading anomaly signals

Gotchas captured

Gotcha 1 — env:prod filter breaks Lambda/serverless log queries
datadog.estimated_usage.logs.ingested_bytes queried with env:prod returns empty for Lambda/serverless services like unirpc-v2 and notification-service because they don't emit that tag. Correct pattern: omit the env filter; verify the service tag exists via get_datadog_metric_context before trusting an empty result.

Gotcha 2 — Uniroute APM baseline invalid before 2026-05-14
PRs #7996, #7510, and #7998 (deployed 2026-05-14) changed uniroute to prefer DD_ENV over ENV/ENVIRONMENT, causing service:uniroute,env:prod ingested spans to jump 22x due to tag normalization — not traffic growth. Any pre-May-14 uniroute APM baseline must be marked INCONCLUSIVE rather than REGRESSION.

Test plan

  • Verify SKILL.md frontmatter parses correctly (description, allowed-tools, model fields present)
  • Verify gotchas.md is linked from SKILL.md Step 2
  • Verify plugin.json skills array includes ./skills/datadog-cost-tracker and version bumped to 2.5.0

Generated with Claude Code

https://claude.ai/code/session_01CaswXmq8Xotq8La9SNJrSy

Generated by Claude Code

AI-Generated Description

What

Adds a new datadog-cost-tracker skill to the uniswap-integrations plugin that guides cost-analysis runs against Datadog estimated-usage metrics (datadog.estimated_usage.logs.ingested_bytes, datadog.estimated_usage.apm.ingested_spans), broken down by service, flagging anomalous growth and reduction opportunities.
The skill ships a references/gotchas.md file capturing two pitfalls discovered in a live cost-tracker session that produce silent empty results or misleading anomaly signals, plus the standard plugin/marketplace wire-up.

Why

Cost-tracker runs against Datadog estimated-usage metrics are error-prone in two specific ways that silently corrupt the analysis. Both were hit during a real session, so they're codified as a gotchas.md reference the skill reads before trusting any empty or anomalous result:

  • env:prod filter breaks Lambda/serverless log queriesdatadog.estimated_usage.logs.ingested_bytes queried with env:prod returns empty for serverless services like unirpc-v2 and notification-service because they don't emit that tag. The filter silently drops their data rather than erroring. Correct pattern: omit the env filter and verify the tag exists on the metric before trusting an empty result.
  • Uniroute APM baseline invalid before 2026-05-14 — PRs #7996, #7510, and #7998 (deployed 2026-05-14) changed uniroute to prefer DD_ENV over ENV/ENVIRONMENT, consolidating service:uniroute,env:prod ingested spans into a ~22× jump from tag normalization, not traffic growth. Any comparison spanning that boundary must be marked INCONCLUSIVE rather than REGRESSION.

Changes

File Change
packages/plugins/uniswap-integrations/skills/datadog-cost-tracker/SKILL.md New skill (+49): frontmatter (description, allowed-tools, model: sonnet), a 7-step workflow that reads gotchas before querying, and a structured output format (Cost Summary / Top Ingesters / Anomalies / Inconclusive Comparisons / Recommendations)
packages/plugins/uniswap-integrations/skills/datadog-cost-tracker/references/gotchas.md New reference (+47): the two pitfalls above, each with symptom, root cause, and correct pattern
packages/plugins/uniswap-integrations/.claude-plugin/plugin.json Register ./skills/datadog-cost-tracker in the skills array; version 2.5.02.6.0
packages/plugins/uniswap-integrations/CLAUDE.md Add the skill to the component list and file-structure tree
packages/plugins/uniswap-integrations/README.md Add the datadog-cost-tracker row to the skills table (plus minor markdown-lint spacing fixes)
CLAUDE.md Bump uniswap-integrations row in the Current plugins table: 2.5.02.6.0
Total diff: +104 / -2 across 6 files.

Why minor (not patch)

A new user-invocable skill is a backward-compatible feature addition, which matches the minor-bump criteria in the root policy ("new skills, agents, commands, or MCP servers added").

Test plan

  • SKILL.md frontmatter parses (description, allowed-tools, model present)
  • gotchas.md is linked from SKILL.md (Step 2 and Notes)
  • plugin.json skills array includes ./skills/datadog-cost-tracker
  • Plugin CLAUDE.md + README.md list the new skill
  • plugin.json version (2.6.0) matches the Current plugins table row in root CLAUDE.md
  • CI green (plugin validation / lint / markdown-lint / typecheck)
  • Manual: /datadog-cost-tracker intent is discoverable after install

Follow-up

Per the repo docs policy, the Notion "Uniswap Claude Code Plugin Marketplace" doc should be updated to add this skill and bump the skill count. Happy to do this on request.

Captures two operational gotchas discovered during a Datadog cost-tracker
run so future runs avoid the same false-negative / false-positive traps:

1. env:prod filter silently drops Lambda/serverless services (unirpc-v2,
   notification-service) from estimated_usage.logs.ingested_bytes -- omit
   env filter and verify tag presence via get_datadog_metric_context.

2. Uniroute APM baseline is invalid before 2026-05-14 (PRs #7996/#7510/#7998
   normalised DD_ENV tag, causing a 22x apparent jump) -- mark pre/post
   comparisons as INCONCLUSIVE, not REGRESSION.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CaswXmq8Xotq8La9SNJrSy
@dylanschmittle-uniswap
dylanschmittle-uniswap requested a review from a team as a code owner June 30, 2026 00:28
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-toolkit-slack-oauth-backend Ready Ready Preview, Comment Jul 1, 2026 12:30am

Request Review

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Review complete

Review Summary

This PR adds a new datadog-cost-tracker skill to the uniswap-integrations plugin, plus the corresponding docs and version bump (2.5.0 → 2.6.0). All changes are markdown/JSON documentation and skill definitions — no executable code, so there are no bug, security, or data-loss surfaces to assess.

Version bump & plumbing

The changes are consistent and complete per the repo's conventions:

  • plugin.json version bumped to 2.6.0 and the new skill registered in the skills array (./skills/datadog-cost-tracker).
  • Root CLAUDE.md version table, plugin CLAUDE.md skill list + file structure, and README.md skill table all updated to reference the new skill.
  • The skills array entries remain alphabetically ordered and match the on-disk directory.

Previously-raised issue (resolved)

The prior review thread flagged three problems in SKILL.md. Verified against the current file, all are addressed:

  • SKILL.md:24 uses datadog.estimated_usage.apm.ingested_spans (span-ingestion, service-taggable) rather than the host-count apm_hosts.
  • The .apm. segment is present, so the metric name resolves rather than returning the empty result the skill is designed to catch.
  • No bare, unprefixed Datadog tool names remain — queries are described as "via the Datadog MCP server," matching the sibling investigate-incident pattern and the Task(mcp__datadog__*) grant.

The skill also builds in a self-check (step 3 instructs confirming exact metric names in the Metrics Explorer before trusting results), which is the right guard given estimated-usage metric names vary by integration setup.

Non-blocking observations

  • The plugin also ships a use-datadog skill that directs the agent to the pup CLI for Datadog tasks, whereas this skill and investigate-incident use the Datadog MCP server. Two coexisting access patterns is fine, but worth keeping in mind for future consistency.

No blocking issues found.


💡 Want a fresh review? Add a comment containing @request-claude-review to trigger a new review at any time.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check ✅

Verdict: Passed

Plugin version was properly bumped from 2.5.0 to 2.6.0 (minor bump for new skill addition). All relevant CLAUDE.md, README.md, plugin.json, and skill documentation files are updated in the PR.


PR #544 Documentation Review

Summary

PR #544 adds the datadog-cost-tracker skill to the uniswap-integrations plugin. All required documentation updates are present:

Check Status
Plugin version bumped (2.5.02.6.0) ✅ PASS
plugin.json skills array updated ✅ PASS
Root CLAUDE.md version table updated ✅ PASS
Plugin CLAUDE.md updated (skill list + directory tree) ✅ PASS
Plugin README.md skills table updated ✅ PASS
New SKILL.md created ✅ PASS
New references/gotchas.md created ✅ PASS
Changelog entry ℹ️ INFO — not blocking (fail_on_missing_docs: false)

The version bump type (minor: 2.5.02.6.0) is appropriate for a new skill addition per semver rules.

Missing Updates

Type File Severity Reason
📝 changelog packages/plugins/uniswap-integrations/CHANGELOG.md ℹ️ info No changelog entry for the addition of the datadog-cost-tracker skill. Informational only — fail_on_missing_docs is false.

Suggestions (1)

💡 Inline suggestions have been posted as review comments. Click "Commit suggestion" to apply each fix directly.

  • ℹ️ packages/plugins/uniswap-integrations/CLAUDE.md: No changelog entry exists for this feature addition. While not blocking (fail_on_missing_docs: false), a brief note improves maintainability for future contributors.

🤖 Generated by Claude Documentation Validator | Mode: suggest

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: COMMENT

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only. 1 inline comment(s) are attached below.

Comment thread packages/plugins/uniswap-integrations/skills/datadog-cost-tracker/SKILL.md Outdated

@wkoutre wkoutre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: independent code-reviewer pass confirms correct skills-array registration, correct 2.4.0→2.5.0 minor bump, valid references/gotchas.md path, and safe (read-only + scoped Datadog MCP) tool allowances. One non-blocking nit: SKILL.md cites datadog.estimated_usage.apm_hosts (a host-count metric) alongside ingested_spans (a volume metric) as if interchangeable — worth a follow-up tweak, not a blocker.

@wkoutre wkoutre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving after branch update (prior approval auto-dismissed on push). Independent code-reviewer verdict was READY TO MERGE; only a non-blocking Datadog metric-name nit at SKILL.md:24.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: REQUEST_CHANGES

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

wkoutre added 3 commits June 30, 2026 17:26
…ol names

- APM span ingestion metric: apm_hosts (host count, not service-tagged) removed;
  ingested_spans corrected to datadog.estimated_usage.apm.ingested_spans
- Replace bare unprefixed Datadog tool names with intent-based language via the
  Datadog MCP server, matching the sibling investigate-incident skill's pattern
- Note that estimated-usage metric names must be confirmed against the account's
  Metrics Explorer (querying a nonexistent name returns empty, not an error)

Addresses the automated review's blocking finding on PR #544.
…tracker

- Bump plugin 2.5.0 -> 2.6.0 (2.5.0 was taken by use-datadog in #432)
- Add datadog-cost-tracker to plugin README skills table, plugin CLAUDE.md
  skills list, and file-structure tree (the review's noted doc gaps)
@wkoutre

wkoutre commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Addressed the blocking review findings (commits 7e12647, 91423cf):

Metric / tool names (blocking)

  • Removed datadog.estimated_usage.apm_hosts (host-count dimension, not service-tagged for ingestion volume).
  • Corrected the APM span metric to datadog.estimated_usage.apm.ingested_spans (added the missing .apm. segment).
  • Replaced the bare, unprefixed tool names (search_datadog_metrics, get_datadog_metric, get_datadog_metric_context) with intent-based language via the Datadog MCP server, matching the investigate-incident skill's pattern.
  • Added an explicit instruction to confirm exact metric names in the account's Metrics Explorer, since a nonexistent name returns empty rather than erroring.

Docs (non-blocking)

Caveat: the corrected metric names follow the review's suggestion but were not verified against a live Datadog instance. @dylanschmittle-uniswap could you confirm datadog.estimated_usage.apm.ingested_spans and datadog.estimated_usage.logs.ingested_bytes resolve in Metrics Explorer before this ships.

@request-claude-review

@github-actions github-actions Bot changed the title feat(uniswap-integrations): add datadog-cost-tracker skill with env-filter and APM-baseline gotchas feat(uniswap-integrations): add datadog-cost-tracker skill with gotchas Jul 1, 2026
@github-actions
github-actions Bot dismissed their stale review July 1, 2026 00:30

Superseded by new review after PR update

github-actions[bot]
github-actions Bot previously approved these changes Jul 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: APPROVE

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

@wkoutre
wkoutre enabled auto-merge (squash) July 1, 2026 00:33
@github-actions
github-actions Bot dismissed their stale review July 1, 2026 00:33

Superseded by new review after PR update

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: APPROVE

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

@wkoutre
wkoutre merged commit c3aac3c into next Jul 1, 2026
20 checks passed
@wkoutre
wkoutre deleted the feat/datadog-cost-tracker-gotchas branch July 1, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants