5.0.3 — 2026-08-31¶
← 5.0.4 | 5.0.2 → | ↑ 5.x series
Added¶
Configs - OpenTelemetry¶
- Per-signal OTLP endpoints - Optional
TRACES_ENDPOINT,METRICS_ENDPOINT, andLOGS_ENDPOINToverrides onOpentelemetryConfig.- For
http/protobuf, ArchiPy appends/v1/{traces|metrics|logs}whenOTLP_ENDPOINThas no path - gRPC mode keeps a single shared endpoint
- Temporal runtime metrics use the resolved metrics endpoint
- For
Helpers - OpenTelemetry¶
capture_argsredaction - Sensitive parameter names (password,token,secret,api_key, …) are recorded as***on spans.- No-op tracer/meter stubs - When the
opentelemetrypackage is missing,get_tracer/get_meterreturn stubs instead of raisingModuleNotFoundError.
Changed¶
Helpers - OpenTelemetry¶
- 4xx
BaseErrorspan status - Client errors leave span status UNSET (OTel spec) instead of forcingOK. - Meter instrumentation scope - Instruments use
func.__module__instead of the metrics decorator module name. - Resource attribute - Emits
deployment.environment.name(current semconv) instead ofdeployment.environment. - Root logging handler - Drops
opentelemetry.*records to avoid exporter feedback loops; documentsLOGS_LEVELcost in the observability tutorial.
Adapters - Temporal¶
- Tracing interceptor append -
TracingInterceptoris appended to existingconnect_kwargs["interceptors"]instead of overwriting the list.
Configs - BaseConfig¶
global_config()guard - Treats pydanticModelPrivateAttras unset so callers get the documentedAssertionErrorbeforeset_global().
Fixed¶
Helpers - OpenTelemetry¶
- Duplicate exception events - Decorators pass
record_exception=Falseandset_status_on_exception=Falseso SDK auto-record does not double events. - Stale metric instrument cache - Cache keys include the meter provider id;
reset_for_testing()clears histogram/counter caches. - Silent telemetry disable - Missing
archipy[otel]withIS_ENABLED=Truelogs a one-time warning instead of a debug-only swallow. - Sync decorator misuse -
trace_span,trace_root,measure_duration, andcount_callsraiseInvalidArgumentErrorwhen applied to coroutine functions.
Tests¶
Tests - OpenTelemetry¶
- Integration coverage - FastAPI HTTP spans/metrics, gRPC RPC spans + handler metrics, Temporal interceptor append and metrics endpoint wiring.
- Distributed traces - FastAPI→FastAPI, FastAPI→gRPC, gRPC→gRPC, and
gRPC→FastAPI share a single
trace_id. - Regressions - Single exception event, metric survival after provider reset,
HTTP/gRPC endpoint resolution, sampling ratio
0.0, andcapture_argsredaction.