-
Notifications
You must be signed in to change notification settings - Fork 43
Document metrics in Tarantool 3.0 #4348
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
Conversation
7c108eb
to
ab5731b
Compare
ab7dda1
to
a452060
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So how it will work for Cartridge and Tarantool 2.11?
...ode_snippets/snippets/sharding/instances.enabled/sharded_cluster_crud_metrics/instances.yaml
Outdated
Show resolved
Hide resolved
doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster_crud_metrics/router.lua
Show resolved
Hide resolved
Tarantool configuration | ||
----------------------- | ||
|
||
**Since:** :doc:`3.0.0 </release/3.0.0>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if we treat metrics
as a built-in package, these two are expected to be "since 3.1.1" (tarantool/tarantool#10220)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a doc issue for this: #4365
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what's about this version of doc?
Given that Cartridge is deprecated in v3.0, we remove all content related to Cartridge from docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're removing all cartridge-related content, but we still have cartridge pictures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the catch, will drop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Administration > Monitoring section LGTM.
Some minor comments and questions.
Example on GitHub: `sharded_cluster_crud_metrics <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/sharding/instances.enabled/sharded_cluster_crud_metrics>`_ | ||
|
||
Tarantool allows you to configure and expose its :ref:`metrics <metrics-reference>` using a :ref:`YAML configuration <configuration>`. | ||
You can also use the :ref:`metrics <metrics-api_reference>` module to create and collect custom metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use the :ref:`metrics <metrics-api_reference>` module to create and collect custom metrics. | |
You can also use the built-in :ref:`metrics <metrics-api_reference>` module to create and collect custom metrics. |
This addition may be helpful for users of previous versions where metrics wasn't on board.
------------------- | ||
|
||
To configure metrics, use the :ref:`metrics <configuration_reference_metrics>` section in a cluster configuration. | ||
The configuration below enables all metrics, excluding :ref:`Vinyl <metrics-reference-vinyl>`-specific ones: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration below enables all metrics, excluding :ref:`Vinyl <metrics-reference-vinyl>`-specific ones: | |
The configuration below enables all metrics excluding :ref:`vinyl <metrics-reference-vinyl>`-specific ones: |
vynil
seems to be all-lowercase: https://docs.d.tarantool.io/en/doc/metrics/concepts/engines/vinyl/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, excluding..
is a restrictive clause, so no comma is needed.
:language: yaml | ||
:dedent: | ||
|
||
The ``metrics.labels`` option accepts the predefined :ref:`{{ instance_name }} <configuration_predefined_variables>` variable to use an instance name as a :ref:`label <metrics-api_reference-labels>` to be added to every observation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ``metrics.labels`` option accepts the predefined :ref:`{{ instance_name }} <configuration_predefined_variables>` variable to use an instance name as a :ref:`label <metrics-api_reference-labels>` to be added to every observation. | |
The ``metrics.labels`` option accepts the predefined :ref:`{{ instance_name }} <configuration_predefined_variables>` variable. This adds an instance name as a :ref:`label <metrics-api_reference-labels>` to every observation. |
Just an idea: shorter sentences, simpler wording.
expirationd: | ||
cfg: | ||
metrics: true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we provide some "learn more" for this section? For example, read the module docs or ..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope, the link to expirationd
readme should be enough. Moreover, there is no additional info in the expirationd
readme about metrics.
Exposing metrics | ||
---------------- | ||
|
||
To expose metrics in different formats, you can use a third-party `metrics-export-role <https://github.com/tarantool/metrics-export-role>`__ role. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if third-party
is correct here. It look like an official Tarantool component, judging by the GitHub repo. The role may not be available out of the box, but it's from the Tarantool party.
Collect metrics with server agents | ||
------------------------------------------------------------------------------- | ||
|
||
To collect metrics for Prometheus, first set up metrics output with ``prometheus`` format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like third-level headings would be useful here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree
Be sure to include each label key as ``label_pairs_<key>`` so it will be | ||
extracted with the plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be sure to include each label key as ``label_pairs_<key>`` so it will be | |
extracted with the plugin. | |
Be sure to include each label key as ``label_pairs_<key>`` to extract it | |
with the plugin. |
.. image:: images/grafana_import_setup.png | ||
:align: left | ||
|
||
You can choose datasource and datasource variables after import. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can choose datasource and datasource variables after import. | |
You can choose the data source and data source variables after import. |
@@ -0,0 +1,165 @@ | |||
.. _monitoring-grafana_dashboard-page: | |||
|
|||
=============================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to convert heading markup to the format we use across the docs.
Lua memory | ||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
The Lua memory is limited to 2 GB per instance. Monitoring ``tnt_info_memory_lua`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still the case? AFAIR this was a limitation before GC64, please recheck with devs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference sections, API, README -> LGTM, left some minor comments
:header-rows: 0 | ||
|
||
* - ``tnt_election_state`` | ||
- election state (mode) of the node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- election state (mode) of the node. | |
- Election state (mode) of the node. |
- the transactions themselves (TXN section) | ||
- MVCC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* ``total`` | ||
The number of bytes that are allocated for the statements of all current transactions. | ||
* ``average`` | ||
Average bytes used by transactions for statements | ||
(`txn.statements.total` bytes / number of open transactions). | ||
* ``max`` | ||
The maximum number of bytes used by one the current transaction for statements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* ``total`` | |
The number of bytes that are allocated for the statements of all current transactions. | |
* ``average`` | |
Average bytes used by transactions for statements | |
(`txn.statements.total` bytes / number of open transactions). | |
* ``max`` | |
The maximum number of bytes used by one the current transaction for statements. | |
* ``total`` -- the number of bytes that are allocated for the statements of all current transactions. | |
* ``average`` -- average bytes used by transactions for statements | |
(`txn.statements.total` bytes / number of open transactions). | |
* ``max`` -- the maximum number of bytes used by one the current transaction for statements. |
I suggest one of the following formatting:
total
-- the number of bytes...total
: the number of bytes ...
Also, please check this list formatting in other reference - let's make it consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated using the second approach (with :
).
- ``retained`` tuples - they are no longer in the index, but MVCC does not allow them to be removed. | ||
- ``stories`` - MVCC is based on the story mechanism, almost every tuple has a story. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list formatting is broken here
New runnable samples used to demonstrate metrics API
The following samples are added to the code_snippets folder of the
doc
repo:http
module endpoints.http
module.Docs for metrics
Docs are copied from the
metrics
module repo and updated.metrics
sectionInstalling the metrics module
andGetting started with Cartridge application
topics are removedRelated docs
Removed
roles_cfg
from the sharded_cluster_crud sample and updated corresponding docs:Related tasks
Add redirects for removed/moved topics:
Misc
Redirects:
TarantoolBot: