Skip to content

Telemetry

telemetry is a reusable, schema-validated OpenTelemetry runtime for Python services and the source of the accompanying OpenTelemetry Collector profiles. It also provides a dependency-free telemetry.performance module for repeatable, Consumer-owned algorithm evaluation.

Consumers own the meaning of their telemetry: metric names and units, permitted dimensions, operation and event vocabularies, domain correlation, dashboards, alerts, and domain runbooks. This project owns process lifecycle, bounded OTLP export, context propagation, framework hooks, secret-safe configuration, the non-configurable safety floor, Collector delivery, and portable conformance tooling.

Quickstart

The authoritative development environment is Python 3.14.7 plus the locked uv dependency graph. From a fresh checkout:

make setup
make doctor
make test

To run the same non-Docker verification in an isolated container:

docker build --tag telemetry-validation .
docker run --rm telemetry-validation

This repository delivers a Python library and Collector configuration, not a long-running application, so it has no application start command or seeded database. An opt-in local Grafana backend is available for development; Docker-backed verification dependencies are otherwise created with synthetic data by make test-docker and removed after the run. The canonical deployment-variable template is collector/config.env.example; there is no application .env contract.

Commerce Recommendations consumes this checkout as an editable sibling source during development. Release and CI builds consume a wheel and validate it with sources disabled.

Commands

Command Purpose
make setup Install the locked development and optional-adapter environment
make doctor Diagnose required tools, the lock, interpreter, dependencies, and Docker availability
make lint Run Ruff
make type-check Run strict mypy
make docs-site Build and validate the documentation website
make test-focused TEST=tests/path.py::test_name Run one test, module, or node ID
make test Run all non-Docker static, unit, contract, and delivery checks
make smoke Build, install, and exercise the base wheel outside the source tree
make test-docker Validate Collector compositions and run local three-signal scenarios
make verify Run the complete local verification contract, including Docker
make local-grafana-up Start the local Collector and Grafana logs/metrics/traces backend
make local-grafana-down Stop the local Grafana backend while preserving its data volume

Command selection, fixtures, generated outputs, and failure reproduction are documented in docs/testing.md.

Consumer integration

A consumer defines a closed TelemetrySchema, constructs one TelemetryRuntime per process, and adapts its domain-owned telemetry interface to the runtime's generic Telemetry interface. Disabled configuration is side-effect free and does not import OpenTelemetry.

Consumer projects can evaluate model or algorithm quality and execution characteristics with PerformanceEvaluator, custom case-level or corpus-level Measurements, deterministic repetitions, baseline comparisons, and Assessment Rules. Reports omit case payloads and model outputs. See docs/performance-evaluation.md.

Collector profiles and their operational contract are documented in collector/README.md.

Architecture, ownership, integration, migration, and release contracts are documented in docs/architecture.md, docs/implementation-guide.md, docs/consumer-integration.md, docs/extraction-migration.md, and docs/verification-and-release.md. The tested cross-artifact tuple is recorded in compatibility.toml.

Platform health dashboards, alerts, fixtures, and runbooks are defined without vendor account state in docs/platform-operations.md. The first-consumer evidence handoff is defined in docs/first-consumer-qualification.md.

Start with the documentation index. The chaptered implementation specification traces the current Python runtime, schemas, Collector topologies, deployment inputs, and verification behavior to their source files. The implementation guide explains the same system as an end-to-end code tour and demonstrates the design patterns used in the implementation.