You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`opencode.cost.usage`| Counter | USD cost per completed assistant message |
34
-
|`opencode.lines_of_code.count`| Counter | Lines added/removed per `session.diff` event |
34
+
|`opencode.lines_of_code.count`| Counter |**Gross positive churn, not a net total.** Emits the positive delta of `additions`/`deletions` since the previous `session.diff` for the same session; negative deltas (when opencode's cumulative `additions` or `deletions` shrinks vs. the last event) are dropped. Summing the counter therefore reports gross lines added/removed across forward transitions — it does *not* reconcile back to the session's current state after any revert (full or partial). Intra-message rewrites that opencode collapses in its per-message cumulative are not visible here at all. Use `opencode.lines_of_code.total` for the authoritative live cumulative. |
35
+
|`opencode.lines_of_code.total`| Gauge |**Authoritative live cumulative lines added/removed for the session.** Refreshed on every `session.diff` with opencode's current cumulative value. Drops back to `0` if opencode reports a revert to baseline, and tracks partial reverts faithfully. Query this (not the counter) to answer "what does this session currently amount to". |
35
36
|`opencode.commit.count`| Counter | Git commits detected via bash tool |
36
37
|`opencode.tool.duration`| Histogram | Tool execution time in milliseconds |
37
38
|`opencode.cache.count`| Counter | Cache activity per message: `type=cacheRead` or `type=cacheCreation`|
description: "Count of lines of code added or removed",
157
+
description: "Gross positive churn of lines added/removed across a session. Emits the positive delta vs. the previous session.diff; negative deltas (cumulative shrinkage) are dropped, so sums do not reconcile to net after any revert. Use lines_of_code.total for the authoritative live cumulative.",
description: "Authoritative live cumulative lines added/removed for the current session. Mirrors opencode's session.diff cumulative value on every event; tracks partial and full reverts faithfully.",
0 commit comments