Repository navigation
Operations Observability
Scrape Spector Synapse with Prometheus and visualize it in Grafana. This page covers the
/actuator/prometheusendpoint, the JVM and Spector metrics it exposes, a Prometheus scrape configuration, the bundled Grafana dashboard, and the HelmServiceMonitor.
Spector Synapse exposes metrics through Spring Boot Actuator backed by Micrometer. The endpoint is enabled in synapse/spector-synapse/src/main/resources/application.yml:
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheusThe endpoint is served on the main API port (spector.port, default 7070).
Important
The Prometheus exposition format requires the micrometer-registry-prometheus dependency on the classpath. Without it, /actuator/prometheus is not available even when prometheus is listed in management.endpoints.web.exposure.include. spector-synapse declares it in its pom.xml:
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>Spector-specific gauges are registered only when a Micrometer MeterRegistry is present and spector.metrics.enabled is true (the default in application.yml).
# Full scrape output
curl -s http://localhost:7070/actuator/prometheus
# Only JVM heap and thread metrics
curl -s http://localhost:7070/actuator/prometheus | grep -E '^jvm_(memory_used_bytes|threads_live_threads)'
# Only Spector metrics
curl -s http://localhost:7070/actuator/prometheus | grep '^spector_'Note
Verified locally: scraping /actuator/prometheus on a standalone Synapse node returned valid Prometheus-format output (JVM metrics plus spector_memory_* and spector_ns_owner) without any authentication hurdles.
With the default spector.auth.enabled=false, every path is permitted and the endpoint can be scraped without credentials. Do not expose an unauthenticated node beyond a trusted network.
When spector.auth.enabled=true, only spector.auth.public-paths are anonymous. The default list contains /actuator/health but not /actuator/prometheus, so a scraper would receive 401. Either add the path explicitly (and restrict network access to the port), or configure the scraper with credentials:
SPECTOR_AUTH_PUBLIC_PATHS=/actuator/health,/actuator/prometheus,/api/docs,/swagger-ui.html,/swagger-ui/**,/v3/api-docs/**,/v3/api-docsSpector registers meters with Micrometer's dotted names. The Prometheus registry converts them to Prometheus conventions:
| Micrometer rule | Example |
|---|---|
| Dots become underscores |
spector.memory.count → spector_memory_count
|
Counters get a _total suffix |
spector.route.stale → spector_route_stale_total
|
Timers are exported in seconds as _seconds_count, _seconds_sum, _seconds_max
|
spector.route.lookup → spector_route_lookup_seconds_count
|
| Tags become labels |
type="soft", mode="..."
|
Note
The memory count gauge is named spector.memory.count (spector_memory_count). There is no spector.memory.records metric.
| Prometheus name | Labels | Description |
|---|---|---|
jvm_memory_used_bytes |
area (heap/nonheap), id (pool) |
Used memory per pool |
jvm_memory_committed_bytes |
area, id
|
Committed memory per pool |
jvm_buffer_memory_used_bytes |
id (direct/mapped) |
NIO buffer pool usage |
jvm_threads_live_threads |
— | Live JVM threads |
These are standard Micrometer JVM binders; see the full scrape output for the complete list (GC, classes, CPU, etc.).
Registered by SpectorMemoryGauges (memory/spector-metrics) and MemoryRequestBinder (synapse/spector-synapse). Present in all deployment modes, including standalone.
| Micrometer name | Prometheus name | Labels | Description |
|---|---|---|---|
spector.memory.count |
spector_memory_count |
— | Total number of memories across all tiers |
spector.memory.pinned.bytes |
spector_memory_pinned_bytes |
— | Off-heap bytes pinned in RAM |
spector.memory.page.faults |
spector_memory_page_faults |
type (soft/hard) |
Cumulative process page faults, read from /proc/self/stat. Linux only — reports 0 elsewhere |
spector.ns.owner |
spector_ns_owner |
— | Number of namespace memory instances cached by the namespace resolver |
| Micrometer name | Type | Tags | Where |
|---|---|---|---|
spector.route.lookup |
Timer | mode |
MemoryRequestBinder.enforceOwnership() |
spector.route.lookup |
Counter | tier |
ClusterRoutingConfiguration routing cache listener |
spector.route.not_owner |
Counter |
namespace, owner
|
Request refused: namespace owned by another node |
spector.route.stale |
Counter |
namespace, owner
|
Request refused: incoming epoch older than active epoch |
spector.route.fenced |
Counter | namespace |
Request refused: fence token mismatch |
Warning
Routing metrics are not produced in standalone mode. MemoryRequestBinder.enforceOwnership() and enforceFence() return immediately when the node role is STANDALONE, and ClusterRoutingConfiguration is only loaded when spector.cell.role is set to something other than standalone. On a standalone node these series are absent, and the routing panels in the Grafana dashboard stay empty. Counter series additionally only appear after their first increment.
Note
spector.route.lookup is registered both as a timer (tag mode) and as a counter (tag tier). Routing metrics have not yet been verified against a running clustered deployment, so check which spector_route_lookup_* series your scrape actually contains. The bundled dashboard uses the timer series (spector_route_lookup_seconds_*).
Minimal static configuration for a node on localhost:7070:
scrape_configs:
- job_name: spector-synapse
metrics_path: /actuator/prometheus
scrape_interval: 15s
scrape_timeout: 10s
static_configs:
- targets:
- localhost:7070When Prometheus runs in Docker and Spector runs on the host, replace localhost with host.docker.internal (Docker Desktop) or the host IP.
Verify the target is UP at http://<prometheus>:9090/targets, then query e.g. spector_memory_count in the Prometheus UI.
A ready-to-import dashboard is provided at deploy/monitoring/grafana-dashboard.json.
| Row | Panels |
|---|---|
| JVM | Heap used vs. committed · Non-heap and NIO buffer pools · Live threads |
| Spector memory | Memory count (stat + time series) · Pinned off-heap bytes · Page faults by type · Cached namespace instances |
| Routing (non-standalone only) | Route lookups/s by mode · Average route lookup latency · Route rejections/s (not_owner, stale, fenced) |
- In Grafana, open Dashboards → New → Import.
- Click Upload dashboard JSON file and select
deploy/monitoring/grafana-dashboard.json(or paste its contents). - Select your Prometheus datasource when prompted, then click Import.
- Use the Datasource and Instance variables at the top of the dashboard to switch Prometheus sources or filter nodes.
The dashboard requires Grafana 10 or newer and only a Prometheus datasource.
The Helm chart ships a Prometheus Operator ServiceMonitor in deploy/helm/spector/templates/servicemonitor.yaml. It is controlled by values.yaml:
# ── Observability ──
serviceMonitor:
enabled: true
interval: "15s"When enabled, the chart renders a ServiceMonitor that:
- selects Services labeled
app.kubernetes.io/name: <chart name>, - scrapes the Service port named
api(Service port7070→ container port7070), - uses path
/actuator/prometheus,serviceMonitor.interval(default15s), and a10sscrape timeout.
# Install / upgrade with the ServiceMonitor enabled (the default)
helm upgrade --install spector deploy/helm/spector --set serviceMonitor.interval=30s
# Disable it on clusters without the Prometheus Operator CRDs
helm upgrade --install spector deploy/helm/spector --set serviceMonitor.enabled=false
# Inspect the rendered manifest without installing
helm template spector deploy/helm/spector --show-only templates/servicemonitor.yamlThings to check in your cluster:
-
CRDs required. The
monitoring.coreos.com/v1ServiceMonitorCRD must be installed (e.g. via kube-prometheus-stack), otherwise the install fails. SetserviceMonitor.enabled=falseif it is not. -
Operator selection. Many Prometheus Operator installs only pick up
ServiceMonitors carrying a specific label (for kube-prometheus-stack, commonlyrelease: <prometheus-release>). The chart does not add such a label, so configure the PrometheusserviceMonitorSelectoraccordingly. -
Which pods are scraped. The main Service selects
gatewaypods in the defaultsplittopology andownerpods insingle-roletopology, so the ServiceMonitor scrapes those pods through that Service. -
Authentication. If
spector.auth.enabled=true, add/actuator/prometheustoSPECTOR_AUTH_PUBLIC_PATHSas described above.
Note
The ServiceMonitor configuration above is derived from the Helm chart templates. Scraping through the Prometheus Operator and routing metrics in a clustered (HA) deployment have not yet been verified at runtime; only local standalone scraping of /actuator/prometheus has been verified.
- Home
-
Getting Started
- Quick Start
- Installation
- Developer Guide
- JDK API Status
- MCP Server
- Java SDK
- Java API Reference
- Python SDK
- TypeScript SDK
- Spring AI Integration
- CLI Reference
- REST API
- API Playground
- Error Codes
- Configuration
- Deployment
-
Cognitive Memory
- Overview
- Getting Started
- Use Cases
- API Reference
- Concepts
- Pathways
- Scoring features
- Profiles
- Experimental
- Internals
- Design ancestry
-
Memory Kernel
- Overview
- Bundle Architecture
- Memory Shapes
- Binary Layouts & Tags
- WAL & Durability
-
Region Reference
- Overview & Index
- Partition Regions
-
Runtime Regions
- Working Memory
- Co-Activation Matrix
- Index MIDX
- Index IDPL
- Hebbian Graph
- Temporal Chains
- Temporal Facts
- Entity Directory
- Entity Names Pool
- HyperEntity Graph
- Entity Types Registry
- Relation Types Registry
- BM25 Lexical Index
- Checkpoint
- Insula (Somatic Self-Model)
- Continuity
- Provenance
- SPLADE Sparse Index
- Entity Reverse Index
- Identity Regions
- Synapse & Cortex
-
Architecture
- System Overview
- Core Concepts
- Ingestion Pipeline
- MCP Integration
- Distributed Mode
- Event Notifications
- Namespace Sharding
- Single-Namespace Scale & Capacity Limits
- Scale Benchmark Empirical Results
- Writer Quiesce Pause Empirical Results
- Kill-Owner Failover Empirical Results
- Salience & Importance Architecture
- GPU Acceleration
- Performance Tuning
- Test Framework & LLM Judge
- Chat & Visual Test Infrastructure
- Security & Data
-
Architecture Decision Records (ADRs)
- Overview
- Template
- Master Catalog (0001-0085)
-
Memory Kernel & Storage Formats
- ADR-0001: Graph Compression Strategy for Entity Graph
- ADR-0002: Multi-Partition Recall Fan-Out & Frozen Reten...
- ADR-0003: Completing Hypergraph Entity-Graph Graduation
- ADR-0004: Mmap Bundle Architecture & File Descriptor Sc...
- ADR-0005: spector-memory Technical Debt Hardening
- ADR-0042: Graph Recall Architecture and Cognitive Trave...
- ADR-0043: Single-VMA Bundle Layout Specification
- ADR-0044: Memory Kernel Isolation, Composition, and Layout
- ADR-0045: Spector Memory Import & Export Pipeline
- ADR-0046: Single Engram, Four Stores Storage Architecture
- ADR-0047: Episodic Memory and Engram Model Hierarchy
- ADR-0057: Remediation of Hardcoded Memory Offsets and Alignment Constants
- ADR-0062: Spector Memory Organization — Three-Plane Architecture
- ADR-0082: Index Plane Lifecycle, Derived Views, and Reconciliation
-
Active Inference Self-Model Engine (AISME)
- ADR-0006: Episodic Conversation Architecture
- ADR-0007: ReflectPathway — Biological Sleep Consolidation
- ADR-0008: Cognitive Substrate Evolution (TANGLE, GPM, M...
- ADR-0009: AISME Phase 1 — Homeostatic Affective Core
- ADR-0010: AISME Phase 2 — Free-Energy Guided Recall
- ADR-0011: AISME Phase 3 — Modern Hopfield Associative M...
- ADR-0012: AISME Phase 4 — Neural Manifold Distance (NMD)
- ADR-0013: AISME Phase 5 — Predictive Coding Narrative Self
- ADR-0014: AISME Phase 6 — Consciousness Continuity Metr...
- ADR-0015: AISME Phase 7 — Synaptic Relay Wiring & Pathw...
- ADR-0016: AISME Phase 8 — Closed-Loop Epistemic Learning
- ADR-0017: AISME Phase 9 — Generative Counterfactuals & ...
- ADR-0018: AISME Phase 10 — WanderPathway & Kernel Conti...
- ADR-0019: AISME Phase 11 — Expected Free Energy Policy ...
- ADR-0020: AISME Phase 12 — Continuous Self-Dynamics
- ADR-0023: AISME Complete Loop Closure & CognitiveVector...
- ADR-0024: Polymorphic SoulContext Hierarchy in AISME
- ADR-0027: Soul-Conditioned & Salience-Modulated Persona...
- ADR-0048: Cross-Capture Graph & CoActivation Kernel
- ADR-0049: Identity Trajectory Lyapunov Stability
- ADR-0050: Event Density Gating and Dynamic Epistemic Co...
- ADR-0051: Bayesian Online Change-Point Episode Segmenta...
- ADR-0052: Differential Privacy and Edge Anonymization
- ADR-0053: Multimodal Composite Importance Scoring
- ADR-0054: Lifespan-Adaptive Forgetting & Retention Kernel
- ADR-0055: LSR & RFF Dense Associative Memory Engineerin...
- ADR-0056: Log-Sum-ReLU (LSR) & Random Fourier Features ...
- ADR-0058: Linguistic & Vocal Prosody Expression Engine
- ADR-0063: Spacetime Vector Search and Synaptic Relay Architecture
- ADR-0064: Spacetime Simulation on Wander, Dream, and Express Pathways
- ADR-0071: Remember Cognitive Pathway Architecture
- ADR-0072: Six-Phase Fused Cognitive Scoring Pipeline
- ADR-0073: Recall Cognitive Pathway and Multi-Phase Retrieval Architecture
- ADR-0074: Reflect Cognitive Pathway and Sleep Consolidation Architecture
- ADR-0078: Salience Network and Thalamic Cognitive Profiles Architecture
-
Platform, Synapse & Clustering
- ADR-0021: Nucleus Symmetric Hardware Abstraction Layer ...
- ADR-0022: Embodied Kinesics & Phenomenological MCP Engine
- ADR-0025: Declarative MCP Tool Definitions via JSON Sch...
- ADR-0026: Dual-Plane Concurrency & Async Queue Backpres...
- ADR-0028: Dual-Plane Memory Audit Architecture (Separat...
- ADR-0029: Episodic→Semantic Lineage Provenance Region
- ADR-0030: Unified Engram Encoding Header Architecture
- ADR-0031: Unified Configuration Architecture & Bypass E...
- ADR-0032: Persona Enactment — Soul as Policy over Memory
- ADR-0033: Decoupling Cognitive & Mathematical Kernels t...
- ADR-0034: Cell Topology, Namespace Ownership, and HA Cl...
- ADR-0035: Cognitive Pathway Framework Rearchitecture
- ADR-0036: Pathway Error Handling, Isolation, and Circui...
- ADR-0037: Ingestion Boundary and Sensory Relocation
- ADR-0038: SIMD-Accelerated BM25 Lexical Scoring Optimiz...
- ADR-0039: Robust Unified Rate Limiting Architecture
- ADR-0040: Universal Apache Camel Messaging Channels
- ADR-0041: Unified Connector Architecture for Ingestion
- ADR-0059: Java 27 Upgrade Strategy and Value Class Migration
- ADR-0060: Cognitive Continuity Layer and Decoded Mind Streams
- ADR-0061: In-Memory Multi-Tenant Quartz Scheduler
- ADR-0065: Client SDK Architecture, OpenAPI, and MCP Integration
- ADR-0066: Engine & CLI Stabilization — Issue #727 Hardening
- ADR-0067: Cell-Based High Availability and Namespace-Sticky Sharding
- ADR-0068: Phileas PII Redaction Engine for Spector Synapse
- ADR-0069: Synapse-Owned Tool Access Policy
- ADR-0070: Unified Error Taxonomy and Exception Handling Architecture
- ADR-0075: Extensible LLM and Multimodal Embedding Provider SPI
- ADR-0076: Zero-Dependency Pluggable Cache Abstraction
- ADR-0077: Model B Asynchronous Task Queue and Concurrency
- ADR-0079: Asynchronous Memory Event and Telemetry Notification Bus
- ADR-0080: Observed Memory and Pathway Metrics Telemetry Architecture
- ADR-0081: Dedicated Reactive Ingress and In-Process Path Router
- ADR-0083: Namespace-Isolated Memory Analytics & Telemetry
- ADR-0084: Dual-Plane Conversation Persistence
- ADR-0085: Dynamic Synapse Configuration Overrides and Runtime Propagation
-
Modules Registry
- Overview
- Foundation Layer (/nucleus)
- Cognitive Layer (/memory)
- Gateway Layer (/synapse)
- Benchmarks & UI
- Deep Dives
-
Community
- Governance
- Contributing
- FAQ
- Glossary
- Roadmap
- 🔬 Labs
- Third-Party Legal