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.
- ✅ 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
- 🌍 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
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
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.
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
- 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)
- 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
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Apache 2.0 License. See LICENSE for details.