Skip to main content

CLI tool to detect APM coverage (Datadog, OpenTelemetry)

Project description

๐Ÿ“ฆ apmcheck

apmcheck is a CLI tool that analyzes your source code and reports how many functions, endpoints or handlers are instrumented with APM (Application Performance Monitoring) โ€” supporting Datadog and OpenTelemetry.

It helps you identify tracing gaps across services, ensure observability coverage, and enforce best practices across all teams and languages.


๐ŸŽฏ Use Cases

  • โœ… Detect missing spans or trace decorators before production
  • โœ… Ensure APM coverage in new pull requests
  • โœ… Track APM adoption over time
  • โœ… Integrate into CI/CD pipelines (--min-coverage)
  • โœ… Audit large monoliths or microservices for observability

๐Ÿš€ Features

  • ๐ŸŒ Multivendor support: Datadog & OpenTelemetry
  • ๐Ÿง  Static code analysis (no runtime or instrumentation required)
  • ๐Ÿ“Š Coverage report: traced vs untraced functions
  • ๐Ÿ“‚ Per-file and total breakdown
  • ๐Ÿงช CI/CD compatible with --min-coverage=X
  • ๐Ÿ”Œ Extensible: Add custom rules, patterns, and APM SDKs
  • ๐Ÿ’ก Multilanguage support: Python, Node.js, Go, Java

๐Ÿ”ง Installation

Clone the repository and install locally:

git clone https://github.com/msalinas92/apmcheck.git  
cd apmcheck  
pip install -e .

Or install directly from PyPI (if published):

pip install apmcheck

You can now use the CLI:

apmcheck --help

๐ŸŒ Supported Languages

Language Datadog Supported OpenTelemetry Supported apmcheck Support
Python โœ… โœ… โœ…
Node.js โœ… โœ… โœ…
Go โœ… โœ… โœ…
Java โœ… โœ… โœ…
Ruby โœ… โœ… ๐Ÿ”œ Planned
PHP โœ… โœ… ๐Ÿ”œ Planned
.NET (C#) โœ… โœ… ๐Ÿ”œ Planned
C++ โœ… (partial) โœ… ๐Ÿ”œ Planned
Rust โŒ โœ… ๐Ÿ”œ Planned

More languages may be supported via plugin-based detectors.


๐Ÿงช Example Usage

Basic usage:

apmcheck ./src --language python --apm datadog

Sample output:

๐Ÿ“ฆ Project: ./src  
๐Ÿ” Language: Python  
๐Ÿ“ˆ APM Provider: Datadog

-------------------------------------------------------------------------
File                                                    Traced   Total   Coverage   Imports Traced   Inits Traced
users.py                                                3        4       75.0%      1               1
payments.py                                             5        5       100.0%     1               1
orders.py                                               1        6       16.7%      1               0

Total                                                   9        15      60.0%      3               2

CI mode with threshold:

apmcheck ./src --language go --apm opentelemetry --min-coverage 80

With webhook:

apmcheck ./src --language python --apm datadog --webhook https://my.webhook.url

๐Ÿง  How It Works

  1. Parses code using language-specific ASTs
  2. Detects functions, endpoints, or handlers
  3. Matches known APM patterns (decorators, wrappers, spans, etc.)
  4. Reports coverage and optionally fails CI if threshold not met
  5. Can send the report to a webhook (JSON)

๐Ÿ› ๏ธ Roadmap

  • Add support for Java, Go, Node.js and Python
  • Dynamic mode (compare traced runtime vs statically detected functions)
  • GitHub/GitLab PR check integration
  • Visual dashboard of APM coverage per service

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.


๐Ÿ“„ License

Apache 2.0 License. See LICENSE for details.

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

apmcheck-0.1.3.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apmcheck-0.1.3-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file apmcheck-0.1.3.tar.gz.

File metadata

  • Download URL: apmcheck-0.1.3.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for apmcheck-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ddae49e76287bb7c77ed2bf6b199ca6359d35b6a95b47b35ff75fee42fdc715f
MD5 076ca5fa0aac9c8e6e8d162da3be3798
BLAKE2b-256 b8eb57442ed07450e6d13ab2eb04389c1ec6e496f6183628d2e123b87464ee39

See more details on using hashes here.

File details

Details for the file apmcheck-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: apmcheck-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for apmcheck-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 46a789a5c40a3dc3b754e35ab429a152f2e1cca64e013b90afebeb229a2aa1cd
MD5 ffe2db63cdeac514e3aa1dd1aac506fd
BLAKE2b-256 97d38cd88baff095d7b78e940243383925ab31e0899040dd7d5730d00d4b12f2

See more details on using hashes here.

Supported by

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