Skip to content

Telemetry & Observability

OxideShield™ provides comprehensive telemetry via OpenTelemetry.

Metrics

Metric Type Description
oxideshield.guard.checks_total Counter Total checks
oxideshield.guard.blocks_total Counter Blocked requests
oxideshield.guard.latency_ms Histogram Check latency
oxideshield.guard.active_checks Gauge Active checks

Enable Telemetry

[dependencies]
oxide-guard = { version = "0.1", features = ["telemetry"] }
use oxide_guard::telemetry::{TelemetryConfig, init_telemetry};

let config = TelemetryConfig::production("http://otel-collector:4317")
    .with_service_name("my-service");

init_telemetry(&config)?;

Instrumented Guards

use oxide_guard::telemetry::{InstrumentedGuard, InstrumentGuard};

let guard = PatternGuard::new("pattern").with_instrumentation();
// or
let guard = InstrumentedGuard::new(PatternGuard::new("pattern"));

Export Formats

  • OTLP - OpenTelemetry Protocol (gRPC)
  • Prometheus - /metrics endpoint
  • JSON - File export

Grafana Dashboard

Import the OxideShield™ dashboard from examples/grafana/dashboard.json.