dd-apm

APM - traces, services, dependencies, performance analysis.

15 stars

Best use case

dd-apm is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

APM - traces, services, dependencies, performance analysis.

Teams using dd-apm should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/dd-apm/SKILL.md --create-dirs "https://raw.githubusercontent.com/sushichan044/dotfiles/main/.agents/skills/dd-apm/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/dd-apm/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How dd-apm Compares

Feature / Agentdd-apmStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

APM - traces, services, dependencies, performance analysis.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Datadog APM

Distributed tracing, service maps, and performance analysis.

## Requirements

Datadog Labs Pup should be installed via:

```bash
go install github.com/datadog-labs/pup@latest
```

## Quick Start

```bash
pup auth login
pup apm services list
pup apm traces list --service api-gateway --duration 1h
```

## Services

### List Services

```bash
pup apm services list
pup apm services list --env production
```

### Service Details

```bash
pup apm services get api-gateway --json
```

### Service Map

```bash
# View dependencies
pup apm service-map --service api-gateway --json
```

## Traces

### Search Traces

```bash
# By service
pup apm traces list --service api-gateway --duration 1h

# Errors only
pup apm traces list --service api-gateway --status error

# Slow traces (>1s)
pup apm traces list --service api-gateway --min-duration 1000ms

# With specific tag
pup apm traces list --query "@http.url:/api/users"
```

### Get Trace Detail

```bash
pup apm traces get <trace_id> --json
```

## Key Metrics

| Metric                        | What It Measures  |
| ----------------------------- | ----------------- |
| `trace.http.request.hits`     | Request count     |
| `trace.http.request.duration` | Latency           |
| `trace.http.request.errors`   | Error count       |
| `trace.http.request.apdex`    | User satisfaction |

## ⚠️ Trace Sampling

**Not all traces are kept.** Understand sampling:

| Mode           | What's Kept             |
| -------------- | ----------------------- |
| **Head-based** | Random % at start       |
| **Error/Slow** | All errors, slow traces |
| **Retention**  | What's indexed (billed) |

```bash
# Check retention filters
pup apm retention-filters list
```

### Trace Retention Costs

| Retention      | Cost            |
| -------------- | --------------- |
| Indexed spans  | $$$ per million |
| Ingested spans | $ per million   |

**Best practice:** Only index what you need for search.

## Service Level Objectives

Link APM to SLOs:

```bash
pup slos create \
  --name "API Latency p99 < 200ms" \
  --type metric \
  --numerator "sum:trace.http.request.hits{service:api,@duration:<200000000}" \
  --denominator "sum:trace.http.request.hits{service:api}" \
  --target 99.0
```

## Common Queries

| Goal              | Query                                                               |
| ----------------- | ------------------------------------------------------------------- |
| Slowest endpoints | `avg:trace.http.request.duration{*} by {resource_name}`             |
| Error rate        | `sum:trace.http.request.errors{*} / sum:trace.http.request.hits{*}` |
| Throughput        | `sum:trace.http.request.hits{*}.as_rate()`                          |

## Troubleshooting

| Problem           | Fix                                            |
| ----------------- | ---------------------------------------------- |
| No traces         | Check ddtrace installed, DD_TRACE_ENABLED=true |
| Missing service   | Verify DD_SERVICE env var                      |
| Traces not linked | Check trace headers propagated                 |
| High cardinality  | Don't tag with user_id/request_id              |

## References/Docs

- [APM Setup](https://docs.datadoghq.com/tracing/)
- [Trace Search](https://docs.datadoghq.com/tracing/trace_explorer/)
- [Retention Filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/)

Related Skills

typescript-performance

15
from sushichan044/dotfiles

Comprehensive TypeScript performance analysis and optimization. Use when users report slow TypeScript compilation, slow editor experience, or want to investigate TypeScript performance issues. This skill provides diagnostic tools, trace analysis workflows, and optimization strategies. Key triggers include mentions of slow builds, type-checking delays, tsc performance, editor lag with TypeScript, or requests to analyze/improve TypeScript performance. Always prioritize data-driven analysis using --extendedDiagnostics, --generateTrace, and TS Server logs before making optimization recommendations.

watch-ci

15
from sushichan044/dotfiles

CI を監視し、失敗したら自律的に修正してパスするまでループするスキル。push 後・PR 作成後・rebase 後に CI が通るか確認したいとき、CI が落ちていたら直してほしいとき、CI の結果を待ちたいときに使う。「CI 監視して」「CI が通るまで待って」「CI 直して」「push したので CI を見ておいて」など、CI の状態確認・自動修正が必要な場面では必ずこのスキルを呼び出すこと。

vue-style-guide

15
from sushichan044/dotfiles

Vue を書くときは基本的に参考にしてください。 個人的に気に入っている ubgeeei 氏の Vue.js のスタイルガイドです。

vitess

15
from sushichan044/dotfiles

Vitess best practices, query optimization, and connection troubleshooting for PlanetScale Vitess databases. Load when working with Vitess databases, sharding, VSchema configuration, keyspace management, or MySQL scaling issues.

triage-pr-reviews

15
from sushichan044/dotfiles

Triages unresolved PR review comments using gh-pr-reviews. Analyzes code context and classifies each comment as Agree / Partially Agree / Disagree. Walks through each comment one-by-one, asking the user what action to take. Use when the user wants to triage, review, or analyze unresolved PR comments.

terraform-test

15
from sushichan044/dotfiles

Comprehensive guide for writing and running Terraform tests. Use when creating test files (.tftest.hcl), writing test scenarios with run blocks, validating infrastructure behavior with assertions, mocking providers and data sources, testing module outputs and resource configurations, or troubleshooting Terraform test syntax and execution.

terraform-style-guide

15
from sushichan044/dotfiles

Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.

terraform-stacks

15
from sushichan044/dotfiles

Comprehensive guide for working with HashiCorp Terraform Stacks. Use when creating, modifying, or validating Terraform Stack configurations (.tfcomponent.hcl, .tfdeploy.hcl files), working with stack components and deployments from local modules, public registry, or private registry sources, managing multi-region or multi-environment infrastructure, or troubleshooting Terraform Stacks syntax and structure.

teach-impeccable

15
from sushichan044/dotfiles

One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.

stacked-pr

15
from sushichan044/dotfiles

依存関係のある複数の PR を管理・同期するためのスキル。stacked PR のカスケード rebase、PR 間の依存検出、base branch 管理、CI の上流優先修正を行う。PR が別の PR に依存している状況全般で使う — cascade rebase、スタック sync、依存先 PR 更新後のメンテ、PR チェーンの整合性確認などをするときなど。

smart-compact

15
from sushichan044/dotfiles

セッションのコンテキストを分析し、重要な情報を保持するためのプロンプトを生成して /compact コマンドの実行を支援するスキル。コンテキストウィンドウが逼迫してきた時や、セッションを整理したい時に使用。

skill-creator

15
from sushichan044/dotfiles

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.