
Debug Issue with Datadog
FreeInvestigate production issues using Datadog telemetry.
Free · Opens the source repo
What Debug Issue with Datadog does
The Debug Issue with Datadog skill is designed for developers and engineers who need to perform in-depth investigations into production issues. This skill integrates Datadog telemetry with the Langfuse repository to help identify the root causes of reported problems, whether they come from user feedback, GitHub issues, or monitoring alerts. Instead of focusing on implementing fixes, this skill emphasizes understanding the underlying issues, making it an essential tool for triaging and analyzing incidents.
When using this skill, the workflow begins with gathering all relevant information from the issue report, including comments and updates. This initial intake phase is crucial as it sets the stage for a targeted analysis. Following this, users scope the investigation to specific subsystems and timeframes, using the provided references to guide their Datadog queries. The skill encourages a systematic approach, ensuring that all relevant data is considered before jumping to conclusions or suggested patches.
The analysis produced by this skill is structured and detailed, providing insights into error clusters and their potential causes. It maps these clusters back to specific code sections, allowing developers to understand where the issues lie. The final output includes not only the findings but also suggested patches categorized by priority, making it easier for teams to address the most critical issues first. The skill is particularly useful for those working with Datadog and Langfuse, as it leverages existing telemetry and documentation to streamline the debugging process.
This skill is ideal for on-call engineers, support teams, and developers involved in incident management. It provides a clear methodology for investigating complex issues and helps ensure that the right questions are asked and answered before any code changes are made.
When to use it
Use this skill when you need to investigate a production issue reported by users or monitoring systems.
When not to use it
This skill is not suitable for implementing fixes; use it only for analysis and triage of issues.
What you can build with it
Investigating a User Report
A user reports a production error, and you use this skill to analyze the issue and determine its root cause.
Triage a GitHub Issue
A GitHub issue describes an incident; you apply this skill to gather data and understand the problem before addressing it.
Monitor Alert Analysis
After receiving a monitor alert, you utilize this skill to investigate the underlying issues and decide on necessary actions.
How to install Debug Issue with Datadog
View source1. Install with the skills CLI
npx skills add langfuse/langfuse/debug-issue-with-datadog --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by langfuseDebug Issue with Datadog
Use this skill whenever the task is investigative rather than implementational: a user, customer, or oncall has surfaced a problem and you need to figure out what is actually happening in production and where in the code it lives. The deliverable is an analysis, not a patch — though the analysis should make the right patch obvious.
When to Apply
- A Linear issue (typically with an
LFE-XXXXID) describes a production failure, error spike, or customer report. - A GitHub issue or pasted incident/error report needs triage.
- A monitor alerted and you need to understand why before deciding what to fix.
- Existing tickets under the "Make monitoring useful again" project (parent
LFE-8837) and similar — these expect the structured analysis output below.
If the task is "implement this fix" rather than "figure out what's broken",
this is the wrong skill — go to backend-dev-guidelines or the relevant
package guide.
Workflow
Read the inputs first, then plan the Datadog sweep, then read the code, then write the analysis. Do not skip ahead to suggested patches before the data supports them.
-
Intake. Pull every signal already available in the report. See
references/intake.md. For a Linear URL/ID, fetch the issue and its comments via the Linear MCP — the description is often updated inline as triage proceeds. For a GitHub issue, usegh issue view. For pasted text, treat it as the description. If intake contains an alert identity (a Datadog monitor ID or title, an incident.io alert/INC reference, or an on-call page), first applyincident-alert-tickets— a documented cause section may resolve the investigation before any sweep. -
Scope the sweep. From the intake, pick the affected subsystem and time window. Use
references/repo-debug-map.mdto translate "PostHog integration", "ingestion failures", "evals stuck", etc. into the Datadog filters and source files you should be looking at. -
Run the broad Datadog sweep. Default to the full sweep in
references/datadog-playbook.md: APM spans, error logs, metrics, and monitors — split acrossprod-euandprod-us(andprod-hipaa/prod-jpwhen relevant). Always check regional disparity first; it usually rules whole hypotheses in or out. Usedatadog-query-recipesfor reusable tenant, public API, queue consumer, and cross-environment query shapes. -
Cluster the errors. Group by
(projectId, error.message)or(error.type, error.message). Treat each distinct cluster as its own hypothesis — Langfuse incidents commonly have multiple coexisting root causes, not one. -
Map clusters to code. For each cluster, open the relevant handler file from the repo-debug map and read enough of it to confirm or refute the hypothesis. Cite specific files and line ranges in the output.
-
Write the analysis using
references/output-template.md. -
Deliver. Default: print the analysis in chat. If the user asked for it, also save under the workflow they specified (file, Linear comment via, etc.). If the investigation was anchored to an alert identity, also offer the human-gated write-back from
incident-alert-tickets: append the established root cause as a dated cause section, or create the monitor's ticket.
Datadog MCP Usage Notes
Two Datadog MCP servers are typically available — one bound to the EU site
(datadoghq.eu) and one to the US site (datadoghq.com). Always run
region-relevant queries against both unless intake clearly localizes the
incident. The prod-eu / prod-us env tags live on each side respectively.
- Span search filter pattern:
service:worker resource_name:"process posthog-integration-project" status:error - Log search filter pattern:
service:worker env:prod-eu @langfuse.project.id:cm1r6u… status:error - For high-volume queries, prefer
aggregate_spans/aggregate_eventsgrouped by(error.message, projectId)over fetching individual traces. - Always link to the Datadog UI for the queries you ran (final section of the output template).
See references/datadog-playbook.md for the
full set of starter queries and parameter shapes.
Output Expectations
From the output template:
- Header: data source, time window, region split (EU vs US table).
- Hotspots: per-
projectId(or per-cluster) error counts. - Root cause by error class: each cluster gets a short hypothesis with reasoning, distinguishing primary causes from symptoms.
- Suggested patches: P0/P1/P2 grouped, with concrete file paths and short code
sketches. Reference the actual handler in
worker/src/features/**orweb/src/**. - Dashboards: paste the Datadog query URLs at the end.
Findings come first, recommendations last. If the data is thin, say so explicitly and propose what would need to be true to confirm each hypothesis — do not invent root causes.
Cross-References
- Per-monitor knowledge base — look up documented causes before the sweep,
record new ones after (human-gated):
incident-alert-tickets - Production telemetry query recipes, tenant/public API usage, and queue
consumer measurements:
datadog-query-recipes - Backend layout, queue contracts, instrumentation patterns:
backend-dev-guidelines - ClickHouse-related findings (memory ceilings, JOIN spills, slow queries):
clickhouse-best-practices - Once a fix is identified and you switch to implementation, hand off to the
package
AGENTS.mdfor the affected directory.
Frequently asked questions about Debug Issue with Datadog
Similar skills
Agent Host Debug Logs
Analyze Agent Host debug logs for deeper insights.
Code OSS Dev - Launch + Debug
Launch and debug Code OSS with isolated profiles.
Phoenix CLI
Debug LLM applications with structured analysis tools.
Power Automate Debugging
Diagnose and fix Power Automate flow errors effectively.
Arize Trace
Inspect and export traces for LLM applications.
Runtime Behavior Probe
Investigate real runtime behavior with precision.
