Skip to main content

Module plugin

Module plugin 

Source
Expand description

ArclyObservabilityPlugin — wires up all four observability backends in one plugin that drops into any arcly-http application.

§What it sets up

  • Structured JSON logs via tracing-subscriber (respects RUST_LOG).
  • Prometheus metrics at GET /metrics.
  • OTLP distributed traces exported to the configured gRPC endpoint.
  • Health / readiness probes at GET /healthz and GET /readyz.

§Usage

App::launch_with_plugins::<AppModule>(
    "0.0.0.0:3000",
    OpenApiInfo { /* ... */ },
    vec![
        Box::new(ArclyObservabilityPlugin {
            service_name:    "my-service",
            service_version: env!("CARGO_PKG_VERSION"),
            otlp_endpoint:   "http://localhost:4317",
        }),
    ],
).await

Structs§

ArclyObservabilityPlugin
Drop-in observability plugin. Add to App::launch_with_plugins to get structured logs, Prometheus metrics, OTLP traces, and health endpoints with zero changes to handler code.