You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maybe a feature request for future, should we have a set of default opt-outs inbuilt, like don't wrap `io.EOF` when being returned from `Read`? (It's not perfect, but seems like it's never correct to wrap an EOF error from `Read`)
We should consider a built-in list of ignores.
These will be pretty simplistic since we don't use type information (yet).
We already have an exclusion for Unwrap() error methods.
This issue is to track both, the feature and what should be in the exclusions initially:
I just ran into this and wondered why IO code stopped functioning with my Readers, after running the CLI instrumentation tool. This would be very helpful, even if it's not perfect
Excluding explicit io.EOF would be a big improvement, but I assume wrapped readers could still break? Could we handle this case if type info was available?
Wrapped readers make it pretty tricky since there isn't necessarily any reference to io or io.EOF in those cases.
While we were initially thinking of exclusions at compile-time, I wonder if we should also consider runtime exclusions. The compile-time code can instrument all calls, but the Wrap method could check against a runtime list and return the original error in those cases.
Activity
[-]Built-in list of exclusions[/-][+]cmd/errtrace: Built-in list of exclusions[/+]Nico-Hab commentedon Jun 4, 2024
I just ran into this and wondered why IO code stopped functioning with my Readers, after running the CLI instrumentation tool. This would be very helpful, even if it's not perfect
blampe commentedon Jul 11, 2025
Excluding explicit
io.EOFwould be a big improvement, but I assume wrapped readers could still break? Could we handle this case if type info was available?prashantv commentedon Jul 22, 2025
Wrapped readers make it pretty tricky since there isn't necessarily any reference to
ioorio.EOFin those cases.While we were initially thinking of exclusions at compile-time, I wonder if we should also consider runtime exclusions. The compile-time code can instrument all calls, but the
Wrapmethod could check against a runtime list and return the original error in those cases.