What problem does it solve? Investigating production incidents in Datadog often leads to dumping raw logs without context, wasting time and missing root causes. This Skill enforces a statistics-first workflow that surfaces error rates, top patterns, and actionable recommendations before any log sampling. ## Core Features & Use Cases - Statistics-First Investigation: The get_statistics.py script aggregates log volume, error rates, status distribution, top services, and normalized error patterns as a mandatory first step. - Strategic Log Sampling: The sample_logs.py script supports errors_only, warnings_up, around_time, and all strategies for targeted log retrieval with time windows and limits. - Query Syntax Reference: Built-in Datadog Query Language (DQL) and metrics query syntax for filters, facets, aggregations, and APM percentiles. - Use Case: During an incident on the payment service, run get_statistics.py to see a 12% error rate and the top error pattern, then sample errors around the spike timestamp to identify the root cause. ## Quick Start Ask the agent to investigate errors in the payment service over the last hour using the Datadog statistics script.