@@ -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,13 @@ 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 ` in
45+ ` pipeline.policies.tracing_policy ` , with a new outermost ` Stage.OPERATION ` ).
46+ Emits the per-operation ` HttpTracer ` lifecycle (` operation_started ` , then
47+ exactly one ` operation_succeeded ` / ` operation_failed ` ) from outside the retry
48+ and redirect wrappers, so the reported outcome reflects the final result of
49+ the whole call rather than a single attempt or hop. Sync-only, in line with
50+ the rest of the tracing stack; the async pipeline carries no tracing.
4051- ** HTTP tracer** (` instrumentation.http_tracer ` ). An adapter-style tracer base
4152 whose per-event methods default to no-ops, so a subclass overrides only the
4253 events it cares about. Wired through the tracing policy for span emission.
@@ -58,6 +69,15 @@ continues to work without modification.
5869 cancellation cleanly between attempts.
5970- ** Tracing and redirect policies** now emit tracer events and carry correlation
6071 through redirects, with credentials stripped on cross-origin redirects.
72+ - ** Tracing lifecycle** (` pipeline.policies.tracing_policy ` ). The per-operation
73+ ` HttpTracer ` lifecycle moved out of ` TracingPolicy ` into the new
74+ ` OperationTracingPolicy ` ; ` TracingPolicy ` now emits only its per-attempt span
75+ and the per-request events (` request_sent ` , ` response_headers_received ` ,
76+ ` response_received ` ). ` default_pipeline ` wires both, so callers who use it are
77+ unaffected. A pipeline assembled by hand that wants the operation lifecycle
78+ must now add ` OperationTracingPolicy ` alongside ` TracingPolicy ` — a bare
79+ ` TracingPolicy ` no longer emits ` operation_started ` / ` operation_succeeded ` /
80+ ` operation_failed ` .
6181- ** Default pipelines** (` pipeline.defaults ` ). The standard sync/async stacks now
6282 assemble the new idempotency and client-identity policies alongside the
6383 existing retry, redirect, logging, and tracing policies.
@@ -96,6 +116,26 @@ continues to work without modification.
96116 ` async_response_body ` ). Cancelling an in-flight read now releases the
97117 underlying resources instead of leaking them, and re-raises ` CancelledError `
98118 after cleanup.
119+ - ** Per-operation tracing outcome** (` pipeline.policies.tracing_policy ` ). A call
120+ retried after a failed first attempt no longer reports ` operation_failed ` for
121+ the discarded attempt (it reports the single ` operation_succeeded ` it ends on),
122+ and a redirect whose later hop fails no longer reports ` operation_succeeded `
123+ for the earlier 3xx hop. The lifecycle now fires exactly once and reflects the
124+ final outcome. See * Tracing lifecycle* under Changed for the API shape.
125+ - ** ` Content-Length ` under ` Content-Encoding ` ** (` http.stdlib.urllib_http_client ` ).
126+ ` UrllibHttpClient ` no longer drops a valid ` Content-Length ` when
127+ ` Content-Encoding ` is present: ` http.client ` does not decode content codings,
128+ so the body it serves is the wire payload whose length the header describes,
129+ and the length is now surfaced as-is. (The decompressing requests/httpx/aiohttp
130+ adapters still drop it, since they hand back a decoded stream.)
131+ - ** Chunked-framing detection** (` http.stdlib.asyncio_http_client ` ). The
132+ ` Transfer-Encoding ` check matches the ` chunked ` coding by token rather than
133+ substring, so a coding whose name merely contains ` chunked ` (e.g. ` x-chunked ` )
134+ is no longer mistaken for chunked framing.
135+ - ** Out-of-range status reporting** (` http.stdlib.urllib_http_client ` ,
136+ ` asyncio_http_client ` ). Both now raise a ` ServiceResponseError ` worded
137+ ` Invalid status code: … ` for a status outside 100–599, matching the other
138+ adapters.
99139
100140### Verified
101141
@@ -113,6 +153,9 @@ The following were intentionally left out of this round and are **not** included
113153 errors themselves.
114154- ** ` sendfile ` fast-path** — file bodies are streamed via the existing
115155 ` iter_bytes ` path; no zero-copy ` sendfile ` transport optimisation was added.
156+ - ** Async tracing / logging** — the tracing and logging policies (including the
157+ new ` OperationTracingPolicy ` ) ship sync-only; ` default_async_pipeline ` carries
158+ no tracing, and async callers handle per-operation observability themselves.
116159- ** MCP support** — no Model Context Protocol integration is included.
117160- ** Java SDK items** — the Java counterpart lives in a separate repository and
118161 was out of scope here.
0 commit comments