ref(file): Remove file.async attributes from instrumentation#3841
ref(file): Remove file.async attributes from instrumentation#3841buenaflor wants to merge 2 commits into
Conversation
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Features
Fixes
DependenciesDeps
Internal Changes
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v10-branch #3841 +/- ##
=============================================
Coverage ? 64.45%
=============================================
Files ? 4
Lines ? 166
Branches ? 0
=============================================
Hits ? 107
Misses ? 59
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
The file.async span attribute and breadcrumb data was a Sentry-invented signal with no product feature consuming it — a dead signal on every file-I/O span and breadcrumb. Remove it from both the async and sync paths. The sync attribute is left untouched. BREAKING CHANGE: Consumers relying on file.async for filtering or sampling lose the signal. Fixes GH-3830 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1d3cc98 to
c1d7071
Compare
There was a problem hiding this comment.
Pull request overview
Removes the custom file.async attribute from sentry_file’s file-I/O instrumentation (spans + breadcrumbs), keeping the existing sync marker for sync operations, as part of the v10 cleanup.
Changes:
- Removed
file.asyncfrom span data and breadcrumb data emitted bySentryFile(async + sync wrappers). - Updated file package tests to stop asserting
file.asyncin both spanv2 and span/breadcrumb assertions.
Standards
- Minor test helper naming typo remains in a modified hunk (
_asserBreadcrumbvs_assertBreadcrumb) — commented as a nit.
Spec
- Matches #3830 expected outcome:
file.asyncremoved from emitted spans and breadcrumbs, with assertions updated accordingly.
Correctness
- No functional instrumentation flow changes beyond removing the attribute;
syncon sync spans is preserved.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/file/lib/src/sentry_file.dart | Removes file.async from span/breadcrumb payloads in async + sync wrappers. |
| packages/file/test/sentry_file_test.dart | Updates span/breadcrumb assertions to no longer expect file.async. |
| packages/file/test/spanv2_integration_test.dart | Updates spanv2 assertions to no longer expect file.async. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| void _asserBreadcrumb(bool async) { | ||
| void _asserBreadcrumb() { |
|
|
||
| _assertSpan(true); | ||
| _asserBreadcrumb(true); | ||
| _asserBreadcrumb(); |
|
|
||
| _assertSpan(false); | ||
| _asserBreadcrumb(false); | ||
| _asserBreadcrumb(); |
file.asyncis dropped from every file-I/O span and breadcrumb, on both the async and sync paths. It was a Sentry-invented attribute with no product feature consuming it — a dead signal. Thesyncattribute stays as-is.Part of the v10 cleanup (#3487).
Breaking change: consumers that filter or sample on
file.asynclose the signal; whether an operation was synchronous is still expressed by thesyncattribute on sync spans.Fixes #3830