Skip to content

Feat/redis mongo urllib instrumentation#1

Merged
tino-cmd merged 6 commits into
mainfrom
feat/redis-mongo-urllib-instrumentation
Jul 5, 2026
Merged

Feat/redis mongo urllib instrumentation#1
tino-cmd merged 6 commits into
mainfrom
feat/redis-mongo-urllib-instrumentation

Conversation

@tino-cmd

@tino-cmd tino-cmd commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

tino-cmd added 6 commits July 3, 2026 01:18
…ns.open

pathlib helpers (Path.open/read_text/write_text) call io.open directly and
never touch builtins.open, so patching only the builtin left every pathlib
file access ungoverned. install_file_io now patches both names to the same
governed wrapper and uninstall restores both exactly.

In CPython builtins.open IS io.open and a single logical open resolves
through exactly one name (direct open -> builtins, pathlib -> io), so routing
both to one wrapper adds no double wrapping or double evaluation. The io.open
patch is skipped when a foreign wrapper already owns it (tracked for exact
restoration); the reentrancy guard is name-agnostic and unchanged.
Align hook span projection with the Temporal legacy flat contract so
HTTP/DB/file/function spans go on the wire as flat Core SpanData:

- drop data.otel from hook spans (flat is the wire contract; the OTel
  preservation blob is opt-in debug only, off by default)
- always emit common root fields (parent_span_id, kind, attributes,
  error) and per-family root fields, null when absent
- synthesize completed end_time from start_time + duration_ns for
  OTel-owned spans not ended at hook time
- port httpx body capture via a Client.send/AsyncClient.send patch
  (OTel hooks cannot safely read httpx streams); requests completed now
  retains request body and headers
- extract db_name/server_address/server_port for SQLAlchemy, dbapi and
  asyncpg
- tighten conformance assert_hook_wire_shape to enforce the flat
  contract (no data, no semantic_type, all root fields present)

Verified against the real Core SpanData Go struct (DisallowUnknownFields)
and the packaged conformance kit.
Add the Temporal-vs-base contract matrix + implementation report and
project notes (flat-span decision, httpx send-patch body-capture arch).
@tino-cmd
tino-cmd merged commit a9ff548 into main Jul 5, 2026
2 checks passed
@tino-cmd
tino-cmd deleted the feat/redis-mongo-urllib-instrumentation branch July 5, 2026 16:48
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