Skip to main content
Every @nekzus/liop server instance exposes a native Prometheus text-format metrics endpoint at GET /metrics. No sidecar, agent, or external dependency is required — the metrics registry is built into the SDK core and refreshes process-level gauges synchronously on each scrape request.

Two-Tier Observability Architecture

The LIOP telemetry model is architecturally segregated into two complementary layers:

Layer A: Native In-Situ Telemetry (Zero External Dependencies)

Embedded directly into the @nekzus/liop core runtime:
  • Inlined BPE Tokenizer (o200k_base): Measures exact input and output token consumption in-situ with zero external npm dependencies (16.5 MB footprint reduction).
  • Origin Dataset Footprint Tracking: Measures the raw size of origin datasets (originDatasetTokens) and computes net token savings (liop_tokens_saved_total = originDatasetTokens - outputTokens) whenever logic is executed in-situ.
  • Deterministic AST Instruction Fuel: Instruction-level AST execution scoring quantized into 100-unit buckets per NIST SP 800-53 to eliminate timing side-channel leaks.
  • Immutable Audit Ledger (audit.jsonl): Cryptographic SHA-256 hash-chained execution records satisfying SOC 2 Type II and HIPAA controls.
  • Dynamic Prometheus Text Endpoint: Serves instant runtime counters, gauges, and histograms via GET /metrics.

Layer B: Auxiliary Production Observability Stack

Production-ready monitoring and developer tooling deployed alongside the mesh:
  • Prometheus v3.14: Scrapes mesh enclaves every 15 seconds, attributing node_role (nexus-seed, vault-enclave, bank-enclave, oracle-consortium, edge-remote, relay-backbone, blg-perimeter) and tier metadata labels.
  • Grafana v13.2.1: Master Dashboard (tools/dashboards/liop-overview.json) with 26 real-time panels tracking service availability SLOs, data sovereignty ratios, and cryptographic latencies.
  • LIOP Studio (@nekzus/liop-studio): Official developer studio, mesh scanner, and logic-on-origin inspector running on port :16000 (interactive UI and headless CLI).

Metrics Reference

The SDK emits three categories of metrics: protocol counters, resource gauges, and cryptographic histograms.

Protocol Counters

Resource Gauges

Gauges like liop_mesh_peers_connected and liop_manifest_cache_size are sampled synchronously inside the GET /metrics handler, ensuring Prometheus always receives the instantaneous runtime state — not a stale cached snapshot.

Cryptographic Histograms


Production-Agnostic Deployment

The LIOP server is a standard Node.js process. It binds to a configurable HTTP port and operates identically across bare metal, VMs, containers, or serverless runtimes. No orchestrator dependency exists.

Environment Variables

Running as a System Service

Prometheus Scraping

For environments with outbound-only firewalls (banking, healthcare), configure OpenTelemetry Collector with the prometheusreceiver scraping locally and otlphttp exporting to your OTLP backend.

Official Observability Stack (IaC)

The SDK ships a ready-to-deploy monitoring stack under examples/observability/:
This starts:
  • Prometheus on :9090 with pre-configured scrape targets and alerting rules
  • Grafana on :3001 with the Master Dashboard auto-provisioned

Grafana Master Dashboard

The LIOP Overview Dashboard provides 26 panels organized in five operational sections: To import the dashboard into an existing Grafana instance, navigate to Dashboards → Import and upload tools/dashboards/liop-overview.json.

Alerting Rules

The SDK includes production-tested Prometheus alerting rules in examples/observability/prometheus/alerting_rules.yml:

Synthetic Traffic Generator

The SDK includes a built-in telemetry stream generator for pre-production validation and load testing:
This script executes a continuous stream of logic-injection calls against the running mesh, cycling through all registered capabilities (banking, healthcare, edge IoT) and producing real Prometheus metric emissions. Use it to:
  • Validate Prometheus scraping and Grafana panel rendering before production rollout
  • Stress-test WASI fuel consumption scaling under sustained load
  • Verify alerting rule thresholds against empirical traffic patterns