Skip to content

fix: remove double span entry causing conn:conn: log display#115

Merged
Itsusinn merged 2 commits into
mainfrom
fix/span
May 4, 2026
Merged

fix: remove double span entry causing conn:conn: log display#115
Itsusinn merged 2 commits into
mainfrom
fix/span

Conversation

@Itsusinn
Copy link
Copy Markdown
Owner

@Itsusinn Itsusinn commented May 4, 2026

The connection span was being entered twice — once via _guard = conn_span.enter() and once via run_tuic_event_loop().instrument(conn_span). This caused the compact log format to render conn:conn: prefix instead of a single conn{...}.

Fix: drop _guard before run_tuic_event_loop().instrument(conn_span) in both the camouflage-detection and non-camouflage paths.

Itsusinn added 2 commits May 5, 2026 01:43
The _guard (conn_span.enter()) and .instrument(conn_span) on the event
loop were both entering the same span, producing duplicated conn:conn:
prefix in log output. Fixed by dropping _guard before instrumenting
the event loop.

Assisted-by: OpenClaw:deepseek-v4-flash
Eliminate the dual span-entry pattern (_guard + .instrument) entirely.
Now conn_span is never .enter()'d — it's only used via parent: for
inline logs and .instrument() for spawned tasks and the event loop.

This avoids the double-enter problem at the root and simplifies the
code by removing _guard, clone, and 3x drop(_guard) calls.

Assisted-by: OpenClaw:deepseek-v4-flash
@Itsusinn Itsusinn merged commit 3abc907 into main May 4, 2026
20 checks passed
@Itsusinn Itsusinn deleted the fix/span branch May 4, 2026 18:15
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