DVCrashConfig class final

Crash reporting as a project declares it.

Read strictly. Every setting has a default, which is what makes a loose reading dangerous: a misspelt key, a string where a boolean belongs, or a sample rate of 25 meaning a quarter would each be replaced by the default and look exactly like a setting that was honoured. So each is refused, naming the key.

Constructors

DVCrashConfig({Set<DVCrashBuildMode> disabledIn = const <DVCrashBuildMode>{}, DVCrashSinkChoice sink = DVCrashSinkChoice.none, double nonFatalSampleRate = 1, int breadcrumbs = 64, int fullReportsPerRelease = 5, DVConsentCategory? identityConsent, int ingestPerInstallPerHour = 30, int? ingestPerSourcePerHour, int ingestMaxBytes = 262144})
const
DVCrashConfig.parse(Object? section)
Reads the dartvel.crashes section, or the defaults when there is none.
factory

Properties

How many breadcrumbs a report carries.
final
disabledIn → Set<DVCrashBuildMode>
The builds crash reporting is off in. Off is a declaration the build reports (DV-CRASH-009).
final
fullReportsPerRelease → int
Full reports per device per release; past it crashes are counted.
final
hashCode → int
The hash code for this object.
no setterinherited
identityConsent → DVConsentCategory?
The consent category a report may carry a user id under, or null when no report is ever tied to an account.
final
ingestMaxBytes → int
With sink: dartvel, the largest report body the backend accepts.
final
ingestPerInstallPerHour → int
With sink: dartvel, the reports the backend stores per install per hour; past it they are counted.
final
ingestPerSourcePerHour → int
With sink: dartvel, the reports the backend stores per client source -- an IPv4 address or an IPv6 client's /64 -- per hour; past it they are refused with 429 and sent again later. Unless declared, ingestInstallsPerSource installs at their full per-install budget, so raising perInstallPerHour raises it too.
no setter
nonFatalSampleRate → double
The share of non-fatal errors kept, from 0 to 1. Crashes are never sampled.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sink → DVCrashSinkChoice
final

Methods

enabledIn(DVCrashBuildMode mode) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDeclaration() → Map<String, Object?>
The declaration this configuration reads back from: what the generator writes into the runtime, so the running application parses the same rules the build checked.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

ingestInstallsPerSource → const int
How many installs behind one address the default per-source budget allows at their full per-install budget.
settings → const List<String>
The settings dartvel.crashes accepts.