05 · ENGINE
Metrics
GET /v1/metrics returns Prometheus text format. Every metric below is emitted unconditionally and has per-index labels where it makes sense.
Counters
docs_indexedTotal docs written.
queries_executedTotal queries served.
bytes_writtenBytes to segment + WAL.
bytes_readBytes read back from segments.
rerank_requestsSearches that carried a
rerank block, by outcome: applied, degraded, refused (nothing sent), failed.rerank_documents_judgedDocuments the rerank provider returned a verdict for — the billing unit.
rerank_provider_tokensTokens the rerank provider reported, by
kind: input, output.Histograms
query_latencyFull query path, in seconds.
index_latencyMemtable + WAL write path.
flush_durationMemtable → segment flush.
merge_durationSegment merge time.
wal_write_latencyWAL fsync latency.
Gauges
segment_countLive segments per index.
doc_countVisible docs per index.
memory_usageRSS in bytes.
active_searchesIn-flight queries.
wal_size_bytesLive WAL size.
Scrape config
# prometheus.yml
scrape_configs:
- job_name: xerj
metrics_path: /v1/metrics
static_configs:
- targets: ["xerj.internal:8080"]
authorization:
type: Bearer
credentials: ${XERJ_API_KEY}
Source · engine/crates/xerj-common/src/metrics.rs
◀ PREVClustering
NEXT ▶Auth & TLS