#Observability & Inspector

Version: 0.33.0 Updated: 2026-03-15 Applies to: ranvier-inspector Category: Deep Dives


Production-ready trace storage, metrics, and real-time debugging with ranvier-inspector.

#Inspector Runtime

Component Description
TraceStore Persistent storage for completed traces with query and retention policies
BearerAuth Token-based authentication for production Inspector endpoints
AlertHook / AlertDispatcher Real-time alert routing on fault or threshold conditions

#Metrics & Debugging

  • MetricsCollector: Sliding-window latency histograms (p50/p95/p99) per circuit.
  • StallDetector: Threshold-based detection for unresponsive transitions.
  • ConditionalBreakpoint: JSON path condition evaluator for step-through debugging.
  • PayloadCapturePolicy: Off/Hash/Full payload capture for compliance and debugging.

#OTLP & Trace Pipeline

  • Circuit Mapping: Every Axon execution maps to a standard OpenTelemetry Trace.
  • Node Spans: Transitions are automatically recorded as Spans with metadata.
  • WebSocket Streaming: Real-time event feed for Inspector UI and external consumers.

#Quickstart

let inspector = Inspector::builder()
    .with_bearer_token_from_env()
    .with_trace_store(InMemoryTraceStore::new(1000))
    .build(axon);
// GET /api/v1/metrics, /api/v1/traces/stored
inspector.serve("0.0.0.0:9090").await?;

#Workflows

  1. Add ranvier-inspector to your workspace dependencies.
  2. Configure BearerAuth via RANVIER_INSPECTOR_TOKEN env var.
  3. Choose a TraceStore backend (InMemoryTraceStore for dev, SqliteTraceStore for prod).
  4. Connect to Jaeger, Tempo, or Datadog using standard OTLP exporters.
  5. Monitor node-level heatmaps in the Inspector UI or Ranvier Studio.

#Key Types

Type Description
Inspector Builder for observability server with auth, storage, and metrics
TraceStore Trait for persistent trace storage backends (InMemory, Sqlite)
BearerAuth Token-based authentication for securing Inspector endpoints
AlertDispatcher Routes alerts from fault conditions to configured AlertHook handlers
MetricsCollector Sliding-window metrics collector for latency and throughput analysis