osprofiler 4.2.0__tar.gz → 4.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {osprofiler-4.2.0 → osprofiler-4.3.0}/.pre-commit-config.yaml +14 -19
- {osprofiler-4.2.0 → osprofiler-4.3.0}/.zuul.yaml +3 -2
- {osprofiler-4.2.0 → osprofiler-4.3.0}/AUTHORS +1 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/ChangeLog +14 -0
- osprofiler-4.3.0/PKG-INFO +88 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/conf.py +2 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/_utils.py +4 -4
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/cmd/commands.py +4 -4
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/cmd/shell.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/base.py +5 -5
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/elasticsearch_driver.py +6 -6
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/jaeger.py +3 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/loginsight.py +9 -8
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/messaging.py +3 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/mongodb.py +2 -2
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/otlp.py +3 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/redis_driver.py +7 -8
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/sqlalchemy_driver.py +2 -2
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/profiler.py +6 -10
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/functional/test_driver.py +2 -2
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/test.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/cmd/test_shell.py +3 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/doc/test_specs.py +2 -2
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_elasticsearch.py +3 -2
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_jaeger.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_loginsight.py +3 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_mongodb.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_otlp.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_redis_driver.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/test_notifier.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/test_opts.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/test_profiler.py +15 -15
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/test_utils.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/test_web.py +3 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/web.py +1 -1
- osprofiler-4.3.0/osprofiler.egg-info/PKG-INFO +88 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler.egg-info/SOURCES.txt +1 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler.egg-info/entry_points.txt +0 -1
- osprofiler-4.3.0/osprofiler.egg-info/pbr.json +1 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler.egg-info/requires.txt +8 -12
- osprofiler-4.3.0/releasenotes/notes/remove-py38-e2c2723282ebbf9f.yaml +5 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/conf.py +0 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/setup.cfg +3 -3
- {osprofiler-4.2.0 → osprofiler-4.3.0}/test-requirements.txt +1 -9
- {osprofiler-4.2.0 → osprofiler-4.3.0}/tools/patch_tox_venv.py +1 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/tox.ini +2 -8
- osprofiler-4.2.0/PKG-INFO +0 -62
- osprofiler-4.2.0/osprofiler.egg-info/PKG-INFO +0 -62
- osprofiler-4.2.0/osprofiler.egg-info/pbr.json +0 -1
- {osprofiler-4.2.0 → osprofiler-4.3.0}/.stestr.conf +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/CONTRIBUTING.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/LICENSE +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/README.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/bindep.txt +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/devstack/README.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/devstack/lib/osprofiler +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/devstack/plugin.sh +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/devstack/settings +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/requirements.txt +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/Makefile +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/index.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/user/api.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/user/background.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/user/collectors.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/user/history.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/user/index.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/user/integration.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/source/user/similar_projects.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/README.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/implemented/README.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/implemented/make_paste_ini_config_optional.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/implemented/multi_backend_support.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/in-progress/README.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/in-progress/better_devstack_integration.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/in-progress/integration_testing.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/doc/specs/template.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/cmd/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/cmd/cliutils.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/cmd/template.html +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/drivers/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/exc.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/hacking/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/hacking/checks.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/initializer.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/notifier.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/opts.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/requests.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/sqlalchemy.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/functional/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/functional/config.cfg +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/cmd/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/doc/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/__init__.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_base.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/drivers/test_messaging.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/test_initializer.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler/tests/unit/test_sqlalchemy.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler.egg-info/dependency_links.txt +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler.egg-info/not-zip-safe +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/osprofiler.egg-info/top_level.txt +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/playbooks/osprofiler-post.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/add-reno-996dd44974d53238.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/add-requests-profiling-761e09f243d36966.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/drop-jaeger-container-when-unstacking-e8fcdc036f80158a.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/jaeger-add-process-tags-79d5f5d7a0b049ef.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/jaeger-service-name-prefix-72878a930f700878.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/otlp-driver-cb932038ad580ac2.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/notes/remove-strict-redis-9eb43d30c9c1fc43.yaml +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/_static/.placeholder +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/_templates/.placeholder +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/index.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/ocata.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/pike.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/queens.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/rocky.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/stein.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/train.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/unreleased.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/ussuri.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/releasenotes/source/victoria.rst +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/requirements.txt +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/setup.py +0 -0
- {osprofiler-4.2.0 → osprofiler-4.3.0}/tools/lint.py +0 -0
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
# We from the Oslo project decided to pin repos based on the
|
|
2
|
-
# commit hash instead of the version tag to prevend arbitrary
|
|
3
|
-
# code from running in developer's machines. To update to a
|
|
4
|
-
# newer version, run `pre-commit autoupdate` and then replace
|
|
5
|
-
# the newer versions with their commit hash.
|
|
6
|
-
|
|
7
|
-
default_language_version:
|
|
8
|
-
python: python3
|
|
9
|
-
|
|
10
1
|
repos:
|
|
11
2
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
12
|
-
rev:
|
|
3
|
+
rev: v5.0.0
|
|
13
4
|
hooks:
|
|
14
5
|
- id: trailing-whitespace
|
|
15
6
|
# Replaces or checks mixed line ending
|
|
@@ -27,13 +18,17 @@ repos:
|
|
|
27
18
|
- id: debug-statements
|
|
28
19
|
- id: check-yaml
|
|
29
20
|
files: .*\.(yaml|yml)$
|
|
30
|
-
- repo:
|
|
21
|
+
- repo: https://opendev.org/openstack/hacking
|
|
22
|
+
rev: 7.0.0
|
|
31
23
|
hooks:
|
|
32
|
-
- id:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
- id: hacking
|
|
25
|
+
additional_dependencies: []
|
|
26
|
+
- repo: https://github.com/PyCQA/bandit
|
|
27
|
+
rev: 1.7.10
|
|
28
|
+
hooks:
|
|
29
|
+
- id: bandit
|
|
30
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
31
|
+
rev: v3.18.0
|
|
32
|
+
hooks:
|
|
33
|
+
- id: pyupgrade
|
|
34
|
+
args: [--py3-only]
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
- release-notes-jobs-python3
|
|
10
10
|
check:
|
|
11
11
|
jobs:
|
|
12
|
-
- openstack-tox-functional-
|
|
12
|
+
- openstack-tox-functional-py39
|
|
13
|
+
- openstack-tox-functional-py312
|
|
13
14
|
- tempest-smoke-py3-osprofiler-redis
|
|
14
15
|
- tempest-smoke-py3-osprofiler-sqlalchemy
|
|
15
16
|
gate:
|
|
16
17
|
jobs:
|
|
17
|
-
- openstack-tox-functional-
|
|
18
|
+
- openstack-tox-functional-py39
|
|
18
19
|
|
|
19
20
|
- job:
|
|
20
21
|
name: tempest-smoke-py3-osprofiler-redis
|
|
@@ -17,6 +17,7 @@ Daniel Bengtsson <dbengt@redhat.com>
|
|
|
17
17
|
Daria Kobtseva <daria.kts@gmail.com>
|
|
18
18
|
Davanum Srinivas <davanum@gmail.com>
|
|
19
19
|
Dina Belova <dbelova@mirantis.com>
|
|
20
|
+
Dirk Müller <dirk@dmllr.de>
|
|
20
21
|
Doug Hellmann <doug@doughellmann.com>
|
|
21
22
|
Einst Crazy <yu.changcai@99cloud.net>
|
|
22
23
|
Flavio Percoco <flaper87@gmail.com>
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
4.3.0
|
|
5
|
+
-----
|
|
6
|
+
|
|
7
|
+
* tox: Remove basepython
|
|
8
|
+
* Run pyupgrade to clean up Python 2 syntaxes
|
|
9
|
+
* Drop redundant if-else block
|
|
10
|
+
* pre-commit: Bump version
|
|
11
|
+
* Drop remaining pin of elasticsearch
|
|
12
|
+
* Remove Python 3.8 support
|
|
13
|
+
* Unpin for newer elasticsearch versions
|
|
14
|
+
* Replace deprecated constant\_time\_compare
|
|
15
|
+
* Bump hacking to latest
|
|
16
|
+
* Update bandit to 1.7.x
|
|
17
|
+
|
|
4
18
|
4.2.0
|
|
5
19
|
-----
|
|
6
20
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: osprofiler
|
|
3
|
+
Version: 4.3.0
|
|
4
|
+
Summary: OpenStack Profiler Library
|
|
5
|
+
Home-page: https://docs.openstack.org/osprofiler/latest/
|
|
6
|
+
Author: OpenStack
|
|
7
|
+
Author-email: openstack-discuss@lists.openstack.org
|
|
8
|
+
Classifier: Environment :: OpenStack
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Information Technology
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: netaddr>=0.7.18
|
|
24
|
+
Requires-Dist: oslo.concurrency>=3.26.0
|
|
25
|
+
Requires-Dist: oslo.config>=5.2.0
|
|
26
|
+
Requires-Dist: oslo.serialization>=2.18.0
|
|
27
|
+
Requires-Dist: oslo.utils>=3.33.0
|
|
28
|
+
Requires-Dist: PrettyTable>=0.7.2
|
|
29
|
+
Requires-Dist: requests>=2.14.2
|
|
30
|
+
Requires-Dist: WebOb>=1.7.1
|
|
31
|
+
Provides-Extra: elasticsearch
|
|
32
|
+
Requires-Dist: elasticsearch>=2.0.0; extra == "elasticsearch"
|
|
33
|
+
Provides-Extra: jaeger
|
|
34
|
+
Requires-Dist: jaeger-client>=3.8.0; extra == "jaeger"
|
|
35
|
+
Provides-Extra: messaging
|
|
36
|
+
Requires-Dist: oslo.messaging>=14.1.0; extra == "messaging"
|
|
37
|
+
Provides-Extra: mongo
|
|
38
|
+
Requires-Dist: pymongo!=3.1,>=3.0.2; extra == "mongo"
|
|
39
|
+
Provides-Extra: otlp
|
|
40
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.16.0; extra == "otlp"
|
|
41
|
+
Requires-Dist: opentelemetry-sdk>=1.16.0; extra == "otlp"
|
|
42
|
+
Provides-Extra: redis
|
|
43
|
+
Requires-Dist: redis>=2.10.0; extra == "redis"
|
|
44
|
+
Provides-Extra: sqlalchemy
|
|
45
|
+
Requires-Dist: SQLAlchemy>=1.4.0; extra == "sqlalchemy"
|
|
46
|
+
Provides-Extra: test
|
|
47
|
+
Requires-Dist: coverage>=4.0; extra == "test"
|
|
48
|
+
Requires-Dist: ddt>=1.0.1; extra == "test"
|
|
49
|
+
Requires-Dist: stestr>=2.0.0; extra == "test"
|
|
50
|
+
Requires-Dist: testtools>=2.2.0; extra == "test"
|
|
51
|
+
Requires-Dist: docutils>=0.14; extra == "test"
|
|
52
|
+
Requires-Dist: pymongo!=3.1,>=3.0.2; extra == "test"
|
|
53
|
+
Requires-Dist: elasticsearch>=2.0.0; extra == "test"
|
|
54
|
+
Requires-Dist: redis>=2.10.0; extra == "test"
|
|
55
|
+
Requires-Dist: jaeger-client>=3.8.0; extra == "test"
|
|
56
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.16.0; extra == "test"
|
|
57
|
+
Requires-Dist: opentelemetry-sdk>=1.16.0; extra == "test"
|
|
58
|
+
|
|
59
|
+
===================================================
|
|
60
|
+
OSProfiler -- Library for cross-project profiling
|
|
61
|
+
===================================================
|
|
62
|
+
|
|
63
|
+
.. image:: https://governance.openstack.org/tc/badges/osprofiler.svg
|
|
64
|
+
:target: https://governance.openstack.org/tc/reference/tags/index.html
|
|
65
|
+
|
|
66
|
+
.. Change things from this point on
|
|
67
|
+
|
|
68
|
+
.. image:: https://img.shields.io/pypi/v/osprofiler.svg
|
|
69
|
+
:target: https://pypi.org/project/osprofiler/
|
|
70
|
+
:alt: Latest Version
|
|
71
|
+
|
|
72
|
+
.. image:: https://img.shields.io/pypi/dm/osprofiler.svg
|
|
73
|
+
:target: https://pypi.org/project/osprofiler/
|
|
74
|
+
:alt: Downloads
|
|
75
|
+
|
|
76
|
+
OSProfiler provides a tiny but powerful library that is used by
|
|
77
|
+
most (soon to be all) OpenStack projects and their python clients. It
|
|
78
|
+
provides functionality to be able to generate 1 trace per request, that goes
|
|
79
|
+
through all involved services. This trace can then be extracted and used
|
|
80
|
+
to build a tree of calls which can be quite handy for a variety of
|
|
81
|
+
reasons (for example in isolating cross-project performance issues).
|
|
82
|
+
|
|
83
|
+
* Free software: Apache license
|
|
84
|
+
* Documentation: https://docs.openstack.org/osprofiler/latest/
|
|
85
|
+
* Source: https://opendev.org/openstack/osprofiler
|
|
86
|
+
* Bugs: https://bugs.launchpad.net/osprofiler
|
|
87
|
+
* Release notes: https://docs.openstack.org/releasenotes/osprofiler
|
|
88
|
+
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
1
|
# Copyright (C) 2020 Red Hat, Inc.
|
|
3
2
|
#
|
|
4
3
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
@@ -135,6 +134,6 @@ texinfo_documents = [
|
|
|
135
134
|
apidoc_output_dir = 'contributor/modules'
|
|
136
135
|
apidoc_module_dir = '../../osprofiler'
|
|
137
136
|
apidoc_excluded_paths = [
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
'hacking',
|
|
138
|
+
'tests',
|
|
140
139
|
]
|
|
@@ -20,7 +20,6 @@ import json
|
|
|
20
20
|
import os
|
|
21
21
|
import uuid
|
|
22
22
|
|
|
23
|
-
from oslo_utils import secretutils
|
|
24
23
|
from oslo_utils import uuidutils
|
|
25
24
|
|
|
26
25
|
|
|
@@ -32,7 +31,8 @@ def split(text, strip=True):
|
|
|
32
31
|
if isinstance(text, (tuple, list)):
|
|
33
32
|
return text
|
|
34
33
|
if not isinstance(text, str):
|
|
35
|
-
raise TypeError(
|
|
34
|
+
raise TypeError(
|
|
35
|
+
"Unknown how to split '{}': {}".format(text, type(text)))
|
|
36
36
|
if strip:
|
|
37
37
|
return [t.strip() for t in text.split(",") if t.strip()]
|
|
38
38
|
else:
|
|
@@ -107,7 +107,7 @@ def signed_unpack(data, hmac_data, hmac_keys):
|
|
|
107
107
|
except Exception: # nosec
|
|
108
108
|
pass
|
|
109
109
|
else:
|
|
110
|
-
if
|
|
110
|
+
if hmac.compare_digest(hmac_data, user_hmac_data):
|
|
111
111
|
try:
|
|
112
112
|
contents = json.loads(
|
|
113
113
|
binary_decode(base64.urlsafe_b64decode(data)))
|
|
@@ -146,7 +146,7 @@ def import_modules_from_package(package):
|
|
|
146
146
|
if filename.startswith("__") or not filename.endswith(".py"):
|
|
147
147
|
continue
|
|
148
148
|
new_package = ".".join(root.split(os.sep)).split("....")[1]
|
|
149
|
-
module_name = "
|
|
149
|
+
module_name = "{}.{}".format(new_package, filename[:-3])
|
|
150
150
|
__import__(module_name)
|
|
151
151
|
|
|
152
152
|
|
|
@@ -25,7 +25,7 @@ from osprofiler.drivers import base
|
|
|
25
25
|
from osprofiler import exc
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
class BaseCommand
|
|
28
|
+
class BaseCommand:
|
|
29
29
|
group_name = None
|
|
30
30
|
|
|
31
31
|
|
|
@@ -136,12 +136,12 @@ class TraceCommands(BaseCommand):
|
|
|
136
136
|
|
|
137
137
|
if name == "wsgi":
|
|
138
138
|
req = info["meta.raw_payload.wsgi-start"]["info"]["request"]
|
|
139
|
-
label = "
|
|
140
|
-
|
|
139
|
+
label = "{}\\n{} {}..".format(label, req["method"],
|
|
140
|
+
req["path"][:30])
|
|
141
141
|
elif name == "rpc" or name == "driver":
|
|
142
142
|
raw = info["meta.raw_payload.%s-start" % name]
|
|
143
143
|
fn_name = raw["info"]["function"]["name"]
|
|
144
|
-
label = "
|
|
144
|
+
label = "{}\\n{}".format(label, fn_name.split(".")[-1])
|
|
145
145
|
|
|
146
146
|
node_id = str(next_id[0])
|
|
147
147
|
next_id[0] += 1
|
|
@@ -49,7 +49,7 @@ def get_driver(connection_string, *args, **kwargs):
|
|
|
49
49
|
"%s" % connection_string)
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
class Driver
|
|
52
|
+
class Driver:
|
|
53
53
|
"""Base Driver class.
|
|
54
54
|
|
|
55
55
|
This class provides protected common methods that
|
|
@@ -94,7 +94,7 @@ class Driver(object):
|
|
|
94
94
|
With parent_id and trace_id it's quite simple to build
|
|
95
95
|
tree of trace elements, which simplify analyze of trace.
|
|
96
96
|
"""
|
|
97
|
-
raise NotImplementedError("{
|
|
97
|
+
raise NotImplementedError("{}: This method is either not supported "
|
|
98
98
|
"or has to be overridden".format(
|
|
99
99
|
self.get_name()))
|
|
100
100
|
|
|
@@ -103,7 +103,7 @@ class Driver(object):
|
|
|
103
103
|
|
|
104
104
|
:param base_id: Base id of trace elements.
|
|
105
105
|
"""
|
|
106
|
-
raise NotImplementedError("{
|
|
106
|
+
raise NotImplementedError("{}: This method is either not supported "
|
|
107
107
|
"or has to be overridden".format(
|
|
108
108
|
self.get_name()))
|
|
109
109
|
|
|
@@ -120,7 +120,7 @@ class Driver(object):
|
|
|
120
120
|
:returns: List of traces, where each trace is a dictionary containing
|
|
121
121
|
at least `base_id` and `timestamp`.
|
|
122
122
|
"""
|
|
123
|
-
raise NotImplementedError("{
|
|
123
|
+
raise NotImplementedError("{}: This method is either not supported "
|
|
124
124
|
"or has to be overridden".format(
|
|
125
125
|
self.get_name()))
|
|
126
126
|
|
|
@@ -130,7 +130,7 @@ class Driver(object):
|
|
|
130
130
|
:return List of traces, where each trace is a dictionary containing
|
|
131
131
|
`base_id` and `timestamp`.
|
|
132
132
|
"""
|
|
133
|
-
raise NotImplementedError("{
|
|
133
|
+
raise NotImplementedError("{}: This method is either not supported "
|
|
134
134
|
"or has to be overridden".format(
|
|
135
135
|
self.get_name()))
|
|
136
136
|
|
|
@@ -27,12 +27,12 @@ class ElasticsearchDriver(base.Driver):
|
|
|
27
27
|
**kwargs):
|
|
28
28
|
"""Elasticsearch driver for OSProfiler."""
|
|
29
29
|
|
|
30
|
-
super(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
super().__init__(connection_str,
|
|
31
|
+
project=project,
|
|
32
|
+
service=service,
|
|
33
|
+
host=host,
|
|
34
|
+
conf=conf,
|
|
35
|
+
**kwargs)
|
|
36
36
|
try:
|
|
37
37
|
from elasticsearch import Elasticsearch
|
|
38
38
|
except ImportError:
|
|
@@ -31,9 +31,9 @@ class Jaeger(base.Driver):
|
|
|
31
31
|
conf=cfg.CONF, **kwargs):
|
|
32
32
|
"""Jaeger driver for OSProfiler."""
|
|
33
33
|
|
|
34
|
-
super(
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
super().__init__(connection_str, project=project,
|
|
35
|
+
service=service, host=host,
|
|
36
|
+
conf=conf, **kwargs)
|
|
37
37
|
try:
|
|
38
38
|
import jaeger_client
|
|
39
39
|
self.jaeger_client = jaeger_client
|
|
@@ -49,10 +49,10 @@ class LogInsightDriver(base.Driver):
|
|
|
49
49
|
def __init__(
|
|
50
50
|
self, connection_str, project=None, service=None, host=None,
|
|
51
51
|
**kwargs):
|
|
52
|
-
super(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
super().__init__(connection_str,
|
|
53
|
+
project=project,
|
|
54
|
+
service=service,
|
|
55
|
+
host=host)
|
|
56
56
|
|
|
57
57
|
parsed_connection = urlparse.urlparse(connection_str)
|
|
58
58
|
try:
|
|
@@ -126,7 +126,7 @@ class LogInsightDriver(base.Driver):
|
|
|
126
126
|
return self._parse_results()
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
class LogInsightClient
|
|
129
|
+
class LogInsightClient:
|
|
130
130
|
"""A minimal Log Insight client."""
|
|
131
131
|
|
|
132
132
|
LI_OSPROFILER_AGENT_ID = "F52D775B-6017-4787-8C8A-F21AE0AEC057"
|
|
@@ -174,7 +174,7 @@ class LogInsightClient(object):
|
|
|
174
174
|
|
|
175
175
|
def _send_request(
|
|
176
176
|
self, method, scheme, path, headers=None, body=None, params=None):
|
|
177
|
-
url = "
|
|
177
|
+
url = "{}/{}".format(self._build_base_url(scheme), path)
|
|
178
178
|
|
|
179
179
|
headers = headers or {}
|
|
180
180
|
headers["content-type"] = "application/json"
|
|
@@ -239,10 +239,11 @@ class LogInsightClient(object):
|
|
|
239
239
|
# the operator is "CONTAINS".
|
|
240
240
|
constraints = []
|
|
241
241
|
for field, value in params.items():
|
|
242
|
-
constraints.append("
|
|
242
|
+
constraints.append("{}/CONTAINS+{}".format(field, value))
|
|
243
243
|
constraints.append("timestamp/GT+0")
|
|
244
244
|
|
|
245
|
-
path = "
|
|
245
|
+
path = "{}/{}".format(self.QUERY_EVENTS_BASE_PATH,
|
|
246
|
+
"/".join(constraints))
|
|
246
247
|
|
|
247
248
|
def _query_events():
|
|
248
249
|
return self._send_request("get",
|
|
@@ -49,8 +49,8 @@ class Messaging(base.Driver):
|
|
|
49
49
|
raise ValueError("Oslo.messaging library is required for "
|
|
50
50
|
"messaging driver")
|
|
51
51
|
|
|
52
|
-
super(
|
|
53
|
-
|
|
52
|
+
super().__init__(connection_str, project=project,
|
|
53
|
+
service=service, host=host)
|
|
54
54
|
|
|
55
55
|
self.context = context
|
|
56
56
|
|
|
@@ -167,7 +167,7 @@ class Messaging(base.Driver):
|
|
|
167
167
|
return self._parse_results()
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
class NotifyEndpoint
|
|
170
|
+
class NotifyEndpoint:
|
|
171
171
|
|
|
172
172
|
def __init__(self, oslo_messaging, base_id):
|
|
173
173
|
self.received_messages = []
|
|
@@ -22,8 +22,8 @@ class MongoDB(base.Driver):
|
|
|
22
22
|
service=None, host=None, **kwargs):
|
|
23
23
|
"""MongoDB driver for OSProfiler."""
|
|
24
24
|
|
|
25
|
-
super(
|
|
26
|
-
|
|
25
|
+
super().__init__(connection_str, project=project,
|
|
26
|
+
service=service, host=host, **kwargs)
|
|
27
27
|
try:
|
|
28
28
|
from pymongo import MongoClient
|
|
29
29
|
except ImportError:
|
|
@@ -28,9 +28,9 @@ class OTLP(base.Driver):
|
|
|
28
28
|
conf=cfg.CONF, **kwargs):
|
|
29
29
|
"""OTLP driver using OTLP exporters."""
|
|
30
30
|
|
|
31
|
-
super(
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
super().__init__(connection_str, project=project,
|
|
32
|
+
service=service, host=host,
|
|
33
|
+
conf=conf, **kwargs)
|
|
34
34
|
try:
|
|
35
35
|
from opentelemetry import trace as trace_api
|
|
36
36
|
|
|
@@ -33,9 +33,9 @@ class Redis(base.Driver):
|
|
|
33
33
|
service=None, host=None, conf=cfg.CONF, **kwargs):
|
|
34
34
|
"""Redis driver for OSProfiler."""
|
|
35
35
|
|
|
36
|
-
super(
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
super().__init__(connection_str, project=project,
|
|
37
|
+
service=service, host=host,
|
|
38
|
+
conf=conf, **kwargs)
|
|
39
39
|
try:
|
|
40
40
|
from redis import Redis as _Redis
|
|
41
41
|
except ImportError:
|
|
@@ -149,8 +149,7 @@ class Redis(base.Driver):
|
|
|
149
149
|
match=self.namespace + base_id + "*"): # legacy
|
|
150
150
|
yield self.db.get(key)
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
yield event
|
|
152
|
+
yield from self.db.lrange(self.namespace_opt + base_id, 0, -1)
|
|
154
153
|
|
|
155
154
|
for data in iterate_events():
|
|
156
155
|
n = jsonutils.loads(data)
|
|
@@ -177,9 +176,9 @@ class RedisSentinel(Redis, base.Driver):
|
|
|
177
176
|
service=None, host=None, conf=cfg.CONF, **kwargs):
|
|
178
177
|
"""Redis driver for OSProfiler."""
|
|
179
178
|
|
|
180
|
-
super(
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
super().__init__(connection_str, project=project,
|
|
180
|
+
service=service, host=host,
|
|
181
|
+
conf=conf, **kwargs)
|
|
183
182
|
try:
|
|
184
183
|
from redis.sentinel import Sentinel
|
|
185
184
|
except ImportError:
|
|
@@ -26,8 +26,8 @@ LOG = logging.getLogger(__name__)
|
|
|
26
26
|
class SQLAlchemyDriver(base.Driver):
|
|
27
27
|
def __init__(self, connection_str, project=None, service=None, host=None,
|
|
28
28
|
**kwargs):
|
|
29
|
-
super(
|
|
30
|
-
|
|
29
|
+
super().__init__(connection_str, project=project,
|
|
30
|
+
service=service, host=host)
|
|
31
31
|
|
|
32
32
|
try:
|
|
33
33
|
from sqlalchemy import create_engine
|
|
@@ -168,10 +168,7 @@ def trace(name, info=None, hide_args=False, hide_result=True,
|
|
|
168
168
|
stop_info = {"function": {"result": repr(result)}}
|
|
169
169
|
return result
|
|
170
170
|
finally:
|
|
171
|
-
|
|
172
|
-
stop(info=stop_info)
|
|
173
|
-
else:
|
|
174
|
-
stop()
|
|
171
|
+
stop(info=stop_info)
|
|
175
172
|
|
|
176
173
|
return wrapper
|
|
177
174
|
|
|
@@ -292,7 +289,7 @@ class TracedMeta(type):
|
|
|
292
289
|
traced - E.g. wsgi, rpc, db, etc...
|
|
293
290
|
"""
|
|
294
291
|
def __init__(cls, cls_name, bases, attrs):
|
|
295
|
-
super(
|
|
292
|
+
super().__init__(cls_name, bases, attrs)
|
|
296
293
|
|
|
297
294
|
trace_args = dict(getattr(cls, "__trace_args__", {}))
|
|
298
295
|
trace_private = trace_args.pop("trace_private", False)
|
|
@@ -321,7 +318,7 @@ class TracedMeta(type):
|
|
|
321
318
|
attr_name)))
|
|
322
319
|
|
|
323
320
|
|
|
324
|
-
class Trace
|
|
321
|
+
class Trace:
|
|
325
322
|
|
|
326
323
|
def __init__(self, name, info=None):
|
|
327
324
|
"""With statement way to use profiler start()/stop().
|
|
@@ -345,17 +342,16 @@ class Trace(object):
|
|
|
345
342
|
start(self._name, info=self._info)
|
|
346
343
|
|
|
347
344
|
def __exit__(self, etype, value, traceback):
|
|
345
|
+
info = None
|
|
348
346
|
if etype:
|
|
349
347
|
info = {
|
|
350
348
|
"etype": reflection.get_class_name(etype),
|
|
351
349
|
"message": value.args[0] if value.args else None
|
|
352
350
|
}
|
|
353
|
-
|
|
354
|
-
else:
|
|
355
|
-
stop()
|
|
351
|
+
stop(info=info)
|
|
356
352
|
|
|
357
353
|
|
|
358
|
-
class _Profiler
|
|
354
|
+
class _Profiler:
|
|
359
355
|
|
|
360
356
|
def __init__(self, hmac_key, base_id=None, parent_id=None):
|
|
361
357
|
self.hmac_key = hmac_key
|
|
@@ -30,7 +30,7 @@ LOG = logging.getLogger(__name__)
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
@profiler.trace_cls("rpc", hide_args=True)
|
|
33
|
-
class Foo
|
|
33
|
+
class Foo:
|
|
34
34
|
def bar(self, x):
|
|
35
35
|
return self.baz(x, x)
|
|
36
36
|
|
|
@@ -44,7 +44,7 @@ class DriverTestCase(test.FunctionalTestCase):
|
|
|
44
44
|
PROJECT = "project"
|
|
45
45
|
|
|
46
46
|
def setUp(self):
|
|
47
|
-
super(
|
|
47
|
+
super().setUp()
|
|
48
48
|
CONF(["--config-file", os.path.dirname(__file__) + "/config.cfg"])
|
|
49
49
|
opts.set_defaults(CONF,
|
|
50
50
|
enabled=True,
|
|
@@ -32,16 +32,16 @@ class ShellTestCase(test.TestCase):
|
|
|
32
32
|
TRACE_ID = "c598094d-bbee-40b6-b317-d76003b679d3"
|
|
33
33
|
|
|
34
34
|
def setUp(self):
|
|
35
|
-
super(
|
|
35
|
+
super().setUp()
|
|
36
36
|
self.old_environment = os.environ.copy()
|
|
37
37
|
|
|
38
38
|
def tearDown(self):
|
|
39
|
-
super(
|
|
39
|
+
super().tearDown()
|
|
40
40
|
os.environ = self.old_environment
|
|
41
41
|
|
|
42
42
|
def _trace_show_cmd(self, format_=None):
|
|
43
43
|
cmd = "trace show --connection-string redis:// %s" % self.TRACE_ID
|
|
44
|
-
return cmd if format_ is None else "
|
|
44
|
+
return cmd if format_ is None else "{} --{}".format(cmd, format_)
|
|
45
45
|
|
|
46
46
|
@mock.patch("sys.stdout", io.StringIO())
|
|
47
47
|
@mock.patch("osprofiler.cmd.shell.OSProfilerShell")
|
|
@@ -88,7 +88,7 @@ class TitlesTestCase(test.TestCase):
|
|
|
88
88
|
trailing_spaces = re.findall(" +$", line)
|
|
89
89
|
self.assertEqual(
|
|
90
90
|
len(trailing_spaces), 0,
|
|
91
|
-
"Found trailing spaces on line
|
|
91
|
+
"Found trailing spaces on line {} of {}".format(i + 1, tpl))
|
|
92
92
|
|
|
93
93
|
def test_template(self):
|
|
94
94
|
with open(os.path.join(self.specs_path, "template.rst")) as f:
|
|
@@ -98,7 +98,7 @@ class TitlesTestCase(test.TestCase):
|
|
|
98
98
|
template_titles = self._get_titles(spec)
|
|
99
99
|
|
|
100
100
|
for d in ["implemented", "in-progress"]:
|
|
101
|
-
spec_dir = "
|
|
101
|
+
spec_dir = "{}/{}".format(self.specs_path, d)
|
|
102
102
|
|
|
103
103
|
self.assertTrue(os.path.isdir(spec_dir),
|
|
104
104
|
"%s is not a directory" % spec_dir)
|
|
@@ -22,8 +22,9 @@ from osprofiler.tests import test
|
|
|
22
22
|
class ElasticsearchTestCase(test.TestCase):
|
|
23
23
|
|
|
24
24
|
def setUp(self):
|
|
25
|
-
super(
|
|
26
|
-
self.elasticsearch = ElasticsearchDriver(
|
|
25
|
+
super().setUp()
|
|
26
|
+
self.elasticsearch = ElasticsearchDriver(
|
|
27
|
+
"elasticsearch://localhost:9001/")
|
|
27
28
|
self.elasticsearch.project = "project"
|
|
28
29
|
self.elasticsearch.service = "service"
|
|
29
30
|
|
|
@@ -29,7 +29,7 @@ class LogInsightDriverTestCase(test.TestCase):
|
|
|
29
29
|
BASE_ID = "8d28af1e-acc0-498c-9890-6908e33eff5f"
|
|
30
30
|
|
|
31
31
|
def setUp(self):
|
|
32
|
-
super(
|
|
32
|
+
super().setUp()
|
|
33
33
|
self._client = mock.Mock(spec=loginsight.LogInsightClient)
|
|
34
34
|
self._project = "cinder"
|
|
35
35
|
self._service = "osapi_volume"
|
|
@@ -160,10 +160,10 @@ class LogInsightDriverTestCase(test.TestCase):
|
|
|
160
160
|
class LogInsightClientTestCase(test.TestCase):
|
|
161
161
|
|
|
162
162
|
def setUp(self):
|
|
163
|
-
super(
|
|
163
|
+
super().setUp()
|
|
164
164
|
self._host = "localhost"
|
|
165
165
|
self._username = "username"
|
|
166
|
-
self._password = "password"
|
|
166
|
+
self._password = "password" # nosec
|
|
167
167
|
self._client = loginsight.LogInsightClient(
|
|
168
168
|
self._host, self._username, self._password)
|
|
169
169
|
self._client._session_id = "4ff800d1-3175-4b49-9209-39714ea56416"
|