@@ -76,8 +76,8 @@ via configuration.
76
76
77
77
**Usage **
78
78
79
- #. Add the ``metrics `` package to dependencies in the ``.rockspec `` file.
80
- Make sure that you are using version 0.3.0 or higher.
79
+ #. Add ``metrics `` package to dependencies in the ``.rockspec `` file.
80
+ Make sure that you are using version ** 0.3.0 ** or higher.
81
81
82
82
.. code-block :: lua
83
83
@@ -87,7 +87,8 @@ via configuration.
87
87
...
88
88
}
89
89
90
- #. Add ``cartridge.roles.metrics `` to the roles list in ``cartridge.cfg ``
90
+ #. Make sure that you have ``cartridge.roles.metrics ``
91
+ in the roles list in ``cartridge.cfg ``
91
92
in your entry-point file (e.g. ``init.lua ``).
92
93
93
94
.. code-block :: lua
@@ -101,8 +102,18 @@ via configuration.
101
102
},
102
103
})
103
104
105
+ #. Enable role in the interface:
106
+
107
+ .. image :: images/role-enable.png
108
+ :align: center
109
+
110
+ Since version **0.6.0 ** metrics role is permanent and enabled on instances by default.
111
+
104
112
#. After role initialization, default metrics will be enabled and the global
105
- label 'alias' will be set. If you need to use the functionality of any
113
+ label ``'alias' `` will be set. **Note ** that ``'alias' `` label value is set by
114
+ instance :ref: `configuration option <cartridge-cfg >` ``alias ``.
115
+
116
+ If you need to use the functionality of any
106
117
metrics package, you may get it as a Cartridge service and use it like
107
118
a regular package after ``require ``:
108
119
@@ -124,6 +135,9 @@ via configuration.
124
135
- path : ' /path_for_prometheus_metrics'
125
136
format : ' prometheus'
126
137
138
+ .. image :: images/role-config.png
139
+ :align: center
140
+
127
141
**OR **
128
142
129
143
Use ``set_export ``:
0 commit comments