Repository navigation
✨ Give background cache refreshes a trace of their own - #70
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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.refreshspans 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.