././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.592477 oslo.metrics-0.9.0/0000775000175000017500000000000000000000000014164 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/.stestr.conf0000664000175000017500000000006500000000000016436 0ustar00zuulzuul00000000000000[DEFAULT] test_path=./oslo_metrics/tests top_path=./ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/.zuul.yaml0000664000175000017500000000033300000000000016124 0ustar00zuulzuul00000000000000- project: templates: - check-requirements - lib-forward-testing-python3 - openstack-python3-jobs - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/AUTHORS0000664000175000017500000000106500000000000015236 0ustar00zuulzuul00000000000000Arnaud Morin Ching Kuo Ching Kuo Corey Bryant Ghanshyam Ghanshyam Mann Hervé Beraud Masahito Muroi OpenStack Release Bot Takashi Kajinami Thierry Carrez maaoyu songwenping wangzihao zhangboye ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/CONTRIBUTING.rst0000664000175000017500000000104100000000000016621 0ustar00zuulzuul00000000000000If you would like to contribute to the development of OpenStack, you must follow the steps in this page: https://docs.openstack.org/infra/manual/developers.html Once those steps have been completed, changes to OpenStack should be submitted for review via the Gerrit tool, following the workflow documented at: https://docs.openstack.org/infra/manual/developers.html#development-workflow Pull requests submitted through GitHub will be ignored. Bugs should be filed on Launchpad, not GitHub: https://bugs.launchpad.net/oslo.metrics ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/ChangeLog0000664000175000017500000000365700000000000015751 0ustar00zuulzuul00000000000000CHANGES ======= 0.9.0 ----- * reno: Update master for unmaintained/zed * Remove old excludes * Update master for stable/2024.1 * reno: Update master for unmaintained/xena * reno: Update master for unmaintained/wallaby 0.8.0 ----- * reno: Update master for unmaintained/yoga * Bump hacking * Update python classifier in setup.cfg * Update master for stable/2023.2 0.7.0 ----- * Bump bandit and make oslo.metrics compatible with latest rules * Revert "Moves supported python runtimes from version 3.8 to 3.10" * Moves supported python runtimes from version 3.8 to 3.10 * Update master for stable/2023.1 0.6.0 ----- * Fix logging labales --> labels * Add Python3 antelope unit tests * Update master for stable/zed 0.5.0 ----- * Drop python3.6/3.7 support in testing runtime * Remove unnecessary unicode prefixes * Update master for stable/yoga 0.4.0 ----- * Limit metrics\_socket\_file permissions * Update master for stable/xena * Changed minversion in tox to 3.18.0 0.3.0 ----- * setup.cfg: Replace dashes with underscores * Enable Test Coverage and Add New Test * Fix Heading Characters * Enable bandit * Make Expose Port Configurable * Add Devstack Installation Guide * Use py3 as the default runtime for tox * Dropping lower constraints testing * Update master for stable/wallaby 0.2.1 ----- * Add timeout, method to RPC Client Label 0.2.0 ----- * Update Metric Naming * Handle Sigterm Properly 0.1.0 ----- * Improve Socket for oslo.metrics * bump py37 to py38 in tox.ini * Add basic tests for message processing * Add a basic test framework for oslo.metrics * Configure zuul * add lower-constraints * fix pep8 issues * Add releasenotes * Add project documentation * Setup base test environment * Add an entrypoints to launch oslo.metrics * Add a couple of gitignore rules * Sample oslo.metrics codes * Trivial change to test replication * Add date for expected initial code drop * Base content, waiting for initial code drop * Added .gitreview ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/LICENSE0000664000175000017500000002363700000000000015204 0ustar00zuulzuul00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.592477 oslo.metrics-0.9.0/PKG-INFO0000664000175000017500000000226000000000000015261 0ustar00zuulzuul00000000000000Metadata-Version: 1.2 Name: oslo.metrics Version: 0.9.0 Summary: Oslo Metrics API Home-page: https://opendev.org/openstack/oslo.metrics Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ==================== Oslo Metrics Library ==================== This Oslo metrics API supports collecting metrics data from other Oslo libraries and exposing the metrics data to monitoring system. Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Information Technology Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Requires-Python: >=3.8 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/README.rst0000664000175000017500000000030500000000000015651 0ustar00zuulzuul00000000000000==================== Oslo Metrics Library ==================== This Oslo metrics API supports collecting metrics data from other Oslo libraries and exposing the metrics data to monitoring system. ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.584477 oslo.metrics-0.9.0/doc/0000775000175000017500000000000000000000000014731 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/requirements.txt0000664000175000017500000000032100000000000020211 0ustar00zuulzuul00000000000000# For generating sphinx documentation openstackdocstheme>=1.18.1 # Apache-2.0 sphinx>=1.8.0 # BSD reno>=2.5.0 # Apache-2.0 sphinxcontrib-apidoc>=0.2.0 # BSD # For autodoc builds oslotest>=3.2.0 # Apache-2.0 ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.584477 oslo.metrics-0.9.0/doc/source/0000775000175000017500000000000000000000000016231 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/source/conf.py0000775000175000017500000000530600000000000017537 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. import os import sys sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinxcontrib.apidoc', 'sphinx.ext.intersphinx', 'openstackdocstheme', 'oslo_config.sphinxext', ] # openstackdocstheme options openstackdocs_repo_name = 'openstack/oslo.metrics' openstackdocs_bug_project = 'oslo.metrics' openstackdocs_bug_tag = '' # sphinxcontrib.apidoc options apidoc_module_dir = '../../oslo_metrics' apidoc_output_dir = 'reference/api' apidoc_excluded_paths = [ 'tests' ] # The suffix of source filenames. source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = 'oslo.metrics' copyright = '2014, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'native' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['oslo_metrics.'] # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] html_theme = 'openstackdocs' # html_static_path = ['static'] # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ('index', '%s.tex' % project, '%s Documentation' % project, 'OpenStack Foundation', 'manual'), ] intersphinx_mapping = { 'python': ('https://docs.python.org/', None), 'osloconfig': ('http://docs.openstack.org/oslo.config/latest/', None), } ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.584477 oslo.metrics-0.9.0/doc/source/contributor/0000775000175000017500000000000000000000000020603 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/source/contributor/index.rst0000664000175000017500000000011700000000000022443 0ustar00zuulzuul00000000000000============ Contributing ============ .. include:: ../../../CONTRIBUTING.rst ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/source/index.rst0000664000175000017500000000101600000000000020070 0ustar00zuulzuul00000000000000============ oslo.metrics ============ This Oslo metrics API supports collecting metrics data from other Oslo libraries and exposing the metrics data to monitoring system. Contents ======== .. toctree:: :maxdepth: 2 install/index contributor/index reference/api/modules user/index Release Notes ============= Read also the `oslo.metrics Release Notes `_. Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.584477 oslo.metrics-0.9.0/doc/source/install/0000775000175000017500000000000000000000000017677 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/source/install/index.rst0000664000175000017500000000013600000000000021540 0ustar00zuulzuul00000000000000============ Installation ============ At the command line:: $ pip install oslo.metrics ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.584477 oslo.metrics-0.9.0/doc/source/user/0000775000175000017500000000000000000000000017207 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/source/user/history.rst0000664000175000017500000000004000000000000021434 0ustar00zuulzuul00000000000000.. include:: ../../../ChangeLog ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/source/user/index.rst0000664000175000017500000000021300000000000021044 0ustar00zuulzuul00000000000000================== Using oslo.metrics ================== .. toctree:: :maxdepth: 2 usage .. toctree:: :maxdepth: 1 history ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/doc/source/user/usage.rst0000664000175000017500000000664100000000000021054 0ustar00zuulzuul00000000000000===== Usage ===== A simple example of oslo.metrics in use:: $ oslo-metrics 2020-06-11 15:59:53.459 5435 INFO oslo.metrics.__main__ [-] Start oslo.metrics Testing with DevStack --------------------- This section describes how to test out oslo.metrics and collect oslo.messaging metric data using Devstack. Download DevStack ~~~~~~~~~~~~~~~~~ .. code-block:: console $ git clone https://opendev.org/openstack/devstack $ cd devstack The ``devstack`` repo contains a script that installs OpenStack and templates for configuration files. Create a local.conf ~~~~~~~~~~~~~~~~~~~ Create a ``local.conf`` file with four passwords preset at the root of the devstack git repo. .. code-block:: ini [[local|localrc]] ADMIN_PASSWORD=secret DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD LIBS_FROM_GIT=oslo.messaging [[post-config|$NOVA_CONF]] [oslo_messaging_metrics] metrics_enabled = True This is the minimum required config to get started with Devstack including oslo.metrics. Start the install ~~~~~~~~~~~~~~~~~ .. code-block:: console $ ./stack.sh This will take a 15 - 20 minutes, largely depending on the speed of your internet connection. Many git trees and packages will be installed during this process. Start the Metrics Server ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console $ oslo-metrics This command will start oslo.metrics server and start collecting oslo.messaging metrics sending from OpenStack services. oslo.metrics exporter will serve on port 3000 by default. Example Output ~~~~~~~~~~~~~~ An example of oslo.metrics collecting metrics from Nova: .. code-block:: console ubuntu@devstack:~/devstack$ oslo-metrics 2021-06-12 14:32:26.091 466289 INFO oslo.metrics.__main__ [-] Start oslo.metrics 2021-06-12 14:57:50.632 466289 DEBUG oslo.metrics.__main__ [-] wait for socket.recv serve /usr/local/lib/python3.8/dist-packages/oslo_metrics/__main__.py:73 2021-06-12 14:57:50.632 466289 DEBUG oslo.metrics.__main__ [-] got message serve /usr/local/lib/python3.8/dist-packages/oslo_metrics/__main__.py:76 2021-06-12 14:57:50.633 466289 INFO oslo.metrics.message_router [-] Get labels with rpc_client_processing_seconds: {'call_type': 'call', 'exchange': None, 'topic': 'conductor', 'namespace': 'baseapi', 'version': '1.0', 'server': None, 'fanout': None, 'method': 'ping', 'timeout': None, 'process': ''} 2021-06-12 14:57:50.633 466289 INFO oslo.metrics.message_router [-] Perform action observe for rpc_client_processing_seconds metrics 2021-06-12 14:57:50.633 466289 DEBUG oslo.metrics.__main__ [-] wait for socket.recv serve /usr/local/lib/python3.8/dist-packages/oslo_metrics/__main__.py:73 2021-06-12 14:57:50.633 466289 DEBUG oslo.metrics.__main__ [-] got message serve /usr/local/lib/python3.8/dist-packages/oslo_metrics/__main__.py:76 2021-06-12 14:57:50.633 466289 INFO oslo.metrics.message_router [-] Get labels with rpc_client_invocation_end_total: {'call_type': 'call', 'exchange': None, 'topic': 'conductor', 'namespace': 'baseapi', 'version': '1.0', 'server': None, 'fanout': None, 'method': 'ping', 'timeout': None, 'process': ''} 2021-06-12 14:57:50.633 466289 INFO oslo.metrics.message_router [-] Perform action inc for rpc_client_invocation_end_total metrics` Gathering Metrics ~~~~~~~~~~~~~~~~~ To gather metrics from oslo.metrics, configure Prometheus to scrape from port 3000 where oslo.metrics is running. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1724254160.5884771 oslo.metrics-0.9.0/oslo.metrics.egg-info/0000775000175000017500000000000000000000000020277 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/PKG-INFO0000664000175000017500000000226000000000000021374 0ustar00zuulzuul00000000000000Metadata-Version: 1.2 Name: oslo.metrics Version: 0.9.0 Summary: Oslo Metrics API Home-page: https://opendev.org/openstack/oslo.metrics Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ==================== Oslo Metrics Library ==================== This Oslo metrics API supports collecting metrics data from other Oslo libraries and exposing the metrics data to monitoring system. Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Information Technology Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Requires-Python: >=3.8 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/SOURCES.txt0000664000175000017500000000262000000000000022163 0ustar00zuulzuul00000000000000.stestr.conf .zuul.yaml AUTHORS CONTRIBUTING.rst ChangeLog LICENSE README.rst requirements.txt setup.cfg setup.py test-requirements.txt tox.ini doc/requirements.txt doc/source/conf.py doc/source/index.rst doc/source/contributor/index.rst doc/source/install/index.rst doc/source/user/history.rst doc/source/user/index.rst doc/source/user/usage.rst oslo.metrics.egg-info/PKG-INFO oslo.metrics.egg-info/SOURCES.txt oslo.metrics.egg-info/dependency_links.txt oslo.metrics.egg-info/entry_points.txt oslo.metrics.egg-info/not-zip-safe oslo.metrics.egg-info/pbr.json oslo.metrics.egg-info/requires.txt oslo.metrics.egg-info/top_level.txt oslo_metrics/__init__.py oslo_metrics/__main__.py oslo_metrics/message_router.py oslo_metrics/message_type.py oslo_metrics/metrics/__init__.py oslo_metrics/metrics/oslo_messaging.py oslo_metrics/tests/__init__.py oslo_metrics/tests/test_message_process.py oslo_metrics/tests/test_message_validation.py releasenotes/notes/add-reno-0cc4d7566599aebd.yaml releasenotes/notes/port-config-ac5d9ee247a8ff9b.yaml releasenotes/source/2023.1.rst releasenotes/source/2023.2.rst releasenotes/source/2024.1.rst releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/unreleased.rst releasenotes/source/wallaby.rst releasenotes/source/xena.rst releasenotes/source/yoga.rst releasenotes/source/zed.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/dependency_links.txt0000664000175000017500000000000100000000000024345 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/entry_points.txt0000664000175000017500000000007500000000000023577 0ustar00zuulzuul00000000000000[console_scripts] oslo-metrics = oslo_metrics.__main__:main ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/not-zip-safe0000664000175000017500000000000100000000000022525 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/pbr.json0000664000175000017500000000005600000000000021756 0ustar00zuulzuul00000000000000{"git_version": "e7ea726", "is_release": true}././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/requires.txt0000664000175000017500000000013300000000000022674 0ustar00zuulzuul00000000000000oslo.config>=6.9.0 oslo.log>=3.44.0 oslo.utils>=3.41.0 pbr>=3.1.1 prometheus-client>=0.6.0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254160.0 oslo.metrics-0.9.0/oslo.metrics.egg-info/top_level.txt0000664000175000017500000000001500000000000023025 0ustar00zuulzuul00000000000000oslo_metrics ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1724254160.5884771 oslo.metrics-0.9.0/oslo_metrics/0000775000175000017500000000000000000000000016666 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/__init__.py0000664000175000017500000000000000000000000020765 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/__main__.py0000664000175000017500000000706600000000000020771 0ustar00zuulzuul00000000000000# Copyright 2020 LINE Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import os import select import signal import socket import sys import threading from wsgiref.simple_server import make_server from oslo_config import cfg from oslo_log import log as logging from prometheus_client import make_wsgi_app from oslo_metrics import message_router oslo_metrics_configs = [ cfg.StrOpt('metrics_socket_file', default='/var/tmp/metrics_collector.sock', # nosec help='Unix domain socket file to be used' ' to send rpc related metrics'), cfg.IntOpt('prometheus_port', default=3000, help='Port number to expose metrics in prometheus format.'), ] cfg.CONF.register_opts(oslo_metrics_configs, group='oslo_metrics') LOG = logging.getLogger(__name__) CONF = cfg.CONF logging.register_options(CONF) logging.setup(CONF, 'oslo-metrics') LOG.logger.setLevel(logging.DEBUG) class MetricsListener(): def __init__(self, socket_path): self.socket_path = socket_path self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) self.unlink(socket_path) self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.socket.bind(self.socket_path) self.start = True self.router = message_router.MessageRouter() def unlink(self, socket_path): try: os.unlink(socket_path) except OSError: if os.path.exists(socket_path): raise def serve(self): while self.start: readable, writable, exceptional = select.select( [self.socket], [], [], 1) if len(readable) == 0: continue try: LOG.debug("wait for socket.recv") # 1 message size should be smaller than 65565 msg = self.socket.recv(65565) LOG.debug("got message") self.router.process(msg) except socket.timeout: pass def stop(self): self.socket.close() self.start = False httpd = None def handle_sigterm(_signum, _frame): LOG.debug("Caught sigterm") shutdown_thread = threading.Thread(target=httpd.shutdown) shutdown_thread.start() def main(): cfg.CONF(sys.argv[1:]) socket_path = cfg.CONF.oslo_metrics.metrics_socket_file m = MetricsListener(socket_path) try: os.chmod(socket_path, 0o600) except OSError: LOG.error("Changing the mode of the file failed.... continuing") mt = threading.Thread(target=m.serve) LOG.info("Start oslo.metrics") mt.start() app = make_wsgi_app() try: global httpd httpd = make_server('', CONF.oslo_metrics.prometheus_port, app) signal.signal(signal.SIGTERM, handle_sigterm) httpd.serve_forever() except KeyboardInterrupt: pass finally: LOG.info("Try to stop...") os.remove(cfg.CONF.oslo_metrics.metrics_socket_file) m.stop() httpd.server_close() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/message_router.py0000664000175000017500000000531300000000000022266 0ustar00zuulzuul00000000000000# Copyright 2020 LINE Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from oslo_log import log as logging from oslo_utils import importutils from oslo_metrics import message_type LOG = logging.getLogger(__name__) MODULE_LISTS = [ "oslo_metrics.metrics.oslo_messaging", ] class MessageRouter(): def __init__(self): self.modules = {} for m_str in MODULE_LISTS: mod = importutils.try_import(m_str, False) if not mod: LOG.error("Failed to load module %s" % m_str) self.modules[m_str.split('.')[-1]] = mod def process(self, raw_string): try: metric = message_type.Metric.from_json(raw_string.decode()) self.dispatch(metric) except Exception as e: LOG.error("Failed to parse: %s", e) def dispatch(self, metric): if metric.module not in self.modules: LOG.error("Failed to lookup modules by %s" % metric.module) return mod = self.modules.get(metric.module) # Get metric try: metric_definition = getattr(mod, metric.name) except AttributeError as e: LOG.error("Failed to load metrics %s: %s" % (metric.name, e)) return # Get labels try: metric_with_label = getattr(metric_definition, "labels") metric_with_label = metric_with_label(**metric.labels) except AttributeError as e: LOG.error("Failed to load labels func from metrics %s: %s" % (metric.name, e)) return LOG.info("Get labels with %s: %s" % (metric.name, metric.labels)) # perform action try: embed_action = getattr(metric_with_label, metric.action.action) if metric.action.value is not None: embed_action(metric.action.value) else: embed_action() except AttributeError as e: LOG.error("Failed to perform metric actionv %s, %s: %s" % (metric.action.action, metric.action.value, e)) return LOG.info("Perform action %s for %s metrics" % (metric.action.action, metric.name)) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/message_type.py0000664000175000017500000000606700000000000021736 0ustar00zuulzuul00000000000000# Copyright 2020 LINE Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json class UnSupportedMetricActionError(Exception): def __init__(self, message=None): self.message = message class MetricValidationError(Exception): def __init__(self, message=None): self.message = message class MetricAction(): actions = ['inc', 'observe'] def __init__(self, action, value): if action not in self.actions: raise UnSupportedMetricActionError( "%s action is not supported" % action) self.action = action self.value = value @classmethod def validate(cls, metric_action_dict): if "value" not in metric_action_dict: raise MetricValidationError("action need 'value' field") if "action" not in metric_action_dict: raise MetricValidationError("action need 'action' field") if metric_action_dict["action"] not in cls.actions: raise MetricValidationError( "action should be choosen from %s" % cls.actions) @classmethod def from_dict(cls, metric_action_dict): return cls( metric_action_dict["action"], metric_action_dict["value"] ) class Metric(): def __init__(self, module, name, action, **labels): self.module = module self.name = name self.action = action self.labels = labels def to_json(self): raw = { "module": self.module, "name": self.name, "action": { "value": self.action.value, "action": self.action.action }, "labels": self.labels } return json.dumps(raw) @classmethod def from_json(cls, encoded): metric_dict = json.loads(encoded) cls._validate(metric_dict) return Metric( metric_dict["module"], metric_dict["name"], MetricAction.from_dict(metric_dict["action"]), **metric_dict["labels"]) @classmethod def _validate(cls, metric_dict): if "module" not in metric_dict: raise MetricValidationError("module should be specified") if "name" not in metric_dict: raise MetricValidationError("name should be specified") if "action" not in metric_dict: raise MetricValidationError("action should be specified") if "labels" not in metric_dict: raise MetricValidationError("labels should be specified") MetricAction.validate(metric_dict["action"]) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1724254160.5884771 oslo.metrics-0.9.0/oslo_metrics/metrics/0000775000175000017500000000000000000000000020334 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/metrics/__init__.py0000664000175000017500000000000000000000000022433 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/metrics/oslo_messaging.py0000664000175000017500000000534700000000000023730 0ustar00zuulzuul00000000000000# Copyright 2020 LINE Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import prometheus_client rpc_server_common_labels = [ 'exchange', 'topic', 'server', 'endpoint', 'namespace', 'version', 'method', 'process' ] rpc_client_common_labels = [ 'call_type', 'exchange', 'topic', 'namespace', 'version', 'server', 'fanout', 'process', 'method', 'timeout' ] rpc_processing_seconds_buckets = [ 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 25.0, 50.0, 75.0, 100 ] # RPC Server Metrics rpc_server_invocation_start_total = prometheus_client.Counter( 'oslo_messaging_rpc_server_invocation_start_total', 'Total number of RPC invocation start. This doesn\'t count' 'if rpc server failed to find method from endpoints.', rpc_server_common_labels) rpc_server_invocation_end_total = prometheus_client.Counter( 'oslo_messaging_rpc_server_invocation_end_total', 'Total number of RPC invocation end.', rpc_server_common_labels) rpc_server_processing_seconds = prometheus_client.Histogram( 'oslo_messaging_rpc_server_processing_seconds', 'Duration of RPC processing.', rpc_server_common_labels, buckets=rpc_processing_seconds_buckets) rpc_server_exception_total = prometheus_client.Counter( 'oslo_messaging_rpc_server_exception_total', 'Total number of exception while RPC processing.', rpc_server_common_labels + ['exception']) # RPC Client Metrics rpc_client_invocation_start_total = prometheus_client.Counter( 'oslo_messaging_rpc_client_invocation_start_total', 'Total number of RPC invocation start.', rpc_client_common_labels) rpc_client_invocation_end_total = prometheus_client.Counter( 'oslo_messaging_rpc_client_invocation_end_total', 'Total number of RPC invocation end.', rpc_client_common_labels) rpc_client_processing_seconds = prometheus_client.Histogram( 'oslo_messaging_rpc_client_processing_seconds', 'Duration of RPC processing.', rpc_client_common_labels, buckets=rpc_processing_seconds_buckets) rpc_client_exception_total = prometheus_client.Counter( 'oslo_messaging_rpc_client_exception_total', 'Total number of exception while RPC processing.', rpc_client_common_labels + ['exception', ]) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1724254160.5884771 oslo.metrics-0.9.0/oslo_metrics/tests/0000775000175000017500000000000000000000000020030 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/tests/__init__.py0000664000175000017500000000000000000000000022127 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/tests/test_message_process.py0000664000175000017500000000433200000000000024625 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """ test_message_process -------------------- Check that messages are processed correctly """ from unittest import mock from oslo_metrics import message_router from oslotest import base import prometheus_client class TestProcessMessage(base.BaseTestCase): def setUp(self): super(TestProcessMessage, self).setUp() def test_process_counter(self): received_json = """{ "module": "oslo_messaging", "name": "rpc_server_invocation_start_total", "action": { "action": "inc", "value": null }, "labels": { "exchange": "foo", "topic": "bar", "server": "foobar", "endpoint": "endpoint", "namespace": "ns", "version": "v2", "method": "get", "process": "done" } }""".encode() with mock.patch.object( prometheus_client.Counter, 'inc', ) as mock_inc: router = message_router.MessageRouter() router.process(received_json) mock_inc.assert_called_once_with() def test_process_histogram(self): received_json = """{ "module": "oslo_messaging", "name": "rpc_client_processing_seconds", "action": { "action": "observe", "value": 1.26 }, "labels": { "call_type": "call", "exchange": "foo", "topic": "bar", "method": "get", "server": "foobar", "namespace": "ns", "version": "v2", "process": "done", "fanout": "foo", "timeout": 10 } }""".encode() with mock.patch.object( prometheus_client.Histogram, 'observe', ) as mock_inc: router = message_router.MessageRouter() router.process(received_json) mock_inc.assert_called_once_with(1.26) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/oslo_metrics/tests/test_message_validation.py0000664000175000017500000000472300000000000025305 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """ test_message_validation -------------------- Check that messages validation is working properly """ import json from oslo_metrics import message_type from oslotest import base class TestMetricValidation(base.BaseTestCase): def setUp(self): super(TestMetricValidation, self).setUp() def assertRaisesWithMessage(self, message, func, *args, **kwargs): try: func(*args, **kwargs) self.assertFail() except Exception as e: self.assertEqual(message, e.message) def test_message_validation(self): metric = dict() message = "module should be specified" self.assertRaisesWithMessage( message, message_type.Metric.from_json, json.dumps(metric)) metric['module'] = "test" message = "name should be specified" self.assertRaisesWithMessage( message, message_type.Metric.from_json, json.dumps(metric)) metric['name'] = "test" message = "action should be specified" self.assertRaisesWithMessage( message, message_type.Metric.from_json, json.dumps(metric)) metric['action'] = "test" message = "labels should be specified" self.assertRaisesWithMessage( message, message_type.Metric.from_json, json.dumps(metric)) metric['labels'] = "test_label" message = "action need 'value' field" self.assertRaisesWithMessage( message, message_type.Metric.from_json, json.dumps(metric)) metric['action'] = {"value": "1"} message = "action need 'action' field" self.assertRaisesWithMessage( message, message_type.Metric.from_json, json.dumps(metric)) metric['action']['action'] = "test" message = "action should be choosen from ['inc', 'observe']" self.assertRaisesWithMessage( message, message_type.Metric.from_json, json.dumps(metric)) ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.580477 oslo.metrics-0.9.0/releasenotes/0000775000175000017500000000000000000000000016655 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1724254160.5884771 oslo.metrics-0.9.0/releasenotes/notes/0000775000175000017500000000000000000000000020005 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/notes/add-reno-0cc4d7566599aebd.yaml0000664000175000017500000000007200000000000024667 0ustar00zuulzuul00000000000000--- other: - | Add reno for managing release notes. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/notes/port-config-ac5d9ee247a8ff9b.yaml0000664000175000017500000000014000000000000025565 0ustar00zuulzuul00000000000000--- features: - | Port number to expose metrics in Prometheus format is now configurable. ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.592477 oslo.metrics-0.9.0/releasenotes/source/0000775000175000017500000000000000000000000020155 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/2023.1.rst0000664000175000017500000000020200000000000021426 0ustar00zuulzuul00000000000000=========================== 2023.1 Series Release Notes =========================== .. release-notes:: :branch: stable/2023.1 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/2023.2.rst0000664000175000017500000000020200000000000021427 0ustar00zuulzuul00000000000000=========================== 2023.2 Series Release Notes =========================== .. release-notes:: :branch: stable/2023.2 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/2024.1.rst0000664000175000017500000000020200000000000021427 0ustar00zuulzuul00000000000000=========================== 2024.1 Series Release Notes =========================== .. release-notes:: :branch: stable/2024.1 ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.592477 oslo.metrics-0.9.0/releasenotes/source/_static/0000775000175000017500000000000000000000000021603 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/_static/.placeholder0000664000175000017500000000000000000000000024054 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.592477 oslo.metrics-0.9.0/releasenotes/source/_templates/0000775000175000017500000000000000000000000022312 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/_templates/.placeholder0000664000175000017500000000000000000000000024563 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/conf.py0000664000175000017500000002156300000000000021463 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'openstackdocstheme', 'reno.sphinxext', ] # openstackdocstheme options openstackdocs_repo_name = 'openstack/oslo.metrics' openstackdocs_bug_project = 'oslo.metrics' openstackdocs_bug_tag = '' openstackdocs_auto_name = False # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = 'oslo.metrics Release Notes' copyright = '2020, oslo.metrics Developers' # Release notes do not need a version in the title, they span # multiple versions. # The full version, including alpha/beta/rc tags. release = '' # The short X.Y version. version = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'native' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. # keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'openstackdocs' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'oslo.metricsReleaseNotesDoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'oslo.metricsReleaseNotes.tex', 'oslo.metrics Release Notes Documentation', 'oslo.metrics Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'oslo.metricsReleaseNotes', 'oslo.metrics Release Notes Documentation', ['oslo.metrics Developers'], 1) ] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'oslo.metricsReleaseNotes', 'oslo.metrics Release Notes Documentation', 'oslo.metrics Developers', 'oslo.metricsReleaseNotes', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False # -- Options for Internationalization output ------------------------------ locale_dirs = ['locale/'] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/index.rst0000664000175000017500000000027600000000000022023 0ustar00zuulzuul00000000000000========================== oslo.metrics Release Notes ========================== .. toctree:: :maxdepth: 1 unreleased 2024.1 2023.2 2023.1 zed yoga xena wallaby ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/unreleased.rst0000664000175000017500000000014400000000000023035 0ustar00zuulzuul00000000000000========================== Unreleased Release Notes ========================== .. release-notes:: ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/wallaby.rst0000664000175000017500000000021400000000000022337 0ustar00zuulzuul00000000000000============================ Wallaby Series Release Notes ============================ .. release-notes:: :branch: unmaintained/wallaby ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/xena.rst0000664000175000017500000000020000000000000021632 0ustar00zuulzuul00000000000000========================= Xena Series Release Notes ========================= .. release-notes:: :branch: unmaintained/xena ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/yoga.rst0000664000175000017500000000020000000000000021636 0ustar00zuulzuul00000000000000========================= Yoga Series Release Notes ========================= .. release-notes:: :branch: unmaintained/yoga ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/releasenotes/source/zed.rst0000664000175000017500000000017400000000000021473 0ustar00zuulzuul00000000000000======================== Zed Series Release Notes ======================== .. release-notes:: :branch: unmaintained/zed ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/requirements.txt0000664000175000017500000000020700000000000017447 0ustar00zuulzuul00000000000000pbr>=3.1.1 # Apache-2.0 # General oslo.utils>=3.41.0 oslo.log>=3.44.0 oslo.config>=6.9.0 # Metrics Exporter prometheus-client>=0.6.0 ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1724254160.592477 oslo.metrics-0.9.0/setup.cfg0000664000175000017500000000164400000000000016012 0ustar00zuulzuul00000000000000[metadata] name = oslo.metrics author = OpenStack author_email = openstack-discuss@lists.openstack.org summary = Oslo Metrics API description_file = README.rst home_page = https://opendev.org/openstack/oslo.metrics python_requires = >=3.8 classifier = Environment :: OpenStack Intended Audience :: Developers Intended Audience :: Information Technology License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython [files] packages = oslo_metrics [entry_points] console_scripts = oslo-metrics = oslo_metrics.__main__:main [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/setup.py0000664000175000017500000000123200000000000015674 0ustar00zuulzuul00000000000000# Copyright (c) 2020 LINE Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. import setuptools setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/test-requirements.txt0000664000175000017500000000026700000000000020432 0ustar00zuulzuul00000000000000hacking>=6.1.0,<6.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 # Bandit security code scanner bandit>=1.7.0,<1.8.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 coverage>=4.0 # Apache-2.0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1724254060.0 oslo.metrics-0.9.0/tox.ini0000664000175000017500000000250500000000000015501 0ustar00zuulzuul00000000000000[tox] minversion = 3.18.0 envlist = py3,pep8 ignore_basepython_conflict = True [testenv] basepython = python3 allowlist_externals = find deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete stestr run --slowest {posargs} [testenv:pep8] deps = {[testenv]deps} commands = flake8 bandit -r oslo_metrics -x tests -n5 [testenv:venv] commands = {posargs} [testenv:docs] allowlist_externals = rm deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = rm -fr doc/build sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:cover] setenv = PYTHON=coverage run --source oslo_metrics --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml [flake8] show-source = True ignore = H405,W504,F405 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [hacking] import_exceptions = [testenv:releasenotes] allowlist_externals = rm deps = {[testenv:docs]deps} commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html