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
- Parses code using language-specific ASTs
- Detects functions, endpoints, or handlers
- Matches known APM patterns (decorators, wrappers, spans, etc.)
- Reports coverage and optionally fails CI if threshold not met
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddae49e76287bb7c77ed2bf6b199ca6359d35b6a95b47b35ff75fee42fdc715f
|
|
| MD5 |
076ca5fa0aac9c8e6e8d162da3be3798
|
|
| BLAKE2b-256 |
b8eb57442ed07450e6d13ab2eb04389c1ec6e496f6183628d2e123b87464ee39
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a789a5c40a3dc3b754e35ab429a152f2e1cca64e013b90afebeb229a2aa1cd
|
|
| MD5 |
ffe2db63cdeac514e3aa1dd1aac506fd
|
|
| BLAKE2b-256 |
97d38cd88baff095d7b78e940243383925ab31e0899040dd7d5730d00d4b12f2
|