Skip to content
English

DeadLetterAttribution

DeadLetterAttribution = object

Defined in: src/SystemMessages.ts:139

What the lost envelope was carrying besides its payload — the fields that say which request the loss belongs to rather than what was in it (#773).

Both are the envelope’s own, copied verbatim: context is the MDC snapshot LocalActorRef.tell took from the sender’s scope, and trace is the span context that was active at the same moment. Together they are what turns “a message to this actor was lost” into “that request lost a message” — the whole reason a counter is not an answer.

Grouped rather than two more positional parameters, because DeadLetter is constructed at two dozen sites and a fourth and fifth argument of similar shape is a transposition waiting to happen. It also leaves room: anything else the envelope carries that is worth preserving belongs here rather than in another parameter.

Both fields are optional and normally absent. A tell outside any LogContext.run carries no MDC, and a system with the tracing extension disabled carries no span — the envelope omits them in exactly those cases, and a letter built from one has nothing to copy.

readonly optional context?: LogContextData

Defined in: src/SystemMessages.ts:141

The MDC snapshot the envelope carried. See LogContext.


readonly optional trace?: SpanContext

Defined in: src/SystemMessages.ts:143

The span context the envelope carried. See Tracer.