---
title: "How to Export Datadog Metrics for Exploration in Jupyter Notebooks"
description: "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."
url: "https://swe.quest/articles/how-to-export-datadog-metrics-for-exploration-in-jupyter-notebooks-c6d7f453ea6de7b5"
canonical: "https://shopify.engineering/export-datadog-metrics-in-jupyter-notebooks"
source: "Shopify Engineering"
published: "2022-11-29"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["observability","python"]
---

# How to Export Datadog Metrics for Exploration in Jupyter Notebooks

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-11-29, 4 min read, How-to. Original: [https://shopify.engineering/export-datadog-metrics-in-jupyter-notebooks](https://shopify.engineering/export-datadog-metrics-in-jupyter-notebooks)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- Python and pandas basics ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- REST APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))

## Keywords

Datadog, Jupyter Notebooks, seaborn, pandas

## Related posts

- [What's new in ClickStack. September '25.](https://swe.quest/articles/what-s-new-in-clickstack-september-25-cea5d142df9ea015.md): ClickHouse · 2025-09-30 · Medium · 7 min read · Observability, Analytics & OLAP, Open source
  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.
- [Migrate Datadog telemetry with the OpenTelemetry Collector](https://swe.quest/articles/migrate-datadog-telemetry-with-the-opentelemetry-collector-3b921608bdac909d.md): ClickHouse · 2026-07-21 · Medium · 9 min read · Observability, Refactoring & migrations
  The OpenTelemetry Collector's Datadog receiver lets existing Datadog agents and SDKs send logs, traces and metrics to a Collector.
- [How we built the Datadog heatmap to visualize distributions over time at arbitrary scale](https://swe.quest/articles/how-we-built-the-datadog-heatmap-to-visualize-distributions-over-time-at-771a93f5eee96301.md): Datadog Engineering · 2024-05-01 · Medium · 13 min read · Observability, Frontend, Web performance, Data structures
  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.
- [Shifting Metrics Right](https://swe.quest/articles/shifting-metrics-right-9cd4911993cdce0d.md): Honeycomb · 2026-03-17 · Medium · 6 min read · Observability
  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.
- [Monitor your ClickHouse Cloud services with the new Prometheus/Grafana Mix-in](https://swe.quest/articles/monitor-your-clickhouse-cloud-services-with-the-new-prometheus-grafana-mix-in-d5de8c9f127ab682.md): ClickHouse · 2025-05-12 · Medium · 3 min read · Observability, Analytics & OLAP, Cloud platforms
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
