Skip to content

✨ Give background cache refreshes a trace of their own - #70

Merged
HanXHX merged 1 commit into
masterfrom
feat/webdav_refresh_trace
Oct 6, 2026
Merged

HanXHX merged 1 commit into
masterfrom
feat/webdav_refresh_trace

Conversation

@HanXHX

@HanXHX HanXHX commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

A refresh of an expired listing or dataroom list runs after the request has answered from the expired entry, yet its API spans were children of that request span: they outlived their parent and read as if the request had waited for them.

Each background refresh now opens a root span, cache.refresh, linked to the request that triggered it (retyc.cache.name, plus retyc.dataroom.id for a folder listing). A request that joins a running refresh and waits for it gets a link to that trace instead; a fetch the request starts itself stays in its trace.

A refresh of an expired listing or dataroom list runs after the request has
answered from the expired entry, yet its API spans were children of that
request span: they outlived their parent and read as if the request had
waited for them.

Each background refresh now opens a root span, cache.refresh, linked to the
request that triggered it (retyc.cache.name, plus retyc.dataroom.id for a
folder listing). A request that joins a running refresh and waits for it gets
a link to that trace instead; a fetch the request starts itself stays in its
trace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation is consistent, concurrency-safe, documented, and comprehensively tested.

Review effort: Balanced
Findings: None

What changed in this PR

Adds independent tracing for asynchronous WebDAV cache refreshes while preserving links to related requests.

Changes:

  • Creates root cache.refresh spans with bounded attributes and error recording.
  • Links triggering and waiting request spans to background refreshes.
  • Adds tracing, privacy, and failure-path tests plus documentation.
File Description
cmd/​webdav.go Implements refresh traces and request links.
cmd/​tracing_privacy_test.go Tests trace relationships and privacy.
doc/​webdav.md Documents cache refresh tracing.
CLAUDE.md Updates repository tracing guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@HanXHX
HanXHX merged commit f375298 into master Oct 6, 2026
5 checks passed
@HanXHX
HanXHX deleted the feat/webdav_refresh_trace branch October 6, 2026 06:17
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.

2 participants