Skip to content
You're viewing documentation for v1.1.0. It may be out of date.Go to latest
Email SDK
Esc
↑↓navigate↵open⌘Jpreview
On this page

Observability plugin

Emit send, retry, and error events through isolated log, metric, and trace callbacks.

observabilityPlugin calls each configured observer with Promise.allSettled, so observer failures do not reject the send.

Event types

Type Emitted when Additional fields
email.sent An adapter succeeds. responseId?
email.retry A retry is scheduled. nextAttempt, delayMs, error
email.error An adapter reaches terminal failure. error

Every event includes the adapter, attempt, redacted message facts, and optional send metadata.

Default redaction

The built-in redactor keeps:

  • subject
  • recipient counts
  • whether HTML or text exists
  • attachment count
  • tag names
  • metadata keys

It excludes bodies, addresses, attachment contents, and metadata values. If subjects are sensitive, provide redactMessage and return a stricter RedactedEmailMessage.

Hooks and middleware

Understand lifecycle ordering and failure isolation.

Telemetry and privacy

Separate SDK analytics from your application observability.

Last updated on