provide-telemetry
2026-03-15
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
VERSIONBumped to 0.3.16pyproject.tomlVersion and dependency metadata updated
Comprehensive reference documentation
8 files changed
API.mdFull public API reference (303 lines) for all symbols exported from undef.telemetryCONFIGURATION.mdComplete environment variable guide covering UNDEF_TELEMETRY_SERVICE_NAME, UNDEF_LOG_LEVEL, UNDEF_TRACE_ENABLED, etc.INTERNALS.mdArchitecture diagrams and internals guide (180 lines)ARCHITECTURE.mdUpdated architecture overview (85 lines)OPERATIONS.mdOperations runbook updatedPRODUCTION_PROFILES.mdProduction profiles reference updatedREADME.mdREADME updated with new doc links and usage notestest_configuration_completeness.pyConfiguration 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.pyNew pretty log renderer (94 lines)testing.pyNew testing utilities module (85 lines)test_pretty_renderer.pyPretty renderer test suite (343 lines)test_testing_plugin.pyTesting plugin tests (93 lines)__init__.pyTesting 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.pytest_testing_plugin.py
Import-order independent OTel provider detection
2 files changed
_otel.pyProvider detection logic reworked to be import-order independenttest_external_provider_compat.pyExternal 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.pytest_external_provider_compat.py
Per-signal resilience thread pool isolation
2 files changed
resilience.pyResilience pools isolated per signal type (logs/traces/metrics)test_resilience_mutations.pyResilience 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.pyASGI middleware uses ContextVar.set() token for context cleanupwebsocket.pyWebSocket context handling updated__init__.pyASGI subpackage exports updatedtest_middleware_and_setup.pyASGI 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__.pyPublic API surface updatedconfig.pyConfig module updatedcontext.pyLogger context helpers extendedcore.pyLogger core updatedapi.pyMetrics API updatedprovider.pyMetrics provider updatedcardinality.pyCardinality module updatedpii.pyPII module updatedruntime.pyRuntime module updatedsampling.pySampling module updatedsetup.pySetup module updatedprovider.pyTracing provider updatedcheck_docs_accuracy.pyDocs accuracy check script updatedrun_mutation_gate.pyMutation gate script updatedtest_config_edge_cases.pyConfig edge case tests updatedtest_hardening_resilience.pyHardening resilience tests updatedtest_setup_reinitialization.pySetup reinitialization integration tests updatedtest_logger_configuration.pyLogger configuration tests updatedtest_logger_context_processors.pyContext processor tests updatedtest_logger_core.pyLogger core tests updatedtest_processors_mutations.pyProcessor mutation tests updatedtest_metrics_core.pyMetrics core tests updatedtest_metrics_early_get_meter.pyEarly get-meter tests updatedtest_code_review_regressions.pyRegression tests updatedtest_code_review_regressions_4.pyRegression tests (batch 4) updatedtest_dx_stability.pyDX stability regression tests updatedtest_sampling_mutations.pySampling mutation tests updatedtest_check_docs_accuracy.pyDocs accuracy tooling tests updatedtest_run_mutation_gate.pyMutation gate tooling tests updatedtest_trace_context_sync.pyTrace context sync tests updatedtest_tracing_core.pyTracing core tests updatedtest_openobserve_e2e.pyOpenObserve e2e test updated02_w3c_propagation_asgi.pyW3C propagation ASGI example updatedREADME.mdExamples README updated