Release 0.3.16 with comprehensive reference docs, OTel provider fix, and ASGI context reset optimization
61 files · 1,986+ · 471-

Release 0.3.16

2 files changed
  • VERSION Bumped to 0.3.16
  • pyproject.toml Version and dependency metadata updated
  • Tagged and released version 0.3.16 baseline internal
    2 files
    • VERSION
    • pyproject.toml

Comprehensive reference documentation

8 files changed
  • API.md Full public API reference (303 lines) for all symbols exported from undef.telemetry
  • CONFIGURATION.md Complete environment variable guide covering UNDEF_TELEMETRY_SERVICE_NAME, UNDEF_LOG_LEVEL, UNDEF_TRACE_ENABLED, etc.
  • INTERNALS.md Architecture diagrams and internals guide (180 lines)
  • ARCHITECTURE.md Updated architecture overview (85 lines)
  • OPERATIONS.md Operations runbook updated
  • PRODUCTION_PROFILES.md Production profiles reference updated
  • README.md README updated with new doc links and usage notes
  • test_configuration_completeness.py Configuration completeness test validating that docs match code (62 lines)
  • Added docs/API.md (303 lines): full public API reference for all symbols exported from undef.telemetry, including setup/lifecycle, logging, tracing, metrics, and context APIs specify behavioral
    1 file
    • API.md
  • Added docs/CONFIGURATION.md: complete guide covering all environment variables (UNDEF_TELEMETRY_SERVICE_NAME, UNDEF_LOG_LEVEL, UNDEF_TRACE_ENABLED, etc.) specify internal
    1 file
    • CONFIGURATION.md
  • Added docs/INTERNALS.md: architecture diagrams and internals guide specify internal
    1 file
    • INTERNALS.md
  • Added configuration completeness test validating that docs match code (prevents undocumented config drift) qualify internal
    1 file
    • test_configuration_completeness.py

Pretty log renderer and testing utilities

5 files changed
  • pretty.py New pretty log renderer (94 lines)
  • testing.py New testing utilities module (85 lines)
  • test_pretty_renderer.py Pretty renderer test suite (343 lines)
  • test_testing_plugin.py Testing plugin tests (93 lines)
  • __init__.py Testing subpackage init (moved from src/undef)
  • Added src/undef/telemetry/logger/pretty.py: pretty log renderer for development and human-readable output instantiate behavioral
    1 file
    • pretty.py
  • Added src/undef/telemetry/testing.py: testing utilities for use in downstream package test suites instantiate behavioral
    1 file
    • testing.py
  • Full test coverage for pretty renderer (343 lines) and testing plugin (93 lines) qualify internal
    2 files
    • test_pretty_renderer.py
    • test_testing_plugin.py

Import-order independent OTel provider detection

2 files changed
  • _otel.py Provider detection logic reworked to be import-order independent
  • test_external_provider_compat.py External provider compatibility tests (112 lines)
  • Provider detection now works regardless of import order between undef-telemetry and the OTel SDK — previously, which package was imported first could cause the external provider check to fail or silently succeed incorrectly harden behavioral
    2 files
    • _otel.py
    • test_external_provider_compat.py

Per-signal resilience thread pool isolation

2 files changed
  • resilience.py Resilience pools isolated per signal type (logs/traces/metrics)
  • test_resilience_mutations.py Resilience mutation tests updated
  • Resilience thread pools are now isolated per signal type (logs/traces/metrics) to prevent cross-signal contention under sustained export failures — a slow metrics exporter no longer backs up log export harden behavioral
    1 file
    • resilience.py

Zero-copy ASGI context reset

4 files changed
  • middleware.py ASGI middleware uses ContextVar.set() token for context cleanup
  • websocket.py WebSocket context handling updated
  • __init__.py ASGI subpackage exports updated
  • test_middleware_and_setup.py ASGI middleware tests updated for new context reset pattern
  • ASGI middleware now uses ContextVar.set() token for context cleanup instead of delete-then-re-set pattern streamline internal
    1 file
    • middleware.py
  • Reduces per-request overhead by avoiding an extra ContextVar.delete() plus re-set cycle streamline internal
    1 file
    • middleware.py

Source module and test suite updates

34 files changed
  • __init__.py Public API surface updated
  • config.py Config module updated
  • context.py Logger context helpers extended
  • core.py Logger core updated
  • api.py Metrics API updated
  • provider.py Metrics provider updated
  • cardinality.py Cardinality module updated
  • pii.py PII module updated
  • runtime.py Runtime module updated
  • sampling.py Sampling module updated
  • setup.py Setup module updated
  • provider.py Tracing provider updated
  • check_docs_accuracy.py Docs accuracy check script updated
  • run_mutation_gate.py Mutation gate script updated
  • test_config_edge_cases.py Config edge case tests updated
  • test_hardening_resilience.py Hardening resilience tests updated
  • test_setup_reinitialization.py Setup reinitialization integration tests updated
  • test_logger_configuration.py Logger configuration tests updated
  • test_logger_context_processors.py Context processor tests updated
  • test_logger_core.py Logger core tests updated
  • test_processors_mutations.py Processor mutation tests updated
  • test_metrics_core.py Metrics core tests updated
  • test_metrics_early_get_meter.py Early get-meter tests updated
  • test_code_review_regressions.py Regression tests updated
  • test_code_review_regressions_4.py Regression tests (batch 4) updated
  • test_dx_stability.py DX stability regression tests updated
  • test_sampling_mutations.py Sampling mutation tests updated
  • test_check_docs_accuracy.py Docs accuracy tooling tests updated
  • test_run_mutation_gate.py Mutation gate tooling tests updated
  • test_trace_context_sync.py Trace context sync tests updated
  • test_tracing_core.py Tracing core tests updated
  • test_openobserve_e2e.py OpenObserve e2e test updated
  • 02_w3c_propagation_asgi.py W3C propagation ASGI example updated
  • README.md Examples README updated
  • Broad updates across source modules (config, logger, metrics, tracing, resilience, runtime, sampling, cardinality, pii) and corresponding test suites to support the new features and doc completeness requirements decouple internal
    5 files
    • config.py
    • core.py
    • provider.py
    • provider.py
    • runtime.py