Skip to content

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, and LOGS_ENDPOINT overrides on OpentelemetryConfig.
    • For http/protobuf, ArchiPy appends /v1/{traces|metrics|logs} when OTLP_ENDPOINT has no path
    • gRPC mode keeps a single shared endpoint
    • Temporal runtime metrics use the resolved metrics endpoint

Helpers - OpenTelemetry

  • capture_args redaction - Sensitive parameter names (password, token, secret, api_key, …) are recorded as *** on spans.
  • No-op tracer/meter stubs - When the opentelemetry package is missing, get_tracer / get_meter return stubs instead of raising ModuleNotFoundError.

Changed

Helpers - OpenTelemetry

  • 4xx BaseError span status - Client errors leave span status UNSET (OTel spec) instead of forcing OK.
  • Meter instrumentation scope - Instruments use func.__module__ instead of the metrics decorator module name.
  • Resource attribute - Emits deployment.environment.name (current semconv) instead of deployment.environment.
  • Root logging handler - Drops opentelemetry.* records to avoid exporter feedback loops; documents LOGS_LEVEL cost in the observability tutorial.

Adapters - Temporal

  • Tracing interceptor append - TracingInterceptor is appended to existing connect_kwargs["interceptors"] instead of overwriting the list.

Configs - BaseConfig

  • global_config() guard - Treats pydantic ModelPrivateAttr as unset so callers get the documented AssertionError before set_global().

Fixed

Helpers - OpenTelemetry

  • Duplicate exception events - Decorators pass record_exception=False and set_status_on_exception=False so 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] with IS_ENABLED=True logs a one-time warning instead of a debug-only swallow.
  • Sync decorator misuse - trace_span, trace_root, measure_duration, and count_calls raise InvalidArgumentError when 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, and capture_args redaction.