0002de177e
We upgrade the rst convention by following Documentation Contributor Guide[1]. [1] https://docs.openstack.org/doc-contrib-guide Change-Id: Id480cd24f5eed810e81af0f12e84a4a6db49247d Partially-Implements: blueprint optimize-the-documentation-format
60 lines
1.7 KiB
ReStructuredText
60 lines
1.7 KiB
ReStructuredText
.. _osprofiler-guide:
|
||
|
||
===================
|
||
OSprofiler in Kolla
|
||
===================
|
||
|
||
Overview
|
||
~~~~~~~~
|
||
|
||
OSProfiler provides a tiny but powerful library that is used by most
|
||
(soon to be all) OpenStack projects and their corresponding python clients
|
||
as well as the Openstack client.
|
||
It provides functionality to generate 1 trace per request, that goes
|
||
through all involved services. This trace can then be extracted and used
|
||
to build a tree of calls which can be quite handy for a variety of reasons
|
||
(for example in isolating cross-project performance issues).
|
||
|
||
Configuration on Kolla deployment
|
||
---------------------------------
|
||
|
||
Enable ``OSprofiler`` in ``/etc/kolla/globals.yml`` file:
|
||
|
||
.. code-block:: yaml
|
||
|
||
enable_osprofiler: "yes"
|
||
enable_elasticsearch: "yes"
|
||
|
||
.. end
|
||
|
||
Verify operation
|
||
----------------
|
||
|
||
Retrieve ``osprofiler_secret`` key present at ``/etc/kolla/passwords.yml``.
|
||
|
||
Profiler UUIDs can be created executing OpenStack clients (Nova, Glance,
|
||
Cinder, Heat, Keystone) with ``--profile`` option or using the official
|
||
Openstack client with ``--os-profile``. In example to get the OSprofiler trace
|
||
UUID for :command:`openstack server create` command.
|
||
|
||
.. code-block:: console
|
||
|
||
$ openstack --os-profile <OSPROFILER_SECRET> server create \
|
||
--image cirros --flavor m1.tiny --key-name mykey \
|
||
--nic net-id=${NETWORK_ID} demo
|
||
|
||
.. end
|
||
|
||
The previous command will output the command to retrieve OSprofiler trace.
|
||
|
||
.. code-block:: console
|
||
|
||
$ osprofiler trace show --html <TRACE_ID> --connection-string \
|
||
elasticsearch://<api_interface_address>:9200
|
||
|
||
.. end
|
||
|
||
For more information about how OSprofiler works, see
|
||
`OSProfiler – Cross-project profiling library
|
||
<https://docs.openstack.org/osprofiler/latest/>`__.
|