Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Shopify Engineering 4 min read How-to mediumAdept

How to Export Datadog Metrics for Exploration in Jupyter Notebooks

Datadog dashboards aggregate metrics more coarsely as the time window grows (e.g. 1-second points over 15 minutes become 2-hour points over 30 days), hiding short-lived events and limiting statistical analysis. To get full-granularity data, query the Datadog REST API from Python with an API key and APP key, split the start–stop range into time_delta buckets, call the API per bucket, and concatenate the results into a pandas DataFrame. The data can then be explored in Jupyter, for example as seaborn KDE plots of CPU utilization. If you hit Datadog's API rate limits, increase time_delta so fewer requests are made.

Related posts

  • What's new in ClickStack. September '25.

    ClickHouse mediumAdept

    ClickStack's September 2025 release adds JSON dashboard import/export in HyperDX, custom aggregations through any ClickHouse aggregate function (e.g. stddevPop), and user-supplied OTel Collector YAML. That YAML is merged with the OpAMP-managed base config by mounting it at /etc/otelcol-contrib/custom.config.yaml, for example to add hostmetrics and filelog receivers. Search queries are now split into time-window chunks executed newest-first, with remaining chunks canceled once enough results are found. A Prometheus-style delta() for gauge metrics extrapolates each window's first-to-last difference to the full bucket duration before aggregating across series.

  • Migrate Datadog telemetry with the OpenTelemetry Collector

    ClickHouse mediumAdept

    The OpenTelemetry Collector's Datadog receiver lets existing Datadog agents and SDKs send logs, traces and metrics to a Collector. The Collector translates them into the OpenTelemetry data model, and they can then be exported to any backend or dual-written alongside Datadog for side-by-side evaluation. ClickHouse contributed fixes upstream: proper log timestamps and severity mapping, promotion of resource attributes, reconstruction of 128-bit trace IDs for log-trace correlation, in-Collector JSON log decoding, and Zstandard support for Datadog Agent 7.59+. A worked example points a Datadog agent's datadog.yaml at ClickStack's Collector on port 8126. The receiver is still alpha: it is recommended for evaluating logs and traces, while metrics support covers only the v1/v2 intake endpoints and needs more testing.

  • How we built the Datadog heatmap to visualize distributions over time at arbitrary scale

    Datadog Engineering mediumAdept

    Datadog's heatmap visualizes DDSketch-backed distribution metrics over time, revealing multimodal behavior (such as pulsing benchmark traffic or health-check modes) that percentile lines hide. The frontend receives a constant-size payload of float32 bin counts with shared, explicitly stored bucket boundaries. Time buckets must align to the data's reporting interval to avoid aliasing. Because counts often follow power-law distributions, the color scale is a heuristic blend of linear and histogram-equalized (percentile) interpolation, so both a dominant narrow mode and faint secondary modes stay visible. Rendering switches to per-pixel canvas ImageData instead of per-bin fillRect above roughly 4 raw pixels per bin, and a coarser, size-relative grid drives mouse interactions and tooltips.

  • Shifting Metrics Right

    Honeycomb mediumAdept

    Instead of pre-aggregating metrics inside applications, generate them as late as responsibly possible in the telemetry pipeline, either in the OpenTelemetry Collector or in the backend from traces and logs. The argument separates measurements (questions you want answered) from metrics (a pre-aggregated storage type). It claims the accuracy loss from sampling is negligible: one customer's sampled, trace-derived metrics were within 0.001% of their pre-aggregated data at a fraction of the cost. In-app aggregation buffers data for 10 to 60 seconds and can silently lose datapoints on a crash. A signaltometrics connector config shows how to derive HTTP semantic-convention exponential histograms from spans using AdjustedCount to account for sampling.

  • Monitor your ClickHouse Cloud services with the new Prometheus/Grafana Mix-in

    ClickHouse mediumAdept

    ClickHouse Cloud now offers a Prometheus/Grafana mix-in: a pre-built Grafana dashboard, nearly identical to ClickHouse's internal one, fed by the cloud API's Prometheus endpoint. That endpoint federates metrics from every service in an organization and handles stopped or idling services, which per-instance scraping of system tables cannot. Its `filtered_metrics` parameter trims the 1000+ available metrics to about 125 critical ones, cutting scrape cost and noise. Setup is a Prometheus scrape config with basic auth and `honor_labels: true`, then importing the dashboard from Grafana.com or GitHub.

The quest for software engineering knowledge.

Look:
Layout: