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
- Java
- Node.js
var metrics = client.analytics().getMetrics();
const metrics = await client.analytics().getMetrics();
Audit logs
Paginated log of administrative and API actions taken on the project.
- Java
- Node.js
var logs = client.analytics().getAuditLogs(50, 0); // limit, offset
const logs = await 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.
- Java
- Node.js
var entries = client.analytics().getDeadLetterQueue(50, 0); // limit, offset
var entry = client.analytics().getDlqEntry(dlqId);
var retryResult = client.analytics().retryFailedNotification(dlqId);
const entries = await client.analytics().getDeadLetterQueue(50, 0); // limit, offset
const entry = await client.analytics().getDlqEntry(dlqId);
const retryResult = await 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).