5.2.0 — 2026-09-07¶
← 5.2.1 | 5.1.0 → | ↑ 5.x series
Added¶
Configs - OpenTelemetry¶
OtelMetricsExporterenum - Unique metrics exporter viaMETRICS_EXPORTER(otlp|pull) with optional pull bind host/port.otlp(default): push via periodic OTLP exportpull: dedicated scrape HTTP server onMETRICS_PULL_HOST:METRICS_PULL_PORT/metrics
OtelLogsExporterenum - Unique logs exporter viaLOGS_EXPORTER(console|otlp); defaultconsolesplits INFO/DEBUG → stdout and WARNING+ → stderrLOGS_ENABLEDdefaulttrue- Log export on when OTel is enabled (console by default; switch tootlpfor collectors)METRICS_PULL_PORTdefault8200- Default scrape bind port for pull metricsSYSTEM_METRICS_ENABLED- Kill switch forSystemMetricsInstrumentor(defaulttruewhen metrics are on)
Helpers - OpenTelemetry¶
- Metrics pull scrape lifecycle - Owned scrape server start/stop tied to
OtelUtilsinit, shutdown, fork reset, and test reset - gRPC RPC duration metrics - Sync/async
rpc.server.durationserver interceptors installed by AppUtils when metrics are enabled (independent of traces) metric_status_for_exception- Aligns decorator/RPC metricstatuswith span status (BaseErrorHTTP < 500 →ok)- Duration histogram quality - Description plus explicit second bucket boundaries on function and gRPC duration histograms
Dependencies¶
opentelemetry-exporter-prometheus- Added to theotelextra to implement thepullscrape exporter
Tests¶
Tests - OpenTelemetry¶
- Pull scrape BDD - Scrape 200, pull-only, invalid exporter enum, disabled port, idempotent init, shutdown
- Console logs BDD - Invalid
LOGS_EXPORTER, INFO → stdout, WARNING → stderr - Metrics gaps BDD - gRPC
rpc.server.durationwithout hand-rolled decorators, metrics-only gRPC, clientBaseErrormetric status, system metrics off
Docs¶
Docs - Observability¶
- Push vs pull - Documented
METRICS_EXPORTER, scrape security/prefork notes, gRPC RPC metrics, status alignment, and instrument-name lowercasing gotchas