Constructor QueryRecord
- Namespace
- QueryGuard
- Assembly
- QueryGuard.Core.dll
QueryRecord(int, QueryCommandKind, QueryFingerprint, TimeSpan, DateTimeOffset, string?, int, bool, string?, IReadOnlyList<string>?, string?)
Initializes a new instance of the QueryRecord class.
public QueryRecord(int sequence, QueryCommandKind kind, QueryFingerprint fingerprint, TimeSpan duration, DateTimeOffset startedAt, string? commandSource = null, int parameterCount = 0, bool isFailed = false, string? failureType = null, IReadOnlyList<string>? tags = null, string? stackTrace = null)
Parameters
sequenceintThe one-based position of this command within its session.
kindQueryCommandKindThe kind of relational command.
fingerprintQueryFingerprintThe fingerprint of the normalized command text.
durationTimeSpanHow long the command took to execute.
startedAtDateTimeOffsetWhen the command started, in UTC.
commandSourcestringThe EF Core command source, for example
LinqorSaveChanges, or null when the provider did not report one.parameterCountintHow many parameters the command declared.
isFailedboolWhether the command completed by failing.
failureTypestringThe exception type name when
isFailedis true. The exception itself is never captured, and never replaces the one the application sees.tagsIReadOnlyList<string>Query tags recognized on the command, if any.
stackTracestringA filtered stack trace for the first occurrence of this fingerprint, when capture is enabled.
Exceptions
- ArgumentOutOfRangeException
sequenceis less than one.- ArgumentNullException
fingerprintis null.