Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent metric descriptions #484

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Histogram now logs a warning if `observe` is called with `cdata` value.

### Changed

- Inconsistent metrics descrtiptions for memtx metrics.

### Deprecated

- Using `cdata` values with `histogram:observe`.
Expand Down
50 changes: 26 additions & 24 deletions metrics/tarantool/memtx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,59 @@ local function update()
local memtx_stat = box.stat.memtx.tx()

collectors_list.memtx_tnx_statements =
utils.set_gauge('memtx_tnx_statements', 'Maximum number of bytes used by one transaction for statements',
utils.set_gauge('memtx_tnx_statements', 'Number of bytes used for statements',
memtx_stat.txn.statements.max, {kind = "max"}, nil, {default = true})
collectors_list.memtx_tnx_statements =
utils.set_gauge('memtx_tnx_statements', 'Average bytes used by transactions for statements',
utils.set_gauge('memtx_tnx_statements', 'Number of bytes used for statements',
memtx_stat.txn.statements.avg, {kind = "average"}, nil, {default = true})
collectors_list.memtx_tnx_statements =
utils.set_gauge('memtx_tnx_statements',
'The number of bytes that are allocated for the statements of all current transactions',
utils.set_gauge('memtx_tnx_statements', 'Number of bytes used for statements',
memtx_stat.txn.statements.total, {kind = "total"}, nil, {default = true})

collectors_list.memtx_tnx_user =
utils.set_gauge('memtx_tnx_user',
'The maximum number of bytes allocated by `box_txn_alloc()` function per transaction',
'Number of bytes allocated by `box_txn_alloc()` function per transaction',
memtx_stat.txn.user.max, {kind = "max"}, nil, {default = true})
collectors_list.memtx_tnx_user =
utils.set_gauge('memtx_tnx_user', 'Transaction average (total memory / number of all current transactions)',
utils.set_gauge('memtx_tnx_user',
'Number of bytes allocated by `box_txn_alloc()` function per transaction',
memtx_stat.txn.user.avg, {kind = "average"}, nil, {default = true})
collectors_list.memtx_tnx_user =
utils.set_gauge('memtx_tnx_user',
'Memory allocated by the `box_txn_alloc()` function on all current transactions',
'Number of bytes allocated by `box_txn_alloc()` function per transaction',
memtx_stat.txn.user.total, {kind = "total"}, nil, {default = true})

collectors_list.memtx_tnx_system =
utils.set_gauge('memtx_tnx_system', 'The maximum number of bytes allocated by internals per transaction',
utils.set_gauge('memtx_tnx_system',
'Number of bytes allocated by internals per transaction',
memtx_stat.txn.system.max, {kind = "max"}, nil, {default = true})
collectors_list.memtx_tnx_system =
utils.set_gauge('memtx_tnx_system',
'Average allocated memory by internals (total memory / number of all current transactions)',
'Number of bytes allocated by internals per transaction',
memtx_stat.txn.system.avg, {kind = "average"}, nil, {default = true})
collectors_list.memtx_tnx_system =
utils.set_gauge('memtx_tnx_system', 'Memory allocated by internals on all transactions',
utils.set_gauge('memtx_tnx_system',
'Number of bytes allocated by internals per transaction',
memtx_stat.txn.system.total, {kind = "total"}, nil, {default = true})

collectors_list.memtx_mvcc_trackers =
utils.set_gauge('memtx_mvcc_trackers', 'Maximum trackers allocated per transaction',
utils.set_gauge('memtx_mvcc_trackers', 'Trackers allocated per transaction',
memtx_stat.mvcc.trackers.max, {kind = "max"}, nil, {default = true})
collectors_list.memtx_mvcc_trackers =
utils.set_gauge('memtx_mvcc_trackers',
'Average for all current transactions (total memory / number of transactions)',
utils.set_gauge('memtx_mvcc_trackers', 'Trackers allocated per transaction',
memtx_stat.mvcc.trackers.avg, {kind = "average"}, nil, {default = true})
collectors_list.memtx_mvcc_trackers =
utils.set_gauge('memtx_mvcc_trackers', 'Trackers are allocated in total',
utils.set_gauge('memtx_mvcc_trackers', 'Trackers allocated per transaction',
memtx_stat.mvcc.trackers.total, {kind = "total"}, nil, {default = true})

collectors_list.memtx_mvcc_conflicts =
utils.set_gauge('memtx_mvcc_conflicts', 'Maximum bytes allocated for conflicts per transaction',
utils.set_gauge('memtx_mvcc_conflicts', 'Bytes allocated for conflicts per transaction',
memtx_stat.mvcc.conflicts.max, {kind = "max"}, nil, {default = true})
collectors_list.memtx_mvcc_conflicts =
utils.set_gauge('memtx_mvcc_conflicts',
'Average for all current transactions (total memory / number of transactions)',
utils.set_gauge('memtx_mvcc_conflicts', 'Bytes allocated for conflicts per transaction',
memtx_stat.mvcc.conflicts.avg, {kind = "average"}, nil, {default = true})
collectors_list.memtx_mvcc_conflicts =
utils.set_gauge('memtx_mvcc_conflicts', 'Bytes allocated for conflicts in total',
utils.set_gauge('memtx_mvcc_conflicts', 'Bytes allocated for conflicts per transaction',
memtx_stat.mvcc.conflicts.total, {kind = "total"}, nil, {default = true})


Expand All @@ -75,30 +75,32 @@ local function update()
'Number of `tracking` tuples / number of tracking stories.',
memtx_stat.mvcc.tuples.tracking.stories.count, {kind = "count"}, nil, {default = true})
collectors_list.memtx_mvcc_tuples_tracking_stories =
utils.set_gauge('memtx_mvcc_tuples_tracking_stories', 'Amount of bytes used by stories `tracking` tuples',
utils.set_gauge('memtx_mvcc_tuples_tracking_stories',
'Number of `tracking` tuples / number of tracking stories.',
memtx_stat.mvcc.tuples.tracking.stories.total, {kind = "total"}, nil, {default = true})

collectors_list.memtx_mvcc_tuples_tracking_retained =
utils.set_gauge('memtx_mvcc_tuples_tracking_retained',
'Number of retained `tracking` tuples / number of stories',
memtx_stat.mvcc.tuples.tracking.retained.count, {kind = "count"}, nil, {default = true})
collectors_list.memtx_mvcc_tuples_tracking_retained =
utils.set_gauge('memtx_mvcc_tuples_tracking_retained', 'Amount of bytes used by retained `tracking` tuples',
utils.set_gauge('memtx_mvcc_tuples_tracking_retained',
'Number of retained `tracking` tuples / number of stories',
memtx_stat.mvcc.tuples.tracking.retained.total, {kind = "total"}, nil, {default = true})


collectors_list.memtx_mvcc_tuples_used_stories =
utils.set_gauge('memtx_mvcc_tuples_used_stories', 'Number of `used` tuples / number of stories',
memtx_stat.mvcc.tuples.used.stories.count, {kind = "count"}, nil, {default = true})
collectors_list.memtx_mvcc_tuples_used_stories =
utils.set_gauge('memtx_mvcc_tuples_used_stories', 'Amount of bytes used by stories ``used`` tuples',
utils.set_gauge('memtx_mvcc_tuples_used_stories', 'Number of `used` tuples / number of stories',
memtx_stat.mvcc.tuples.used.stories.total, {kind = "total"}, nil, {default = true})

collectors_list.memtx_mvcc_tuples_used_retained =
utils.set_gauge('memtx_mvcc_tuples_used_retained', 'Number of retained `used` tuples / number of stories',
memtx_stat.mvcc.tuples.used.retained.count, {kind = "count"}, nil, {default = true})
collectors_list.memtx_mvcc_tuples_used_retained =
utils.set_gauge('memtx_mvcc_tuples_used_retained', 'Amount of bytes used by retained `used` tuples',
utils.set_gauge('memtx_mvcc_tuples_used_retained', 'Number of retained `used` tuples / number of stories',
memtx_stat.mvcc.tuples.used.retained.total, {kind = "total"}, nil, {default = true})


Expand All @@ -108,7 +110,7 @@ local function update()
memtx_stat.mvcc.tuples.read_view.stories.count, {kind = "count"}, nil, {default = true})
collectors_list.memtx_mvcc_tuples_read_view_stories =
utils.set_gauge('memtx_mvcc_tuples_read_view_stories',
'Amount of bytes used by stories `read_view` tuples',
'Number of `read_view` tuples / number of stories',
memtx_stat.mvcc.tuples.read_view.stories.total, {kind = "total"}, nil, {default = true})

collectors_list.memtx_mvcc_tuples_read_view_retained =
Expand All @@ -117,7 +119,7 @@ local function update()
memtx_stat.mvcc.tuples.read_view.retained.count, {kind = "count"}, nil, {default = true})
collectors_list.memtx_mvcc_tuples_read_view_retained =
utils.set_gauge('memtx_mvcc_tuples_read_view_retained',
'Amount of bytes used by retained `read_view` tuples',
'Number of retained `read_view` tuples / number of stories',
memtx_stat.mvcc.tuples.read_view.retained.total, {kind = "total"}, nil, {default = true})

end
Expand Down
Loading