Skip to main content

Analytics & Observability

client.analytics() exposes read access to your project's operational data — metrics, audit trail, and the dead-letter queue for failed deliveries.

Metrics

var metrics = client.analytics().getMetrics();

Audit logs

Paginated log of administrative and API actions taken on the project.

var logs = client.analytics().getAuditLogs(50, 0); // limit, offset

Dead-letter queue (DLQ)

Notifications that failed dispatch land in the DLQ. List entries, inspect one, or retry it.

var entries = client.analytics().getDeadLetterQueue(50, 0); // limit, offset
var entry = client.analytics().getDlqEntry(dlqId);
var retryResult = client.analytics().retryFailedNotification(dlqId);

A typical recovery loop: poll getDeadLetterQueue, inspect each entry to understand the failure, fix the underlying cause (e.g. a bad phone number or an expired provider credential), then call retryFailedNotification(dlqId).