Skip to main content

Utilities for auditing Python and Node.js repositories for observability-related instrumentation and integrations.

Project description

jps-observability-utils

Utilities for auditing Python and Node.js repositories for evidence of observability-related instrumentation, telemetry configuration, monitoring components, and integrations with common observability platforms.

Overview

jps-observability-utils is a Python CLI package that performs static repository scans and generates observability audit reports.

The initial version is designed for legacy codebase assessment, onboarding, and engineering due diligence. It helps identify evidence of technologies such as OpenTelemetry, Prometheus, Datadog, New Relic, Sentry, Elastic APM, collector configuration, metrics endpoints, and structured logging patterns.

The package is intentionally evidence-based. It does not claim runtime certainty. It reports what the repository contents suggest.

Initial Scope

The initial release includes two Typer-based CLI commands:

  • audit-python — scan a Python repository
  • audit-node — scan a Node.js repository

Each command generates a human-readable Markdown report and a machine-readable JSON report.

What the Tool Detects

The scanners look for evidence of observability-related instrumentation and integrations, including:

  • telemetry instrumentation libraries
  • OpenTelemetry SDKs, exporters, and environment variables
  • Prometheus client libraries and /metrics patterns
  • vendor-specific observability platforms such as Datadog, New Relic, Sentry, and Elastic APM
  • collector / exporter configuration
  • deployment and environment configuration relevant to telemetry
  • structured logging patterns relevant to observability

What the Tool Does Not Do

This project does not, in its initial version:

  • execute code
  • validate runtime telemetry emission
  • prove that observability is functioning in production
  • modify the target repository
  • auto-remediate missing instrumentation

Why This Tool Exists

Legacy repositories often contain partial, inconsistent, or undocumented observability setups. Engineers reviewing a codebase typically need fast answers to questions such as:

  • Does this project appear to use OpenTelemetry?
  • Is Prometheus instrumentation present?
  • Is there evidence of Datadog or New Relic integration?
  • Are telemetry environment variables configured?
  • Is there collector or OTLP configuration in the repo?
  • Are there signs of structured logging or metrics endpoints?

This tool is intended to reduce manual grep-heavy investigation.

Proposed CLI Usage

Examples:

jps-observability-utils audit-python /path/to/python-repo --format both --output-dir ./reports
jps-observability-utils audit-node /path/to/node-repo --format both --output-dir ./reports

Possible options may include:

  • --output-dir
  • --format [md|json|both]
  • --ignore PATTERN
  • --verbose

Expected Report Content

Each report should include:

  • scan metadata
  • repository path
  • number of files scanned
  • summary of detected technologies
  • findings grouped by category
  • confidence level for each finding
  • file paths and evidence locations
  • caveats explaining that the audit is static and heuristic-based

Confidence Model

A simple confidence model is recommended:

  • High — strong evidence such as dependency + initialization code or env vars + exporter configuration
  • Medium — partial but meaningful evidence such as dependency presence without clear initialization
  • Low — weak or indirect evidence only

Suggested MVP Detection Targets

Python repositories

  • OpenTelemetry
  • Prometheus
  • Datadog
  • New Relic
  • Sentry
  • Elastic APM
  • collector / OTLP config
  • structured logging indicators

Node.js repositories

  • OpenTelemetry
  • Prometheus
  • Datadog
  • New Relic
  • Sentry
  • Elastic APM
  • collector / OTLP config
  • structured logging indicators

Recommended Package Structure

src/jps_observability_utils/
├── cli.py
├── constants.py
├── models.py
├── scanner.py
├── report_writer.py
├── matchers/
│   ├── common.py
│   ├── python_repo.py
│   └── node_repo.py
└── utils/
    ├── file_utils.py
    └── text_utils.py

Design Principles

  • static evidence detection, not runtime proof
  • clear and conservative language
  • modular detection rules
  • stable JSON output
  • easy extensibility for additional technologies and languages

Example GitHub Project Description

Utilities for auditing Python and Node.js repositories for observability-related instrumentation and integrations.

Development Notes

Recommended implementation choices:

  • Python 3.11+
  • Typer for CLI
  • pathlib for filesystem traversal
  • dataclasses or Pydantic for report models
  • pytest for testing

Testing Strategy

The test suite should include small fixture repositories representing:

  • positive OpenTelemetry detection
  • Prometheus-only detection
  • vendor-specific APM detection
  • no observability evidence
  • mixed evidence across code and deployment files

Future Enhancements

Potential future additions:

  • unified audit-repo command with language auto-detection
  • HTML reports
  • SARIF output
  • maturity scoring
  • custom rule packs
  • support for additional languages

Status

This repository is intended to start with two focused audit utilities and expand over time as the detection catalog matures.

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

jps_observability_utils-0.2.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

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

jps_observability_utils-0.2.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file jps_observability_utils-0.2.0.tar.gz.

File metadata

  • Download URL: jps_observability_utils-0.2.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for jps_observability_utils-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b1b89100133a8f1e054cc041c2870a897410316c0f6d599a6fd3d0853275d8f3
MD5 3eafd9ee048a05b63cf79eaae17f7e85
BLAKE2b-256 b5c106bcc64c08bf1a3002c2f923376f7d7eb631471d89196c4d32e69c6edca4

See more details on using hashes here.

File details

Details for the file jps_observability_utils-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jps_observability_utils-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f23105d17a169f684e604efcf15c6951029d026f304ae2962c03395634ac146
MD5 9e62a9e682f81ae0fd6608ba6a873ffe
BLAKE2b-256 4a25d7eaa12d25c222f76334d44daec19e6d3f0f3007a8a17794f9a722f5aab9

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