diff --git a/pages/database-management/monitoring.mdx b/pages/database-management/monitoring.mdx index 24e93396b..4391a7e47 100644 --- a/pages/database-management/monitoring.mdx +++ b/pages/database-management/monitoring.mdx @@ -428,6 +428,23 @@ Session metrics are global; they are not scoped to any individual database. | memgraph\_successful\_queries\_total | Counter | Number of successful queries. | | memgraph\_transient\_errors\_total | Counter | Number of transient errors (errors which can be retried). | | memgraph\_write\_write\_conflicts\_total | Counter | Number of write-write conflicts (two transactions modifying the same node simultaneously). | + | memgraph\_transaction\_begin\_seconds | Histogram | Time to start a transaction. | + | memgraph\_commit\_lock\_wait\_seconds | Histogram | Time a commit waits for the commit lock. | + | memgraph\_commit\_seconds | Histogram | Time to commit a write transaction. | + +The last three histograms show whether transactions wait on locks or do work. A +transaction starts once per query, or once at `BEGIN` in an [explicit +transaction](/fundamentals/transactions#explicit-transactions). A start waits +while an operation such as index creation holds exclusive access, and a start +that times out is still recorded. Commits take the commit lock one at a time, +and so do transaction starts and garbage collection. + +Commit time includes the write-ahead log (WAL) write and waiting for SYNC and +STRICT_SYNC [REPLICAs](/database-management/clustering/replication/how-replication-works#replication-modes). +Memgraph also records failed commits, and REPLICAs record the commits they apply. In +`ON_DISK_TRANSACTIONAL` mode, both commit histograms stay empty. `SHOW METRICS +INFO` reports the three histograms as `TransactionBeginLatency`, +`CommitLockWaitLatency`, and `CommitLatency`. #### Trigger metrics