@@ -8,13 +8,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88## [ Unreleased]
99
1010A round of platform improvements to ` dexpace-sdk-core ` : new optional building
11- blocks (typed serialization, webhook verification, pagination, two pipeline
12- policies), tightened retry and tracing behaviour, and a batch of correctness
13- fixes across bodies, SSE parsing, Digest auth, and error reporting. Most of this
14- lands in ` core ` ; the transport adapters additionally get consistent connect- vs
15- read-phase timeout classification and tighter resource release. The only removed
16- public symbol is the unused ` RetryConfig ` (see Removed); existing code otherwise
17- continues to work without modification.
11+ blocks (typed serialization, webhook verification, pagination, three pipeline
12+ policies), tightened retry behaviour, a corrected per-operation tracing
13+ lifecycle, and a batch of correctness fixes across bodies, SSE parsing, Digest
14+ auth, and error reporting. Most of this lands in ` core ` ; the transport adapters
15+ additionally get consistent connect- vs read-phase timeout classification,
16+ tighter resource release, and a set of edge-case corrections (status-code
17+ reporting, chunked-framing detection, and content-length under content-encoding).
18+ The only removed public symbol is the unused ` RetryConfig ` (see Removed);
19+ existing code otherwise continues to work without modification — with one
20+ behavioural note for hand-assembled pipelines (see * Tracing lifecycle* under
21+ Changed).
1822
1923### Added
2024
@@ -37,6 +41,16 @@ continues to work without modification.
3741- ** Client-identity policy** (` pipeline.policies.client_identity ` , plus its
3842 async twin). Sets a consistent ` User-Agent ` / client-identity header derived
3943 from the configured application id and SDK version.
44+ - ** Per-operation tracing policy** (` OperationTracingPolicy ` and its async twin
45+ ` AsyncOperationTracingPolicy ` , with a new outermost ` Stage.OPERATION ` ). Emits
46+ the per-operation ` HttpTracer ` lifecycle (` operation_started ` , then exactly
47+ one ` operation_succeeded ` / ` operation_failed ` ) from outside the retry and
48+ redirect wrappers, so the reported outcome reflects the final result of the
49+ whole call rather than a single attempt or hop. Both ` default_pipeline ` and
50+ ` default_async_pipeline ` wire it, so the async stack now reports the same
51+ lifecycle alongside the attempt-level events its retry / redirect policies
52+ already emit. Only ` TracingPolicy ` 's per-attempt OpenTelemetry span policy
53+ remains sync-only.
4054- ** HTTP tracer** (` instrumentation.http_tracer ` ). An adapter-style tracer base
4155 whose per-event methods default to no-ops, so a subclass overrides only the
4256 events it cares about. Wired through the tracing policy for span emission.
@@ -58,6 +72,17 @@ continues to work without modification.
5872 cancellation cleanly between attempts.
5973- ** Tracing and redirect policies** now emit tracer events and carry correlation
6074 through redirects, with credentials stripped on cross-origin redirects.
75+ - ** Tracing lifecycle** (` pipeline.policies.tracing_policy ` ). The per-operation
76+ ` HttpTracer ` lifecycle moved out of ` TracingPolicy ` into the new
77+ ` OperationTracingPolicy ` ; ` TracingPolicy ` now emits only its per-attempt span
78+ and the per-request events (` request_sent ` , ` response_headers_received ` ,
79+ ` response_received ` ). ` default_pipeline ` wires both, so callers who use it are
80+ unaffected. A pipeline assembled by hand that wants the operation lifecycle
81+ must now add ` OperationTracingPolicy ` alongside ` TracingPolicy ` — a bare
82+ ` TracingPolicy ` no longer emits ` operation_started ` / ` operation_succeeded ` /
83+ ` operation_failed ` . So that change is not silent, a ` TracingPolicy ` that runs
84+ with a real ` HttpTracer ` but no ` OperationTracingPolicy ` bracketing it logs a
85+ one-time warning.
6186- ** Default pipelines** (` pipeline.defaults ` ). The standard sync/async stacks now
6287 assemble the new idempotency and client-identity policies alongside the
6388 existing retry, redirect, logging, and tracing policies.
@@ -96,6 +121,26 @@ continues to work without modification.
96121 ` async_response_body ` ). Cancelling an in-flight read now releases the
97122 underlying resources instead of leaking them, and re-raises ` CancelledError `
98123 after cleanup.
124+ - ** Per-operation tracing outcome** (` pipeline.policies.tracing_policy ` ). A call
125+ retried after a failed first attempt no longer reports ` operation_failed ` for
126+ the discarded attempt (it reports the single ` operation_succeeded ` it ends on),
127+ and a redirect whose later hop fails no longer reports ` operation_succeeded `
128+ for the earlier 3xx hop. The lifecycle now fires exactly once and reflects the
129+ final outcome. See * Tracing lifecycle* under Changed for the API shape.
130+ - ** ` Content-Length ` under ` Content-Encoding ` ** (` http.stdlib.urllib_http_client ` ).
131+ ` UrllibHttpClient ` no longer drops a valid ` Content-Length ` when
132+ ` Content-Encoding ` is present: ` http.client ` does not decode content codings,
133+ so the body it serves is the wire payload whose length the header describes,
134+ and the length is now surfaced as-is. (The decompressing requests/httpx/aiohttp
135+ adapters still drop it, since they hand back a decoded stream.)
136+ - ** Chunked-framing detection** (` http.stdlib.asyncio_http_client ` ). The
137+ ` Transfer-Encoding ` check matches the ` chunked ` coding by token rather than
138+ substring, so a coding whose name merely contains ` chunked ` (e.g. ` x-chunked ` )
139+ is no longer mistaken for chunked framing.
140+ - ** Out-of-range status reporting** (` http.stdlib.urllib_http_client ` ,
141+ ` asyncio_http_client ` ). Both now raise a ` ServiceResponseError ` worded
142+ ` Invalid status code: … ` for a status outside 100–599, matching the other
143+ adapters.
99144
100145### Verified
101146
@@ -113,6 +158,11 @@ The following were intentionally left out of this round and are **not** included
113158 errors themselves.
114159- ** ` sendfile ` fast-path** — file bodies are streamed via the existing
115160 ` iter_bytes ` path; no zero-copy ` sendfile ` transport optimisation was added.
161+ - ** Async OpenTelemetry spans / logging** — the per-attempt span policy
162+ (` TracingPolicy ` ) and ` LoggingPolicy ` ship sync-only, so
163+ ` default_async_pipeline ` emits the per-operation ` HttpTracer ` lifecycle and
164+ attempt-level events but no OpenTelemetry spans or structured request /
165+ response logs.
116166- ** MCP support** — no Model Context Protocol integration is included.
117167- ** Java SDK items** — the Java counterpart lives in a separate repository and
118168 was out of scope here.
0 commit comments