SentryQueryLogger class
A QueryLogger that forwards failed queries to Sentry.
Successful queries are ignored; failures are reported via
Sentry.captureException with the SQL/operation/model attached as context.
No-ops when Sentry is not enabled, so it is always safe to include.
- Implemented types
Constructors
- SentryQueryLogger({bool includeParameters = false})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeParameters → bool
-
Whether to attach bound parameters to the Sentry event. Off by default
because parameters may contain PII / secrets.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onQueryEnd(
QueryEndEvent event) → void -
Called after a query completes successfully.
override
-
onQueryError(
QueryErrorEvent event) → void -
Called when a query fails.
override
-
onQueryStart(
QueryStartEvent event) → void -
Called before a query is executed.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited