Agent skill

dd-apm

APM - traces, services, dependencies, performance analysis.

Stars 15
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/sushichan044/dotfiles/tree/main/.agents/skills/dd-apm

Metadata

Additional technical details for this skill

tags
datadog,apm,tracing,performance,distributed-tracing,dd-apm
globs
**/ddtrace*,**/datadog*.yaml,**/*trace*
author
datadog-labs
version
1.0.0
alwaysApply
false

SKILL.md

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

Expand your agent's capabilities with these related and highly-rated skills.

sushichan044/dotfiles

terraform-style-guide

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

15 0
Explore
sushichan044/dotfiles

fix-github-actions-ci

GitHub Actions CI の失敗を調査して修正するためのスキルです。CI ログを分析して失敗箇所・原因を特定し、そのまま修正作業まで行います。

15 0
Explore
sushichan044/dotfiles

dd-logs

Log management - search, pipelines, archives, and cost control.

15 0
Explore
sushichan044/dotfiles

golang-safety

Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use whenever writing or reviewing Go code that involves nil-prone types (pointers, interfaces, maps, slices, channels), numeric conversions, resource lifecycle (defer in loops), or defensive copying. Also triggers on questions about nil panics, append aliasing, map concurrent access, float comparison, or zero-value design.

15 0
Explore
sushichan044/dotfiles

resolve-merge-conflict

現在の branch を分岐元の最新に rebase するときに使う。まず rebase を実行し、止まった conflict を順番に解消して前に進める。長い事前調査を避けて、必要な file だけ見て片付けたいときに使う。

15 0
Explore
sushichan044/dotfiles

golang-data-structures

Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container/ packages, unsafe or weak pointers, or questioning slice/map internals.

15 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results