Skip to content

Observability

Use HttpObserver to record sanitized request events:

var client = OkatanaClient.builder()
    .baseUrl(url)
    .apiKey(token)
    .observer(event -> {
        metrics.timer("okatana.http").record(event.elapsed());
        log.debug("{} {} status={} attempt={}",
            event.method(), event.uri(), event.status(), event.attempt());
    })
    .build();

HttpEvent contains method, URI, status when available, attempt number, elapsed duration, and an optional transport error. It deliberately does not contain headers or the API key.

Recommended dimensions are operation family, HTTP status class, retry attempt, latency, and deployment identifier. Avoid high-cardinality ticket/document IDs unless your telemetry system is designed for them.