Table of Contents

Class SensitiveContentEgressTelemetry

Namespace
MailFathom.Infrastructure.Observability
Assembly
MailFathom.Infrastructure.dll

Reports what guarding each egress point found, refused, and cost.

public sealed class SensitiveContentEgressTelemetry : ISensitiveContentEgressTelemetry
Inheritance
SensitiveContentEgressTelemetry
Implements
Inherited Members

Remarks

The egress point is on every instrument because it is what an operator acts on. "Something was redacted" says nothing; a scanner finding credentials in retrieved extracts and nothing in subjects, or adding two seconds to a listing and nothing to an embedding call, is where a category list or a bound gets changed.

Nothing recorded here is mail or derived from it. The tags on the instruments are an egress point, a category name, and a scanner name, all three of them MailFathom's own closed sets, and the values are counts and durations — never a rule's match, a position, a message identity, or any part of what was found, each of which would put the credential in the telemetry written to prove it never left.

One further attribute is exported, on the span alone and on no instrument: mailfathom.user, the deployment's own configured identifier for whoever the published mail belongs to. Postures differ between the people one deployment serves, so a scan nothing attributes cannot be read against what its user asked for; it names a person no more than a mail account alias does, and it stays off every counter because an identifier on a series incremented once per guarded text would be the unbounded dimension the closed sets above exist to avoid.

Constructors

SensitiveContentEgressTelemetry()

Initializes the instruments every guarded egress reports through.

Methods

BeginGuardedOperation(SensitiveContentEgressPoint, UserId?, MailAccountId?, CancellationToken)

Opens the report of one guarded operation, which is what a caller actually waits on.

RecordGuarded(SensitiveContentEgressPoint, RedactedText, TimeSpan)

Records one text that passed a guard, whatever the guard had to remove from it.

RecordRefused(SensitiveContentEgressPoint, SensitiveContentScannerKind)

Records one egress refused because the scanner guarding it could not answer.

RecordStopped(SensitiveContentEgressPoint, SensitiveContentEgressRefusal)

Records one act stopped because a screened egress point carried material the deployment will not let leave.