ciallo-actuator

    Production /healthz, parallel timeout-guarded /readyz, Prometheus/OpenMetrics /metrics (with 9-phase LifecyclePhase histograms & pool stats), and dev redacted diagnostics for unmbt/ciallo

    actuator
    healthz
    readyz
    metrics
    prometheus
    openmetrics
    ciallo
    Download zip
    Author
    Version
    0.1.1
    License
    MIT
    Last updated
    13 hours ago
    Downloads
    8

    #unmbt/ciallo-actuator

    Production observability endpoints for unmbt/ciallo:
    • GET /healthz (liveness)
    • GET /readyz (parallel timeout-guarded readiness aggregator over App::health_checks())
    • GET /metrics (Prometheus/OpenMetrics 1.0 with QPS, latency buckets, 9-stage LifecyclePhase histograms, and pool stats)
    • Optional dev-only /_debug/routes and redacted /_debug/config

    ActuatorBundle

    pub struct ActuatorBundle {
    registry : MetricsRegistry
    options : ActuatorOptions
    }

    CapabilityBundle wrapper for attaching Actuator with explicit health probes.

    ActuatorBundle::ActuatorBundle

    fn ActuatorBundle::ActuatorBundle(registry? : MetricsRegistry, options? : ActuatorOptions) -> ActuatorBundle

    ActuatorOptions

    pub(all) struct ActuatorOptions {
    healthz_path : String
    readyz_path : String
    metrics_path : String
    probe_timeout_ms : Int
    enable_debug_endpoints : Bool
    debug_routes_path : String
    debug_config_path : String
    extra_checks : Array[&
    HealthCheck
    ]
    debug_config_provider : () ->
    Json
    ?
    }

    ActuatorOptions::ActuatorOptions

    fn ActuatorOptions::ActuatorOptions(healthz_path? : String, readyz_path? : String, metrics_path? : String, probe_timeout_ms? : Int, enable_debug_endpoints? : Bool, debug_routes_path? : String, debug_config_path? : String, extra_checks? : Array[&
    HealthCheck
    ], debug_config_provider? : () ->
    Json
    ) -> ActuatorOptions

    HistogramData

    type HistogramData

    MetricsRegistry

    pub struct MetricsRegistry {
    buckets : Array[Double]
    http_requests : Map[String, Int64]
    http_duration : HistogramData
    phase_durations : Map[String, HistogramData]
    custom_counters : Map[String, Int64]
    custom_gauges : Map[String, Double]
    pool_collectors : Array[() -> PoolMetricsSnapshot]
    }

    Prometheus / OpenMetrics 1.0 registry collecting HTTP QPS, latency buckets, all 9 LifecyclePhase histograms, and external connection pool stats.

    MetricsRegistry::MetricsRegistry

    fn MetricsRegistry::MetricsRegistry(buckets? : Array[Double]) -> MetricsRegistry

    MetricsRegistry::inc_counter

    fn MetricsRegistry::inc_counter(self : MetricsRegistry, name : String, delta? : Int64) -> Unit

    MetricsRegistry::record_trace

    MetricsRegistry::register_pool_collector

    fn MetricsRegistry::register_pool_collector(self : MetricsRegistry, collector : () -> PoolMetricsSnapshot) -> Unit

    MetricsRegistry::render_openmetrics

    fn MetricsRegistry::render_openmetrics(self : MetricsRegistry) -> String

    MetricsRegistry::set_gauge

    fn MetricsRegistry::set_gauge(self : MetricsRegistry, name : String, value : Double) -> Unit

    PoolMetricsSnapshot

    pub(all) struct PoolMetricsSnapshot {
    name : String
    total : Int
    idle : Int
    in_use : Int
    closed : Bool
    } derive(Eq,
    Debug
    )

    default_latency_buckets_secs

    let default_latency_buckets_secs : Array[Double]

    mount_actuator

    Mounts /healthz, parallel timeout-guarded /readyz, OpenMetrics /metrics, and optional dev diagnostic endpoints directly onto app.

    run_readiness_probes

    async fn run_readiness_probes(probes : Array[&
    HealthCheck
    ], probe_timeout_ms? : Int) -> (Bool, Array[
    HealthStatus
    ])

    Runs all health probes in parallel with per-probe timeout isolation.