Datadog Query Recipes
Use this skill for Langfuse production telemetry research where the main work is
finding the right Datadog data path. Keep findings evidence-based and include
the exact Datadog links or query shapes that support the answer.
Required Scope
Unless the user explicitly narrows the scope, cover every production
environment:
prod-us
prod-eu
prod-hipaa
prod-jp
Query both Datadog sites when needed. Default to the EU site for prod-eu and
the US site for the other prod environments, but verify with a small count or
facet query before concluding an environment has no data.
Before querying live Datadog, load the relevant Datadog MCP guidance for the
data domain you need: traces, logs, metrics, and visualizations.
Workflow
- Identify the entity and signal: tenant ID, org ID, project ID, route, queue,
service, error class, or metric.
- Read only the relevant reference:
- Prod environment/site routing:
references/environments.md
- Public API tenant or legacy endpoint usage:
references/public-api-tenant-usage.md
- Queue inventory, queue consumers, and queue metrics:
references/queue-consumers.md
- Scheduled-export freshness lag (blob / PostHog / Mixpanel):
references/export-freshness-lag.md
- Start with aggregate queries, grouped by environment, service, route,
queue, project, org, status, or error facets as appropriate.
- Fetch raw spans, logs, or traces only after aggregation identifies the
cluster or sample you need.
- For tenant-specific HTTP usage, prefer trace correlation over single-span
queries when tenant tags and route tags live on different spans.
- Report the windows, environments, sites, query links, and any sampling or
missing-data caveats.
When To Use Other Skills
- Use
debug-issue-with-datadog when a
Linear issue, GitHub issue, incident report, or monitor needs root-cause
analysis and patch recommendations.
- Use
weekly-production-review when
the user asks for a weekly engineering overview of production bugs, pages,
and incidents.
- Use
incident-alert-tickets when the
research is anchored to a named production alert or monitor: look up
documented causes before measuring, and record new ones only after human
approval.
- Use
linear-bug-triage only after a human
approves sharing measured findings in Linear.
Output Expectations
Summarize what was checked, including:
- Datadog site and
env values covered.
- Time windows.
- Core filters or metrics used.
- Count, rate, latency, queue depth, trace sample, or "No measurements found".
- Datadog links or trace IDs that let the human rerun the query.
1---
2name: datadog-query-recipes
3description: |
4 Research Langfuse production telemetry with reusable Datadog queries. Use for
5 tenant or project activity, API usage, queue behavior, spans, logs, metrics,
6 or ad hoc measurements across production regions; pair with
7 debug-issue-with-datadog for root-cause analysis.
8metadata:
9 source: https://skillmd.com/skills/langfuse/datadog-query-recipes
10---
11
12# Datadog Query Recipes
13
14Use this skill for Langfuse production telemetry research where the main work is
15finding the right Datadog data path. Keep findings evidence-based and include
16the exact Datadog links or query shapes that support the answer.
17
18## Required Scope
19
20Unless the user explicitly narrows the scope, cover every production
21environment:
22
23- `prod-us`
24- `prod-eu`
25- `prod-hipaa`
26- `prod-jp`
27
28Query both Datadog sites when needed. Default to the EU site for `prod-eu` and
29the US site for the other prod environments, but verify with a small count or
30facet query before concluding an environment has no data.
31
32Before querying live Datadog, load the relevant Datadog MCP guidance for the
33data domain you need: traces, logs, metrics, and visualizations.
34
35## Workflow
36
371. Identify the entity and signal: tenant ID, org ID, project ID, route, queue,
38 service, error class, or metric.
392. Read only the relevant reference:
40 - Prod environment/site routing:
41 [`references/environments.md`](references/environments.md)
42 - Public API tenant or legacy endpoint usage:
43 [`references/public-api-tenant-usage.md`](references/public-api-tenant-usage.md)
44 - Queue inventory, queue consumers, and queue metrics:
45 [`references/queue-consumers.md`](references/queue-consumers.md)
46 - Scheduled-export freshness lag (blob / PostHog / Mixpanel):
47 [`references/export-freshness-lag.md`](references/export-freshness-lag.md)
483. Start with aggregate queries, grouped by environment, service, route,
49 queue, project, org, status, or error facets as appropriate.
504. Fetch raw spans, logs, or traces only after aggregation identifies the
51 cluster or sample you need.
525. For tenant-specific HTTP usage, prefer trace correlation over single-span
53 queries when tenant tags and route tags live on different spans.
546. Report the windows, environments, sites, query links, and any sampling or
55 missing-data caveats.
56
57## When To Use Other Skills
58
59- Use [`debug-issue-with-datadog`](../debug-issue-with-datadog/SKILL.md) when a
60 Linear issue, GitHub issue, incident report, or monitor needs root-cause
61 analysis and patch recommendations.
62- Use [`weekly-production-review`](../weekly-production-review/SKILL.md) when
63 the user asks for a weekly engineering overview of production bugs, pages,
64 and incidents.
65- Use [`incident-alert-tickets`](../incident-alert-tickets/SKILL.md) when the
66 research is anchored to a named production alert or monitor: look up
67 documented causes before measuring, and record new ones only after human
68 approval.
69- Use [`linear-bug-triage`](../linear-bug-triage/SKILL.md) only after a human
70 approves sharing measured findings in Linear.
71
72## Output Expectations
73
74Summarize what was checked, including:
75
76- Datadog site and `env` values covered.
77- Time windows.
78- Core filters or metrics used.
79- Count, rate, latency, queue depth, trace sample, or "No measurements found".
80- Datadog links or trace IDs that let the human rerun the query.