osprofiler 3.4.2__tar.gz → 4.0.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.
Files changed (126) hide show
  1. {osprofiler-3.4.2 → osprofiler-4.0.0}/.zuul.yaml +3 -3
  2. {osprofiler-3.4.2 → osprofiler-4.0.0}/AUTHORS +8 -0
  3. {osprofiler-3.4.2 → osprofiler-4.0.0}/ChangeLog +24 -0
  4. {osprofiler-3.4.2/osprofiler.egg-info → osprofiler-4.0.0}/PKG-INFO +3 -4
  5. {osprofiler-3.4.2 → osprofiler-4.0.0}/devstack/lib/osprofiler +19 -2
  6. {osprofiler-3.4.2 → osprofiler-4.0.0}/devstack/plugin.sh +6 -0
  7. osprofiler-4.0.0/doc/requirements.txt +7 -0
  8. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/conf.py +14 -6
  9. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/index.rst +6 -0
  10. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/user/api.rst +6 -7
  11. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/user/collectors.rst +22 -0
  12. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/user/history.rst +4 -0
  13. {osprofiler-3.4.2 → osprofiler-4.0.0}/lower-constraints.txt +3 -1
  14. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/_utils.py +18 -7
  15. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/cmd/commands.py +1 -5
  16. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/__init__.py +1 -0
  17. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/base.py +6 -10
  18. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/elasticsearch_driver.py +7 -9
  19. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/jaeger.py +10 -3
  20. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/loginsight.py +3 -4
  21. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/messaging.py +1 -2
  22. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/mongodb.py +5 -8
  23. osprofiler-4.0.0/osprofiler/drivers/otlp.py +179 -0
  24. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/redis_driver.py +9 -11
  25. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/hacking/checks.py +1 -1
  26. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/opts.py +44 -1
  27. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/profiler.py +2 -4
  28. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/cmd/test_shell.py +5 -5
  29. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/test_jaeger.py +33 -1
  30. osprofiler-4.0.0/osprofiler/tests/unit/drivers/test_otlp.py +84 -0
  31. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/test_profiler.py +3 -6
  32. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/web.py +1 -2
  33. {osprofiler-3.4.2 → osprofiler-4.0.0/osprofiler.egg-info}/PKG-INFO +3 -4
  34. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler.egg-info/SOURCES.txt +8 -0
  35. osprofiler-4.0.0/osprofiler.egg-info/pbr.json +1 -0
  36. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler.egg-info/requires.txt +3 -4
  37. osprofiler-4.0.0/releasenotes/notes/drop-jaeger-container-when-unstacking-e8fcdc036f80158a.yaml +7 -0
  38. osprofiler-4.0.0/releasenotes/notes/jaeger-add-process-tags-79d5f5d7a0b049ef.yaml +5 -0
  39. osprofiler-4.0.0/releasenotes/notes/jaeger-service-name-prefix-72878a930f700878.yaml +5 -0
  40. osprofiler-4.0.0/releasenotes/notes/otlp-driver-cb932038ad580ac2.yaml +8 -0
  41. osprofiler-4.0.0/releasenotes/notes/remove-strict-redis-9eb43d30c9c1fc43.yaml +4 -0
  42. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/conf.py +8 -8
  43. osprofiler-4.0.0/releasenotes/source/index.rst +16 -0
  44. {osprofiler-3.4.2 → osprofiler-4.0.0}/requirements.txt +0 -1
  45. {osprofiler-3.4.2 → osprofiler-4.0.0}/setup.cfg +5 -6
  46. {osprofiler-3.4.2 → osprofiler-4.0.0}/test-requirements.txt +3 -6
  47. osprofiler-4.0.0/tox.ini +98 -0
  48. osprofiler-3.4.2/osprofiler.egg-info/pbr.json +0 -1
  49. osprofiler-3.4.2/releasenotes/source/index.rst +0 -16
  50. osprofiler-3.4.2/tox.ini +0 -92
  51. {osprofiler-3.4.2 → osprofiler-4.0.0}/.pre-commit-config.yaml +0 -0
  52. {osprofiler-3.4.2 → osprofiler-4.0.0}/.stestr.conf +0 -0
  53. {osprofiler-3.4.2 → osprofiler-4.0.0}/CONTRIBUTING.rst +0 -0
  54. {osprofiler-3.4.2 → osprofiler-4.0.0}/LICENSE +0 -0
  55. {osprofiler-3.4.2 → osprofiler-4.0.0}/README.rst +0 -0
  56. {osprofiler-3.4.2 → osprofiler-4.0.0}/bindep.txt +0 -0
  57. {osprofiler-3.4.2 → osprofiler-4.0.0}/devstack/README.rst +0 -0
  58. {osprofiler-3.4.2 → osprofiler-4.0.0}/devstack/settings +0 -0
  59. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/Makefile +0 -0
  60. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/user/background.rst +0 -0
  61. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/user/index.rst +0 -0
  62. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/user/integration.rst +0 -0
  63. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/source/user/similar_projects.rst +0 -0
  64. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/README.rst +0 -0
  65. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/implemented/README.rst +0 -0
  66. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/implemented/make_paste_ini_config_optional.rst +0 -0
  67. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/implemented/multi_backend_support.rst +0 -0
  68. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/in-progress/README.rst +0 -0
  69. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/in-progress/better_devstack_integration.rst +0 -0
  70. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/in-progress/integration_testing.rst +0 -0
  71. {osprofiler-3.4.2 → osprofiler-4.0.0}/doc/specs/template.rst +0 -0
  72. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/__init__.py +0 -0
  73. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/cmd/__init__.py +0 -0
  74. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/cmd/cliutils.py +0 -0
  75. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/cmd/shell.py +0 -0
  76. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/cmd/template.html +0 -0
  77. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/drivers/sqlalchemy_driver.py +0 -0
  78. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/exc.py +0 -0
  79. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/hacking/__init__.py +0 -0
  80. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/initializer.py +0 -0
  81. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/notifier.py +0 -0
  82. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/sqlalchemy.py +0 -0
  83. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/__init__.py +0 -0
  84. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/functional/__init__.py +0 -0
  85. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/functional/config.cfg +0 -0
  86. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/functional/test_driver.py +0 -0
  87. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/test.py +0 -0
  88. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/__init__.py +0 -0
  89. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/cmd/__init__.py +0 -0
  90. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/doc/__init__.py +0 -0
  91. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/doc/test_specs.py +0 -0
  92. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/__init__.py +0 -0
  93. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/test_base.py +0 -0
  94. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/test_elasticsearch.py +0 -0
  95. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/test_loginsight.py +0 -0
  96. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/test_messaging.py +0 -0
  97. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/test_mongodb.py +0 -0
  98. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/drivers/test_redis_driver.py +0 -0
  99. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/test_initializer.py +0 -0
  100. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/test_notifier.py +0 -0
  101. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/test_opts.py +0 -0
  102. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/test_sqlalchemy.py +0 -0
  103. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/test_utils.py +0 -0
  104. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler/tests/unit/test_web.py +0 -0
  105. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler.egg-info/dependency_links.txt +0 -0
  106. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler.egg-info/entry_points.txt +0 -0
  107. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler.egg-info/not-zip-safe +0 -0
  108. {osprofiler-3.4.2 → osprofiler-4.0.0}/osprofiler.egg-info/top_level.txt +0 -0
  109. {osprofiler-3.4.2 → osprofiler-4.0.0}/playbooks/osprofiler-post.yaml +0 -0
  110. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/notes/add-reno-996dd44974d53238.yaml +0 -0
  111. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml +0 -0
  112. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml +0 -0
  113. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/_static/.placeholder +0 -0
  114. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/_templates/.placeholder +0 -0
  115. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/ocata.rst +0 -0
  116. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/pike.rst +0 -0
  117. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/queens.rst +0 -0
  118. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/rocky.rst +0 -0
  119. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/stein.rst +0 -0
  120. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/train.rst +0 -0
  121. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/unreleased.rst +0 -0
  122. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/ussuri.rst +0 -0
  123. {osprofiler-3.4.2 → osprofiler-4.0.0}/releasenotes/source/victoria.rst +0 -0
  124. {osprofiler-3.4.2 → osprofiler-4.0.0}/setup.py +0 -0
  125. {osprofiler-3.4.2 → osprofiler-4.0.0}/tools/lint.py +0 -0
  126. {osprofiler-3.4.2 → osprofiler-4.0.0}/tools/patch_tox_venv.py +0 -0
@@ -3,18 +3,18 @@
3
3
  - check-requirements
4
4
  - lib-forward-testing-python3
5
5
  - openstack-cover-jobs
6
- - openstack-python3-wallaby-jobs
6
+ - openstack-python3-jobs
7
7
  - periodic-stable-jobs
8
8
  - publish-openstack-docs-pti
9
9
  - release-notes-jobs-python3
10
10
  check:
11
11
  jobs:
12
- - openstack-tox-functional-py36
12
+ - openstack-tox-functional-py38
13
13
  - tempest-smoke-py3-osprofiler-redis
14
14
  - tempest-smoke-py3-osprofiler-sqlalchemy
15
15
  gate:
16
16
  jobs:
17
- - openstack-tox-functional-py36
17
+ - openstack-tox-functional-py38
18
18
 
19
19
  - job:
20
20
  name: tempest-smoke-py3-osprofiler-redis
@@ -33,6 +33,7 @@ Jeremy Stanley <fungi@yuggoth.org>
33
33
  Joshua Harlow <harlowja@gmail.com>
34
34
  Joshua Harlow <harlowja@yahoo-inc.com>
35
35
  Manish Kumar <manishjpiet@gmail.com>
36
+ Michael Johnson <johnsomor@gmail.com>
36
37
  Mikhail Dubov <mdubov@mirantis.com>
37
38
  Moisés Guimarães de Medeiros <moguimar@redhat.com>
38
39
  Monty Taylor <mordred@inaugust.com>
@@ -46,14 +47,17 @@ Ondřej Nový <ondrej.novy@firma.seznam.cz>
46
47
  OpenStack Release Bot <infra-root@openstack.org>
47
48
  Radoslaw Smigielski <radoslaw.smigielski@nokia.com>
48
49
  Roman Podoliaka <rpodolyaka@mirantis.com>
50
+ Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
49
51
  Sean McGinnis <sean.mcginnis@gmail.com>
50
52
  Shoham Peller <shohamp@gmail.com>
51
53
  Simon Pasquier <spasquier@mirantis.com>
52
54
  Slawek Kaplonski <skaplons@redhat.com>
53
55
  Stephen Finucane <stephenfin@redhat.com>
54
56
  Stuart Grace <stuart.grace@bbc.co.uk>
57
+ Takashi Kajinami <tkajinam@redhat.com>
55
58
  Thomas Bechtold <tbechtold@suse.com>
56
59
  Timur Sufiev <tsufiev@mirantis.com>
60
+ Tobias Urdin <tobias.urdin@binero.com>
57
61
  Tony Xu <hhktony@gmail.com>
58
62
  Tovin Seven <vinhnt@vn.fujitsu.com>
59
63
  Victor Morales <victor.morales@intel.com>
@@ -62,6 +66,7 @@ Vipin Balachandran <vbala@vmware.com>
62
66
  Vu Cong Tuan <tuanvc@vn.fujitsu.com>
63
67
  Wander Way <wanderwayout@gmail.com>
64
68
  XiaojueGuan <guanalbertjone@gmail.com>
69
+ YuehuiLei <leiyuehui@inspur.com>
65
70
  Zhi Yan Liu <zhiyanl@cn.ibm.com>
66
71
  caoyuan <cao.yuan@99cloud.net>
67
72
  chenxu <424024687@qq.com>
@@ -72,6 +77,7 @@ kavithahr <kavitha.r@nectechnologies.in>
72
77
  lipan <lipan7195@fiberhome.com>
73
78
  lvdongbing <dongbing.lv@kylin-cloud.com>
74
79
  melissaml <ma.lei@99cloud.net>
80
+ niuke <niuke19970315@163.com>
75
81
  qingszhao <zhao.daqing@99cloud.net>
76
82
  reedip <reedip.banerjee@nectechnologies.in>
77
83
  ricolin <rico.lin@easystack.cn>
@@ -80,6 +86,8 @@ shangxiaobj <shangxiaobj@inspur.com>
80
86
  sunyandi <sunyd@inspur.com>
81
87
  uppi <helendile@gmail.com>
82
88
  wangxiyuan <wangxiyuan@huawei.com>
89
+ wangzihao <wangzihao@yovole.com>
83
90
  yangkun.lc <yangkun.lc@inspur.com>
84
91
  zhangboye <zhangboye@inspur.com>
92
+ zhaolei.lc <15247232416@163.com>
85
93
  zhouxinyong <zhouxinyong@inspur.com>
@@ -1,6 +1,28 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ 4.0.0
5
+ -----
6
+
7
+ * add support of otlp exporter
8
+ * devstack: remove jaeger container on unstack
9
+ * [profiler] hmac\_key should be secret
10
+ * jaeger: introduce process tags' option for tracer
11
+ * jaeger: introduce service name prefix
12
+ * jaeger: fix driver initialization for tests
13
+ * setup.cfg: Replace dashes with underscores
14
+ * Change StrictRedis usage to Redis
15
+ * tox: Add functional-py38, functional-py39 envs
16
+ * remove unicode prefix from code
17
+ * Fix formattiing of release list
18
+
19
+ 3.4.3
20
+ -----
21
+
22
+ * Make some revisions in the document
23
+ * Update CI to use unversioned jobs template
24
+ * Fix api index and module index
25
+
4
26
  3.4.2
5
27
  -----
6
28
 
@@ -11,7 +33,9 @@ CHANGES
11
33
 
12
34
  * Uncap PrettyTable
13
35
  * Move flake8 as a pre-commit local target
36
+ * Use TOX\_CONSTRAINTS\_FILE
14
37
  * Dropping lower constraints testing
38
+ * Remove six
15
39
  * Use py3 as the default runtime for tox
16
40
  * Adding pre-commit
17
41
  * ignore reno generated artifacts
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: osprofiler
3
- Version: 3.4.2
3
+ Version: 4.0.0
4
4
  Summary: OpenStack Profiler Library
5
5
  Home-page: https://docs.openstack.org/osprofiler/latest/
6
6
  Author: OpenStack
@@ -45,11 +45,10 @@ Classifier: License :: OSI Approved :: Apache Software License
45
45
  Classifier: Operating System :: POSIX :: Linux
46
46
  Classifier: Programming Language :: Python
47
47
  Classifier: Programming Language :: Python :: 3
48
- Classifier: Programming Language :: Python :: 3.6
49
- Classifier: Programming Language :: Python :: 3.7
50
48
  Classifier: Programming Language :: Python :: 3.8
49
+ Classifier: Programming Language :: Python :: 3.9
51
50
  Classifier: Programming Language :: Python :: 3 :: Only
52
51
  Classifier: Programming Language :: Python :: Implementation :: CPython
53
- Requires-Python: >=3.6
52
+ Requires-Python: >=3.8
54
53
  Provides-Extra: oslo_config
55
54
  Provides-Extra: test
@@ -58,19 +58,33 @@ function install_redis() {
58
58
  pip_install_gr redis
59
59
  }
60
60
 
61
- function install_jaeger() {
61
+ function install_jaeger_backend() {
62
62
  if is_ubuntu; then
63
63
  install_package docker.io
64
64
  start_service docker
65
65
  add_user_to_group $STACK_USER docker
66
- sg docker -c "docker run -d --name jaeger -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one:1.7"
66
+ sg docker -c "docker run -d --name jaeger -e COLLECTOR_OTLP_ENABLED=true -p 6831:6831/udp -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one:1.42"
67
67
  else
68
68
  exit_distro_not_supported "docker.io installation"
69
69
  fi
70
+ }
70
71
 
72
+ function install_jaeger() {
73
+ install_jaeger_backend
71
74
  pip_install jaeger-client
72
75
  }
73
76
 
77
+ function install_otlp() {
78
+ # For OTLP we use Jaeger backend but any OTLP compatible backend
79
+ # can be used.
80
+ install_jaeger_backend
81
+ pip_install opentelemetry-sdk opentelemetry-exporter-otlp
82
+ }
83
+
84
+ function drop_jaeger() {
85
+ sg docker -c 'docker rm jaeger --force'
86
+ }
87
+
74
88
  function install_elasticsearch() {
75
89
  if is_ubuntu; then
76
90
  install_package docker.io
@@ -108,6 +122,9 @@ function install_osprofiler_collector() {
108
122
  elif [ "$OSPROFILER_COLLECTOR" == "jaeger" ]; then
109
123
  install_jaeger
110
124
  OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"jaeger://localhost:6831"}
125
+ elif [ "$OSPROFILER_COLLECTOR" == "otlp" ]; then
126
+ install_otlp
127
+ OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"otlp://localhost:4318"}
111
128
  elif [ "$OSPROFILER_COLLECTOR" == "elasticsearch" ]; then
112
129
  install_elasticsearch
113
130
  OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"elasticsearch://elastic:changeme@localhost:9200"}
@@ -19,6 +19,12 @@ elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
19
19
  echo_summary "Configuring Tempest"
20
20
  configure_osprofiler_in_tempest
21
21
 
22
+ elif [[ "$1" == "unstack" ]]; then
23
+ if [[ "$OSPROFILER_COLLECTOR" == "jaeger" || \
24
+ "$OSPROFILER_COLLECTOR" == "otlp" ]]; then
25
+ echo_summary "Deleting jaeger docker container"
26
+ drop_jaeger
27
+ fi
22
28
  fi
23
29
 
24
30
  # Restore xtrace
@@ -0,0 +1,7 @@
1
+ docutils>=0.14 # OSI-Approved Open Source, Public Domain
2
+ openstackdocstheme>=2.2.1 # Apache-2.0
3
+ sphinx>=2.0.0,!=2.1.0 # BSD
4
+ sphinxcontrib-apidoc>=0.2.1 # BSD
5
+
6
+ # Build release notes
7
+ reno>=3.1.0 # Apache-2.0
@@ -49,6 +49,7 @@ extensions = [
49
49
  'sphinx.ext.ifconfig',
50
50
  'sphinx.ext.viewcode',
51
51
  'openstackdocstheme',
52
+ 'sphinxcontrib.apidoc',
52
53
  ]
53
54
 
54
55
  # openstackdocstheme options
@@ -69,8 +70,8 @@ source_suffix = '.rst'
69
70
  master_doc = 'index'
70
71
 
71
72
  # General information about the project.
72
- project = u'OSprofiler'
73
- copyright = u'2016, OpenStack Foundation'
73
+ project = 'OSprofiler'
74
+ copyright = '2016, OpenStack Foundation'
74
75
 
75
76
  # List of patterns, relative to source directory, that match files and
76
77
  # directories to ignore when looking for source files.
@@ -110,8 +111,8 @@ latex_elements = {}
110
111
  latex_documents = [
111
112
  ('index',
112
113
  '%s.tex' % project,
113
- u'%s Documentation' % project,
114
- u'OpenStack Foundation', 'manual'),
114
+ '%s Documentation' % project,
115
+ 'OpenStack Foundation', 'manual'),
115
116
  ]
116
117
 
117
118
  # -- Options for Texinfo output -----------
@@ -123,10 +124,17 @@ texinfo_documents = [
123
124
  (
124
125
  'index',
125
126
  'OSprofiler',
126
- u'OSprofiler Documentation',
127
- u'OSprofiler Team',
127
+ 'OSprofiler Documentation',
128
+ 'OSprofiler Team',
128
129
  'OSprofiler',
129
130
  'One line description of project.',
130
131
  'Miscellaneous'
131
132
  ),
132
133
  ]
134
+
135
+ apidoc_output_dir = 'contributor/modules'
136
+ apidoc_module_dir = '../../osprofiler'
137
+ apidoc_excluded_paths = [
138
+ 'hacking',
139
+ 'tests',
140
+ ]
@@ -14,6 +14,12 @@ reasons (for example in isolating cross-project performance issues).
14
14
 
15
15
  user/index
16
16
 
17
+ .. toctree::
18
+ :hidden:
19
+
20
+ contributor/modules/modules
21
+
22
+
17
23
  .. rubric:: Indices and tables
18
24
 
19
25
  * :ref:`genindex`
@@ -39,8 +39,7 @@ Five ways to add a new trace point.
39
39
  def _traced_only_if_trace_private_true(self):
40
40
  pass
41
41
 
42
- @six.add_metaclass(profiler.TracedMeta)
43
- class RpcManagerClass(object):
42
+ class RpcManagerClass(object, metaclass=profiler.TracedMeta):
44
43
  __trace_args__ = {'name': 'rpc',
45
44
  'info': None,
46
45
  'hide_args': False,
@@ -77,14 +76,14 @@ How profiler works?
77
76
  .. code-block:: python
78
77
 
79
78
  profiler.start("parent_point") # trace_stack.push(<new_uuid>)
80
- # send to collector -> trace_stack[-2:]
79
+ # send to collector -> trace_stack[1]
81
80
 
82
- profiler.start("parent_point") # trace_stack.push(<new_uuid>)
83
- # send to collector -> trace_stack[-2:]
84
- profiler.stop() # send to collector -> trace_stack[-2:]
81
+ profiler.start("child_point") # trace_stack.push(<new_uuid>)
82
+ # send to collector -> trace_stack[2]
83
+ profiler.stop() # send to collector -> trace_stack[2]
85
84
  # trace_stack.pop()
86
85
 
87
- profiler.stop() # send to collector -> trace_stack[-2:]
86
+ profiler.stop() # send to collector -> trace_stack[1]
88
87
  # trace_stack.pop()
89
88
 
90
89
  It's simple to build a tree of nested trace points, having
@@ -71,3 +71,25 @@ to create tables and select and insert rows.
71
71
  - MySQL 5.7.8
72
72
 
73
73
  .. _SQLAlchemy understands: https://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
74
+
75
+
76
+ OTLP
77
+ ----
78
+
79
+ Use OTLP exporter. Can be used with any comptable backend that support
80
+ OTLP.
81
+
82
+ Usage
83
+ =====
84
+ To use the driver, the `connection_string` in the `[osprofiler]` config section
85
+ needs to be set::
86
+
87
+ [osprofiler]
88
+ connection_string = otlp://192.168.192.81:4318
89
+
90
+ Example: By default, jaeger is listening OTLP on 4318.
91
+
92
+ .. note::
93
+
94
+ Curently the exporter is only supporting HTTP. In future some work
95
+ may happen to support gRPC.
@@ -1 +1,5 @@
1
+ =========
2
+ ChangeLog
3
+ =========
4
+
1
5
  .. include:: ../../../ChangeLog
@@ -1,9 +1,12 @@
1
1
  coverage===4.0
2
2
  ddt===1.0.1
3
+ docutils==0.14
3
4
  dulwich===0.15.0
4
5
  elasticsearch===2.0.0
5
6
  importlib_metadata==1.7.0
6
7
  jaeger-client==3.8.0
8
+ opentelemetry-exporter-otlp==1.16.0
9
+ opentelemetry-sdk==1.16.0
7
10
  netaddr===0.7.18
8
11
  openstackdocstheme==2.2.1
9
12
  oslo.concurrency===3.26.0
@@ -15,7 +18,6 @@ pymongo===3.0.2
15
18
  redis===2.10.0
16
19
  reno==3.1.0
17
20
  requests===2.14.2
18
- six===1.10.0
19
21
  Sphinx===2.0.0
20
22
  stestr==2.0.0
21
23
  testtools===2.2.0
@@ -22,7 +22,6 @@ import uuid
22
22
 
23
23
  from oslo_utils import secretutils
24
24
  from oslo_utils import uuidutils
25
- import six
26
25
 
27
26
 
28
27
  def split(text, strip=True):
@@ -32,7 +31,7 @@ def split(text, strip=True):
32
31
  """
33
32
  if isinstance(text, (tuple, list)):
34
33
  return text
35
- if not isinstance(text, six.string_types):
34
+ if not isinstance(text, str):
36
35
  raise TypeError("Unknown how to split '%s': %s" % (text, type(text)))
37
36
  if strip:
38
37
  return [t.strip() for t in text.split(",") if t.strip()]
@@ -45,9 +44,9 @@ def binary_encode(text, encoding="utf-8"):
45
44
 
46
45
  Does nothing if text not unicode string.
47
46
  """
48
- if isinstance(text, six.binary_type):
47
+ if isinstance(text, bytes):
49
48
  return text
50
- elif isinstance(text, six.text_type):
49
+ elif isinstance(text, str):
51
50
  return text.encode(encoding)
52
51
  else:
53
52
  raise TypeError("Expected binary or string type")
@@ -58,9 +57,9 @@ def binary_decode(data, encoding="utf-8"):
58
57
 
59
58
  Does nothing if data is already unicode string.
60
59
  """
61
- if isinstance(data, six.binary_type):
60
+ if isinstance(data, bytes):
62
61
  return data.decode(encoding)
63
- elif isinstance(data, six.text_type):
62
+ elif isinstance(data, str):
64
63
  return data
65
64
  else:
66
65
  raise TypeError("Expected binary or string type")
@@ -154,7 +153,7 @@ def import_modules_from_package(package):
154
153
  def shorten_id(span_id):
155
154
  """Convert from uuid4 to 64 bit id for OpenTracing"""
156
155
  int64_max = (1 << 64) - 1
157
- if isinstance(span_id, six.integer_types):
156
+ if isinstance(span_id, int):
158
157
  return span_id & int64_max
159
158
  try:
160
159
  short_id = uuid.UUID(span_id).int & int64_max
@@ -162,3 +161,15 @@ def shorten_id(span_id):
162
161
  # Return a new short id for this
163
162
  short_id = shorten_id(uuidutils.generate_uuid())
164
163
  return short_id
164
+
165
+
166
+ def uuid_to_int128(span_uuid):
167
+ """Convert from uuid4 to 128 bit id for OpenTracing"""
168
+ if isinstance(span_uuid, int):
169
+ return span_uuid
170
+ try:
171
+ span_int = uuid.UUID(span_uuid).int
172
+ except ValueError:
173
+ # Return a new short id for this
174
+ span_int = uuid_to_int128(uuidutils.generate_uuid())
175
+ return span_int
@@ -19,7 +19,6 @@ import os
19
19
  from oslo_utils import encodeutils
20
20
  from oslo_utils import uuidutils
21
21
  import prettytable
22
- import six
23
22
 
24
23
  from osprofiler.cmd import cliutils
25
24
  from osprofiler.drivers import base
@@ -188,7 +187,4 @@ class TraceCommands(BaseCommand):
188
187
  for trace in traces:
189
188
  row = [trace[field] for field in fields]
190
189
  pretty_table.add_row(row)
191
- if six.PY3:
192
- print(encodeutils.safe_encode(pretty_table.get_string()).decode())
193
- else:
194
- print(encodeutils.safe_encode(pretty_table.get_string()))
190
+ print(encodeutils.safe_encode(pretty_table.get_string()).decode())
@@ -1,6 +1,7 @@
1
1
  from osprofiler.drivers import base # noqa
2
2
  from osprofiler.drivers import elasticsearch_driver # noqa
3
3
  from osprofiler.drivers import jaeger # noqa
4
+ from osprofiler.drivers import otlp # noqa
4
5
  from osprofiler.drivers import loginsight # noqa
5
6
  from osprofiler.drivers import messaging # noqa
6
7
  from osprofiler.drivers import mongodb # noqa
@@ -15,8 +15,7 @@
15
15
 
16
16
  import datetime
17
17
  import logging
18
-
19
- import six.moves.urllib.parse as urlparse
18
+ from urllib import parse as urlparse
20
19
 
21
20
  from osprofiler import _utils
22
21
 
@@ -88,15 +87,12 @@ class Driver(object):
88
87
  :param info: Contains information about trace element.
89
88
  In payload dict there are always 3 ids:
90
89
  "base_id" - uuid that is common for all notifications
91
- related to one trace. Used to simplify
92
- retrieving of all trace elements from
93
- the backend.
90
+ related to one trace. Used to simplify retrieving of all
91
+ trace elements from the backend.
94
92
  "parent_id" - uuid of parent element in trace
95
93
  "trace_id" - uuid of current element in trace
96
-
97
94
  With parent_id and trace_id it's quite simple to build
98
95
  tree of trace elements, which simplify analyze of trace.
99
-
100
96
  """
101
97
  raise NotImplementedError("{0}: This method is either not supported "
102
98
  "or has to be overridden".format(
@@ -120,9 +116,9 @@ class Driver(object):
120
116
  """Query all traces from the storage.
121
117
 
122
118
  :param fields: Set of trace fields to return. Defaults to 'base_id'
123
- and 'timestamp'
124
- :return List of traces, where each trace is a dictionary containing
125
- at least `base_id` and `timestamp`.
119
+ and 'timestamp'
120
+ :returns: List of traces, where each trace is a dictionary containing
121
+ at least `base_id` and `timestamp`.
126
122
  """
127
123
  raise NotImplementedError("{0}: This method is either not supported "
128
124
  "or has to be overridden".format(
@@ -13,8 +13,9 @@
13
13
  # License for the specific language governing permissions and limitations
14
14
  # under the License.
15
15
 
16
+ from urllib import parse as parser
17
+
16
18
  from oslo_config import cfg
17
- import six.moves.urllib.parse as parser
18
19
 
19
20
  from osprofiler.drivers import base
20
21
  from osprofiler import exc
@@ -57,15 +58,12 @@ class ElasticsearchDriver(base.Driver):
57
58
  :param info: Contains information about trace element.
58
59
  In payload dict there are always 3 ids:
59
60
  "base_id" - uuid that is common for all notifications
60
- related to one trace. Used to simplify
61
- retrieving of all trace elements from
62
- Elasticsearch.
61
+ related to one trace. Used to simplify retrieving of all
62
+ trace elements from Elasticsearch.
63
63
  "parent_id" - uuid of parent element in trace
64
64
  "trace_id" - uuid of current element in trace
65
-
66
65
  With parent_id and trace_id it's quite simple to build
67
66
  tree of trace elements, which simplify analyze of trace.
68
-
69
67
  """
70
68
 
71
69
  info = info.copy()
@@ -110,9 +108,9 @@ class ElasticsearchDriver(base.Driver):
110
108
  """Query all traces from the storage.
111
109
 
112
110
  :param fields: Set of trace fields to return. Defaults to 'base_id'
113
- and 'timestamp'
114
- :return List of traces, where each trace is a dictionary containing
115
- at least `base_id` and `timestamp`.
111
+ and 'timestamp'
112
+ :returns: List of traces, where each trace is a dictionary containing
113
+ at least `base_id` and `timestamp`.
116
114
  """
117
115
  query = {"match_all": {}}
118
116
  fields = set(fields or self.default_trace_fields)
@@ -16,10 +16,10 @@
16
16
  import collections
17
17
  import datetime
18
18
  import time
19
+ from urllib import parse as parser
19
20
 
20
21
  from oslo_config import cfg
21
22
  from oslo_serialization import jsonutils
22
- import six.moves.urllib.parse as parser
23
23
 
24
24
  from osprofiler import _utils as utils
25
25
  from osprofiler.drivers import base
@@ -49,16 +49,23 @@ class Jaeger(base.Driver):
49
49
  "local_agent": {
50
50
  "reporting_host": parsed_url.hostname,
51
51
  "reporting_port": parsed_url.port,
52
- }
52
+ },
53
+ "tags": conf.profiler_jaeger.process_tags
53
54
  }
54
55
 
55
56
  # Initialize tracer for each profiler
56
- service_name = "{}-{}".format(project, service)
57
+ service_name = self._get_service_name(conf, project, service)
57
58
  config = jaeger_client.Config(cfg, service_name=service_name)
58
59
  self.tracer = config.initialize_tracer()
59
60
 
60
61
  self.spans = collections.deque()
61
62
 
63
+ def _get_service_name(self, conf, project, service):
64
+ prefix = conf.profiler_jaeger.service_name_prefix
65
+ if prefix:
66
+ return "{}-{}-{}".format(prefix, project, service)
67
+ return "{}-{}".format(project, service)
68
+
62
69
  @classmethod
63
70
  def get_name(cls):
64
71
  return "jaeger"
@@ -19,11 +19,11 @@ Classes to use VMware vRealize Log Insight as the trace data store.
19
19
 
20
20
  import json
21
21
  import logging as log
22
+ from urllib import parse as urlparse
22
23
 
23
24
  import netaddr
24
25
  from oslo_concurrency.lockutils import synchronized
25
26
  import requests
26
- import six.moves.urllib.parse as urlparse
27
27
 
28
28
  from osprofiler.drivers import base
29
29
  from osprofiler import exc
@@ -39,13 +39,12 @@ class LogInsightDriver(base.Driver):
39
39
  is 3.3.
40
40
 
41
41
  The connection string to initialize the driver should be of the format:
42
- loginsight://<username>:<password>@<loginsight-host>
42
+ loginsight://<username>:<password>@<loginsight-host>
43
43
 
44
44
  If the username or password contains the character ':' or '@', it must be
45
45
  escaped using URL encoding. For example, the connection string to connect
46
46
  to Log Insight server at 10.1.2.3 using username "osprofiler" and password
47
- "p@ssword" is:
48
- loginsight://osprofiler:p%40ssword@10.1.2.3
47
+ "p@ssword" is: loginsight://osprofiler:p%40ssword@10.1.2.3
49
48
  """
50
49
  def __init__(
51
50
  self, connection_str, project=None, service=None, host=None,
@@ -83,10 +83,9 @@ class Messaging(base.Driver):
83
83
  :param info: Contains information about trace element.
84
84
  In payload dict there are always 3 ids:
85
85
  "base_id" - uuid that is common for all notifications
86
- related to one trace.
86
+ related to one trace.
87
87
  "parent_id" - uuid of parent element in trace
88
88
  "trace_id" - uuid of current element in trace
89
-
90
89
  With parent_id and trace_id it's quite simple to build
91
90
  tree of trace elements, which simplify analyze of trace.
92
91
 
@@ -45,15 +45,12 @@ class MongoDB(base.Driver):
45
45
  :param info: Contains information about trace element.
46
46
  In payload dict there are always 3 ids:
47
47
  "base_id" - uuid that is common for all notifications
48
- related to one trace. Used to simplify
49
- retrieving of all trace elements from
50
- MongoDB.
48
+ related to one trace. Used to simplify retrieving of all
49
+ trace elements from MongoDB.
51
50
  "parent_id" - uuid of parent element in trace
52
51
  "trace_id" - uuid of current element in trace
53
-
54
52
  With parent_id and trace_id it's quite simple to build
55
53
  tree of trace elements, which simplify analyze of trace.
56
-
57
54
  """
58
55
  data = info.copy()
59
56
  data["project"] = self.project
@@ -76,9 +73,9 @@ class MongoDB(base.Driver):
76
73
  """Query all traces from the storage.
77
74
 
78
75
  :param fields: Set of trace fields to return. Defaults to 'base_id'
79
- and 'timestamp'
80
- :return List of traces, where each trace is a dictionary containing
81
- at least `base_id` and `timestamp`.
76
+ and 'timestamp'
77
+ :returns: List of traces, where each trace is a dictionary containing
78
+ at least `base_id` and `timestamp`.
82
79
  """
83
80
  fields = set(fields or self.default_trace_fields)
84
81
  ids = self.db.profiler.find({}).distinct("base_id")