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

api: add more metrics #73

Merged
merged 3 commits into from
Mar 24, 2024
Merged

Conversation

oleg-jukovec
Copy link
Contributor

@oleg-jukovec oleg-jukovec commented Mar 19, 2024

The patchset adds:

  • Metric tnt_sharded_queue_api_role_stats is a summary[1] with quantiles of sharded_queue.api role API calls. The metric includes a counter of API calls and errors. The metric contains labels in the following format:
    {name = "tube_name", method = "api_call_method", status = "ok" or "error"}
  • Metric tnt_sharded_queue_storage_role_stats is a summary[1] with quantiles of sharded_queue.storage role API calls. The metric includes a counter of API calls and errors. The metric contains labels in the following format:
    {name = "tube_name", method = "api_call_method", status = "ok" or "error"}
  • Metric tnt_sharded_queue_storage_statistics_calls_total as an equivalent of tnt_sharded_queue_api_statistics_calls_total for the sharded_queue.storage role. Values have the same meaning as the queue statistics calls table[2]. The metric contains labels in the following format:
    {name = "tube_name", state = "call_type"}
  • Metric tnt_sharded_queue_storage_statistics_tasks as an equivalent of tnt_sharded_queue_api_statistics_tasks for the sharded_queue.storage role. Values have the same meaning as the queue statistics tasks table[2]. The metric contains labels in the following format:
    {name = "tube_name", state = "task_state"}

The patchset changes:

  • Metric sharded_queue_calls renamed to tnt_sharded_queue_api_statistics_calls_total The metric now has labels in the format {name = "tube_name", state = "call_type"} instead of {name = "tube_name", status = "call_type"}.
  • Metric sharded_queue_tasks renamed to tnt_sharded_queue_api_statistics_tasks. The metric now has labels in the format {name = "tube_name", state = "task_state"} instead of {name = "tube_name", status = "task_state"}.
  1. https://github.com/tarantool/metrics/?tab=readme-ov-file#summary
  2. https://github.com/tarantool/queue?tab=readme-ov-file#getting-statistics

Closes #69
Closes #71

@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-71-add-more-metrics branch from 24c977e to b003731 Compare March 19, 2024 12:20
@coveralls
Copy link

coveralls commented Mar 19, 2024

Pull Request Test Coverage Report for Build 8388997461

Details

  • 174 of 182 (95.6%) changed or added relevant lines in 8 files are covered.
  • 22 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.3%) to 92.66%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sharded_queue/stash.lua 11 12 91.67%
sharded_queue/stats/storage.lua 3 4 75.0%
sharded_queue/storage.lua 47 48 97.92%
sharded_queue/metrics.lua 74 76 97.37%
sharded_queue/utils.lua 11 14 78.57%
Files with Coverage Reduction New Missed Lines %
sharded_queue/api.lua 22 92.88%
Totals Coverage Status
Change from base Build 7542057822: 1.3%
Covered Lines: 972
Relevant Lines: 1049

💛 - Coveralls

@oleg-jukovec oleg-jukovec marked this pull request as ready for review March 19, 2024 12:42
The module will help to save data in roles between reloads. The module
is based on the crud[1] module with the same name.

1. https://github.com/tarantool/crud/blob/master/crud/common/stash.lua

Part of #69
The commit moves storage-specific statistics into a file with another
name to make clear its purpose.

Part of #69
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-71-add-more-metrics branch from b003731 to 9ad99b1 Compare March 19, 2024 12:49
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-71-add-more-metrics branch 5 times, most recently from f2bf6eb to 9e8b9ef Compare March 20, 2024 14:31
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
sharded_queue/metrics.lua Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-71-add-more-metrics branch 2 times, most recently from e78b1e6 to 3a328e5 Compare March 22, 2024 10:04
Copy link
Member

@DifferentialOrange DifferentialOrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates, should be LGTM after fixing a couple of documentation issues.

CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-71-add-more-metrics branch from 3a328e5 to f486257 Compare March 22, 2024 10:33
* Metric `tnt_sharded_queue_api_role_stats` is a summary[1] with
  quantiles of `sharded_queue.api` role API calls.
  The metric includes a counter of API calls and errors.
  The metric contains labels in the following format:
  `{name = "tube_name", method = "api_call_method", status = "ok" or "error"}`

* Metric `tnt_sharded_queue_storage_role_stats` is a summary[1] with
  quantiles of `sharded_queue.storage` role API calls.
  The metric includes a counter of API calls and errors.
  The metric contains labels in the following format:
  `{name = "tube_name", method = "api_call_method", status = "ok" or "error"}`

* Metric `tnt_sharded_queue_storage_statistics_calls_total` as
  an equivalent of `tnt_sharded_queue_api_statistics_calls_total`
  for the `sharded_queue.storage` role.
  Values have the same meaning as the `queue` statistics `calls`
  table[2].
  The metric contains labels in the following format:
  `{name = "tube_name", state = "call_type"}`

* Metric `tnt_sharded_queue_storage_statistics_tasks` as an
  equivalent of `tnt_sharded_queue_api_statistics_tasks` for
  the `sharded_queue.storage` role.
  Values have the same meaning as the `queue` statistics `tasks`
  table[2].
  The metric contains labels in the following format:
  `{name = "tube_name", state = "task_state"}`

* Metric `sharded_queue_calls` renamed to
  `tnt_sharded_queue_api_statistics_calls_total` The metric now has
  labels in the format `{name = "tube_name", state = "call_type"}`
  instead of `{name = "tube_name", status = "call_type"}`.

* Metric `sharded_queue_tasks` renamed to
  `tnt_sharded_queue_api_statistics_tasks`. The metric now has labels
  in the format `{name = "tube_name", state = "task_state"}` instead of
  `{name = "tube_name", status = "task_state"}`.

1. https://github.com/tarantool/metrics/?tab=readme-ov-file#summary
2. https://github.com/tarantool/queue?tab=readme-ov-file#getting-statistics

Closes #69
Closes #71
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-71-add-more-metrics branch from f486257 to f887616 Compare March 22, 2024 10:34
Copy link

@DerekBum DerekBum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@oleg-jukovec oleg-jukovec merged commit 7d16a5c into master Mar 24, 2024
6 checks passed
@oleg-jukovec oleg-jukovec deleted the oleg-jukovec/gh-71-add-more-metrics branch March 24, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a few additional metrics queue:take() does not increments call counter
4 participants