@@ -62,8 +62,8 @@ See the [FFI README](ffi/README.md) for more details on FFI metrics configuratio
6262 - Labels: ` success=true|false `
6363 - Use: Monitor proposal creation success rate
6464
65- - ** ` proposal.create_ms ` ** (counter with ` success ` label)
66- - Description: Time spent creating proposals in milliseconds
65+ - ** ` proposal.create_s ` ** (counter with ` success ` label)
66+ - Description: Time spent creating proposals in seconds (accumulated as nanoseconds)
6767 - Labels: ` success=true|false `
6868 - Use: Track proposal creation latency
6969
@@ -72,8 +72,8 @@ See the [FFI README](ffi/README.md) for more details on FFI metrics configuratio
7272 - Labels: ` success=true|false `
7373 - Use: Monitor commit success rate
7474
75- - ** ` proposal.commit_ms ` ** (counter with ` success ` label)
76- - Description: Time spent committing proposals in milliseconds
75+ - ** ` proposal.commit_s ` ** (counter with ` success ` label)
76+ - Description: Time spent committing proposals in seconds (accumulated as nanoseconds)
7777 - Labels: ` success=true|false `
7878 - Use: Track commit latency and identify slow commits
7979
@@ -142,14 +142,14 @@ See the [FFI README](ffi/README.md) for more details on FFI metrics configuratio
142142 - Description: Total number of I/O read operations
143143 - Use: Track I/O operation count
144144
145- - ** ` io.read_ms ` ** (counter)
146- - Description: Total time spent in I/O reads in milliseconds
145+ - ** ` io.read_s ` ** (counter)
146+ - Description: Total time spent in I/O reads in seconds (accumulated as nanoseconds)
147147 - Use: Identify I/O bottlenecks and disk performance issues
148148
149149#### Node Persistence
150150
151151- ** ` flush_nodes ` ** (counter)
152- - Description: Cumulative time spent flushing nodes to disk in milliseconds (counter incremented by flush duration )
152+ - Description: Cumulative time spent flushing nodes to disk in seconds (accumulated as nanoseconds )
153153 - Use: Monitor flush performance and identify slow disk writes; calculate average flush time using rate()
154154
155155### Memory Management
@@ -202,30 +202,42 @@ These metrics are specific to the Foreign Function Interface (Go) layer:
202202 - Description: Count of batch operations completed
203203 - Use: Track FFI batch throughput
204204
205- - ** ` ffi.batch_ms ` ** (counter)
206- - Description: Time spent processing batches in milliseconds
205+ - ** ` ffi.batch_s ` ** (counter)
206+ - Description: Time spent processing batches in seconds (accumulated as nanoseconds)
207207 - Use: Monitor FFI batch latency
208208
209+ - ** ` ffi.batch_seconds_bucket ` ** (histogram)
210+ - Description: Histogram of batch processing durations in seconds
211+ - Use: Analyze batch latency distribution
212+
209213#### Proposal Operations
210214
211215- ** ` ffi.propose ` ** (counter)
212216 - Description: Count of proposal operations via FFI
213217 - Use: Track FFI proposal throughput
214218
215- - ** ` ffi.propose_ms ` ** (counter)
216- - Description: Time spent creating proposals via FFI in milliseconds
219+ - ** ` ffi.propose_s ` ** (counter)
220+ - Description: Time spent creating proposals via FFI in seconds (accumulated as nanoseconds)
217221 - Use: Monitor FFI proposal latency
218222
223+ - ** ` ffi.propose_seconds_bucket ` ** (histogram)
224+ - Description: Histogram of proposal creation durations in seconds
225+ - Use: Analyze proposal latency distribution
226+
219227#### Commit Operations
220228
221229- ** ` ffi.commit ` ** (counter)
222230 - Description: Count of commit operations via FFI
223231 - Use: Track FFI commit throughput
224232
225- - ** ` ffi.commit_ms ` ** (counter)
226- - Description: Time spent committing via FFI in milliseconds
233+ - ** ` ffi.commit_s ` ** (counter)
234+ - Description: Time spent committing via FFI in seconds (accumulated as nanoseconds)
227235 - Use: Monitor FFI commit latency
228236
237+ - ** ` ffi.commit_seconds_bucket ` ** (histogram)
238+ - Description: Histogram of commit durations in seconds
239+ - Use: Analyze commit latency distribution
240+
229241#### View Caching
230242
231243- ** ` ffi.cached_view.hit ` ** (counter)
@@ -240,12 +252,12 @@ These metrics are specific to the Foreign Function Interface (Go) layer:
240252
241253### Performance Monitoring
242254
243- 1 . ** Latency Tracking** : The ` *_ms ` metrics track operation durations. Monitor these for:
255+ 1 . ** Latency Tracking** : The ` *_s ` metrics track operation durations in seconds (accumulated as nanoseconds for precision) . Monitor these for:
244256 - Sudden increases indicating performance degradation
245257 - Baseline establishment for SLA monitoring
246258 - Correlation with system load
247259
248- 2 . ** Throughput Monitoring** : Counter metrics without ` _ms ` suffix track operation counts:
260+ 2 . ** Throughput Monitoring** : Counter metrics without ` _s ` suffix track operation counts:
249261 - Rate of change indicates throughput
250262 - Compare with expected load patterns
251263 - Identify anomalies in operation rates
@@ -288,8 +300,9 @@ These metrics are specific to the Foreign Function Interface (Go) layer:
288300For Prometheus-based monitoring (note: metric names use underscores in queries):
289301
290302``` promql
291- # Average commit latency over 5 minutes
292- rate(firewood_proposal_commit_ms[5m]) / rate(firewood_proposal_commit[5m])
303+ # Average commit latency over 5 minutes (in seconds)
304+ # Note: counters store nanoseconds, so divide by 1e9 to get seconds
305+ rate(firewood_proposal_commit_s[5m]) / 1e9 / rate(firewood_proposal_commit[5m])
293306
294307# Cache hit rate
295308sum(rate(firewood_cache_node{type="hit"}[5m])) /
0 commit comments