Skip to content

Instrumentation & Tracing

AI Coding PromptClaude & Cursor
authkestra = "0.13"

Configure production observability for Authkestra v0.13 (authkestra = "0.13", features = ["engine", "axum"]). Leverage built-in tracing spans and events emitted across authentication ceremonies, OAuth handshakes, and Cedar policy evaluation. Ensure span attributes never leak PII or plaintext credentials while logging decision reasons and policy IDs. Refer to https://docs.authkestra.com/llms-full.txt.

Authentication issues in production can be notoriously difficult to debug.

To solve this, Authkestra is deeply instrumented with the tracing crate. Every major decision, protocol step, and logical branch emits a granular span or event.

As part of our internal Definition of Done (DoD), every new feature in Authkestra must include adequate tracing instrumentation.

Simply initialize a tracing_subscriber in your application to see the rich logs generated by the engine.

tracing_subscriber::fmt()
.with_max_level(tracing::Level::DEBUG)
.init();

You’ll see exactly when tokens are exchanged, when sessions are created, and precise error reasons if an authentication flow fails.