Skip to content

feat: add process-global HTTPX instrumentation - #192

Draft
parvahuja wants to merge 1 commit into
parv/httpx-client-adapters-v0.14from
parv/httpx-instrumentation-v0.15
Draft

feat: add process-global HTTPX instrumentation#192
parvahuja wants to merge 1 commit into
parv/httpx-client-adapters-v0.14from
parv/httpx-instrumentation-v0.15

Conversation

@parvahuja

@parvahuja parvahuja commented Jul 28, 2026

Copy link
Copy Markdown
Member

Runtime stack 5 of 5 · depends on #191 · top of stack

Summary

  • add explicit process-global instrument(runtime) for HTTPX clients created by other libraries
  • require an origin policy unless unrestricted use is explicitly enabled
  • share one fixed runtime with reference-counted install/disable handles
  • give per-client adapters precedence and suppress payment-method recursion
  • validate and transactionally patch/restore the four HTTPX auth/request-send seams

Review boundary

Process-global HTTPX only. It adds no context-local mode, task registry, thread/executor monkey-patching, response/refetch hooks, receipt extensions, or MCP instrumentation. Raw external worker threads work; payment methods must not spawn raw threads that make instrumented HTTPX calls.

Production delta is 251 lines.

Validation

  • full suite: 939 passed, 41 skipped
  • combined adapter/instrumentation suite: 40 passed on HTTPX 0.27.0 and 0.28.1
  • Hermes 0.19 and current-main entrypoint smokes, including clients and bound send callables created before plugin load
  • raw-thread, reference-count, rollback, third-party patch, factory/method recursion, precedence, auth, redirect, and nested-send smokes
  • clean wheel build and strict Twine validation
  • Ruff, formatting, and Pyright pass

@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch from a59c50b to 89283ac Compare July 28, 2026 18:26
@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch from 89283ac to e2ff779 Compare July 28, 2026 23:29
@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch from e2ff779 to d6fe846 Compare July 29, 2026 00:44
@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch 2 times, most recently from 8767e4f to bcd4a11 Compare July 29, 2026 03:33
@parvahuja parvahuja changed the title feat: add scoped HTTPX instrumentation feat: add process-global HTTPX instrumentation Jul 29, 2026
@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch 3 times, most recently from 2039a68 to 77e7e30 Compare July 29, 2026 19:25
@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch from 77e7e30 to 92d6834 Compare July 29, 2026 21:04
@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch from 92d6834 to 8162ea0 Compare July 29, 2026 21:49
@parvahuja
parvahuja force-pushed the parv/httpx-instrumentation-v0.15 branch from 8162ea0 to 41ef051 Compare July 30, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant