Observability

Runtime diagnostics, lifecycle observers, and the Micrometer and OpenTelemetry bridges for the Repost Kotlin client.

The runtime exposes the same credential- and payload-free windows as the Java SDK: a diagnostics snapshot, a bounded observer stream, and optional metrics and tracing bridges.

Diagnostics

repost.diagnostics returns a credential- and payload-free snapshot: inFlightOperations, droppedObserverEvents, observerFailures, and admission-rejection counters.

Observers and bridges

Register a RepostObserver (via the observer config property) for bounded lifecycle events, or wire a metrics or tracing bridge. The observer is intentionally lossy (a bounded 1,024-event queue that drops and counts rather than blocking a send) and runs off the transport thread, so a slow or throwing observer never changes an application send:

// sh.repost:repost-client-micrometer
RepostClient {
    observer = MicrometerRepostObserver.create(meterRegistry)
}

The recorded meters and spans are identical to the Java SDK: repost.client.* meters tagged with outcome, error.code, delivery.state, and http.status.class, and one repost.send span with a repost.send.attempt child per attempt, with low-cardinality metadata only, never payloads or credentials.

Continue