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
{{ message }}
Repository navigation
An driver.ErrSkip error is logged during query execution #556
An sql/driver.ErrSkip error is logged during query execution. The error is an implementation detail and should be excluded from being logged in the span.
Environment
OS: linux
Architecture: x86
Go Version: 1.25
otelsql version: 0.40.0
Steps To Reproduce
Expected behavior
var ErrSkip = errors.New("driver: skip fast-path; continue as if unimplemented")
ErrSkip may be returned by some optional interfaces' methods to indicate at runtime that the fast path is unavailable and the sql package should continue as if the optional interface was not implemented. ErrSkip is only supported where explicitly documented.
The description of the error itself suggests that it should be excluded from logging, logging a span is not the expected behaviour for this error.
Finally got it working with otelsql.WithSpanOptions(otelsql.SpanOption{DisableErrSkip: true}). The internal function recordSpanError doesn't have a config struct in scope, doesn't use the DisableSkipErrMeasurement value. It's a bit inconvenient, what do you think?
Activity
titpetric commentedon Oct 31, 2025
I see there's an option to supposedly toggle this:
https://pkg.go.dev/github.com/XSAM/otelsql#WithDisableSkipErrMeasurement
I still see
sql.conn.querylogged with errors.Finally got it working with
otelsql.WithSpanOptions(otelsql.SpanOption{DisableErrSkip: true}). The internal functionrecordSpanErrordoesn't have aconfigstruct in scope, doesn't use the DisableSkipErrMeasurement value. It's a bit inconvenient, what do you think?XSAM commentedon Nov 13, 2025
Hey @titpetric, thanks for creating this issue.
The
DisableSkipErrMeasurementonly affects the metrics behavior. Maybe I should update the doc that says explicitlymetrics.Carify comments for DisableSkipErrMeasurement (#585)