Skip to content

docs: add modules to usagestats #160

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

Merged
merged 5 commits into from
Jul 31, 2024
Merged
Changes from 1 commit
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
40 changes: 40 additions & 0 deletions source/usagestats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ available via the **GET**-only **/status** section of the
* - Option
- Description

* - **modules**
- Object;
list of currently loaded language modules.

* - **connections**
- Object;
lists per-instance connection statistics.
Expand All @@ -37,6 +41,19 @@ Example:
.. code-block:: json

{
"modules": {
"python": [
{
"version": "3.12.3",
"lib": "/opt/unit/modules/python.unit.so"
},
{
"version": "3.12.1",
"lib": "/opt/unit/modules/python-3.12.1.unit.so"
}
],
},

"connections": {
"accepted": 1067,
"active": 13,
Expand All @@ -63,6 +80,29 @@ Example:
}
}

Each item in the **modules** object lists one of the currently loaded language
modules, the installed version (or versions) of the module, and the path to the
module file:

.. list-table::
:header-rows: 1

* - Option
- Description

* - **name**
- String;
language module name.

* - **version**
- String;
language module version. If multiple versions are loaded,
the list contains multiple items.

* - **lib**
- String;
path to the language module file.

The **connections** object offers the following Unit instance metrics:

.. list-table::
Expand Down