Skip to main content

Extract APM metrics from DataDog

Project description

DDPaw CLI Tool

Description

ddpaw is a command-line tool for extracting, visualizing, and analyzing metrics from Datadog's Application Performance Monitoring (APM) service based on a query. It provides a set of commands to help you manage and interact with metrics data.

Table of Contents

[TOC]

Installation

pip install --no-cache-dir ddpaw

Usage

ddpaw provides several commands to interact with Datadog metrics

ddpaw <command> [options]

Set up your DataDog API credentials by creating a .env file in the project root directory:

API_KEY=your-api-key
APP_KEY=your-app-key

Commands

export

Export metrics data based on the given query and time range.

Options
  • -s, --start_at: The start time of the time range (required).
  • -e, --end_at: The end time of the time range (required).
  • -q, --query: The query to retrieve metrics data (required).
  • --format: The format of the data (choices: csv, json).
  • --all-response: Flag indicating whether to include all response data.
  • -v, --verbose: Flag indicating whether to display verbose output.
Example
ddpaw export -s 2024-04-05T12:00:00 -e 2024-04-05T17:30:00 \
						 -q "sum:trace.fastapi.request.hits{env:prod,service:d2api-api} by {version}.as_rate()" \
						 --format=csv

visualize

Visualize metrics data based on the given query and time range.

Options
  • -s, --start_at: The start time of the time range (required).
  • -e, --end_at: The end time of the time range (required).
  • -q, --query: The query to retrieve metrics data (required).
  • -v, --verbose: Flag indicating whether to display verbose output.
Example
ddpaw visualize -s 2024-04-05T12:00:00 -e 2024-04-05T17:30:00 \
							  -q "sum:trace.fastapi.request.hits{env:prod,service:d2api-api} by {version}.as_rate()"

analyze

Analyze metrics data based on the given query and time range.

Options
  • -s, --start_at: The start time of the time range (required).
  • -e, --end_at: The end time of the time range (required).
  • -q, --query: The query to retrieve metrics data (required).
  • -v, --verbose: Flag indicating whether to display verbose output.
Example
ddpaw analyze -s 2024-04-05T12:00:00 -e 2024-04-05T17:30:00 \
							-q "sum:trace.fastapi.request.hits{env:prod,service:d2api-api} by {version}.as_rate()"

Completions

Generate shell completions for ddpaw.

Arguments

  • shell: The shell type (choices: bash, zsh, fish).

For example:

ddpaw completions bash

Contributing

Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ddpaw-0.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

ddpaw-0.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file ddpaw-0.1.1.tar.gz.

File metadata

  • Download URL: ddpaw-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for ddpaw-0.1.1.tar.gz
Algorithm Hash digest
SHA256 57fc90ab91a6b389a31557fb35799d3a724376da240f291b9c80ce9efd72c586
MD5 0705e9bee207fe38262bd7008d61fc48
BLAKE2b-256 4bf991646c8b95b2cd664e68c4a5fdf1805fab2b0948f1f15c20b937cf7f480b

See more details on using hashes here.

File details

Details for the file ddpaw-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ddpaw-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for ddpaw-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f07fde50a3961c47a3edf4c32845f9c6f6dc7259ebb25856fb6dbefd0e86d886
MD5 8444d01fd99a396425ffccfd8da08f8c
BLAKE2b-256 9e67f56365df8b3c8910d1e2c40f5ae00743e7661f2c07f77f183a6eaeae859d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page