summaryrefslogtreecommitdiff
path: root/osprofiler/cmd
Commit message (Collapse)AuthorAgeFilesLines
* Remove sixwangzihao2020-12-171-5/+1
| | | | | | | | | | | | | | | | Remove six Replace the following items with Python 3 style code. - six.moves - six.StringIO - six.add_metaclass - six.string_types - six.binary_type - six.text_type - six.integer_types - six.PY3 - six.PY2 - six.iterkeys Change-Id: Id9f2076be1a6a2d99db5acb682df8bebe893de36
* Fix pep8 failuresAndreas Jaeger2020-06-021-3/+3
| | | | | | | | | | With an updated flake8, we get some new warnings. Update hacking directly to version 3.1.0 and fix the problems found. Note that before this change, flake8 used the default "ignore" list, this now adds a new ignore list. Change-Id: Iccbf4f30eb4e542d3824b7782f43eacda29c5a90
* Enforce order of import statementsIlya Shakhat2020-04-201-2/+2
| | | | | | | This patch adds flake8-import-order plugin and fixes all found issues. Change-Id: Ibbeae4afeb737401de48fb2e7e225eb0a969908b
* Bring env OSPROFILER_CONNECTION_STRING into effect2.8.1francotseng2019-06-281-2/+11
| | | | | | | | | | | | The --connection-string is marked required, and parse_args() assumes the flag invalid if it's not supplied as command line argument, even if env OSPROFILER_CONNECTION_STRING is setted. We should not rely on the required=True of argparse module, but check the required args on our own to take env arguments into consideration. Change-Id: I50f5f369ec41ddc82f9b66f5910b7805940fb387
* Filter traces that contain error/exception2.0.0Tovin Seven2018-02-051-2/+9
| | | | | | | Adds ability to filter error traces to OSProfiler. Adds command for list error traces. Change-Id: I0ec97337cae5e573fedae2b6665aa73a73fe3654
* Unify and fix `list_traces` functionIlya Shakhat2018-01-231-1/+1
| | | | | | | | | | | | | | 1. Remove `filter` parameter from `list_traces` function, since filtering is heavily depends on a backend and cannot be (easily) made uniform. 2. Unify the output of `list_traces` - the function returns a list of `traces`, where each trace is a dictionary with at least `base_id` and `timestamp` fields. 3. Fix `list_traces` in Redis driver, so it returns only traces, instead of events. 4. Add functional test for `list_traces` in Redis driver. Change-Id: Ia81540288fe98fd9b8e256c62cc372fa33fcbea3
* Add initial 'trace list' commandOmer Anson2018-01-231-0/+26
| | | | | | | | | This is an initial trace list command, which acts both as a starting-point, as well as an immediate solution for anyone who needs the basic functionality of this feature. Change-Id: I99ad62103914b047cfc3c33e50ae98b6a0d01d6d Related-Bug: #1733232
* Remove Ceilometer supportIlya Shakhat2018-01-182-131/+3
| | | | | | | | | | | | | | | Our current Ceilometer driver relies on old version of ceilometer client, which is in deprecated state and not compatible with the latest Telemetry projects (Panko, Gnocchi). The functionality of the driver is not tested automatically and most probably broken. So it's time to let it go and clean the code. This patch leaves "messaging" driver as default for notification and makes "connection-string" a required parameter in CLI. In the future we may consider to change default notification driver, though it requires proper release note handling in all affected projects. Change-Id: Id8442c4ff13c5cc33fd909b4757757cc5f396f50
* Add filter for OSprofiler html outputTovin Seven2018-01-021-6/+35
| | | | | | | | | | | | | | | | | | This patch help us filter some spans in html output using angular-ui-tree-filter (MIT license) with regular expression. Currently, this work help us filter: - name - project - service - host We can add more fields as we need. Demo: - Small trace: https://tovin07.github.io/osprofiler-filtration/pretty-simple.html - Large trace: https://tovin07.github.io/osprofiler-filtration/very-large.html Change-Id: I78ff242fce3e0cf07b9e4969b783e32d9529c581
* Extend messaging driver to support reportingIlya Shakhat2017-10-271-0/+6
| | | | | | | | | | | | | | | | | | Messaging driver is extended to read profiling events from RabbitMQ and generate report. This simplifies usage of profiling in DevStack since Ceilometer is not needed anymore. The typical workflow is following: 1. User issues a command with profiling enabled: openstack --os-profile SECRET KEY <command> 2. User retrieves the trace: osprofiler trace show --connection messaging:// --transport-url rabbit://<rabbituser>:<rabbitpassword>@<devstack>:5672/ --json <trace-id> Change-Id: I950896d6d9156f09e378bdfcf272aef5da4ece74
* Do not require OpenStack authentication to run osprofiler CLIIlya Shakhat2017-08-111-25/+0
| | | | | | | | | | | OpenStack authentication is needed by Ceilometer driver only and is annoying when other drivers are used. The way we currently verify os-parameters is conceptually wrong: first it covers only subset of possible variations, second it differs from implementation inside of python-ceilometerclient. Change-Id: I3bbb7c47170064728790b22393f6071be3ace336 Closes-bug: 1653062
* Add loading local static files option of template.htmlchenxu2017-07-312-9/+28
| | | | | | when rendering template.html, static files can be loaded from local path '/libs' by using include_libs args. Change-Id: I36d3457d36e5b831343409748e2e97b377e0cc92
* Fix error message for invalid traceVipin Balachandran2017-03-221-7/+2
| | | | | | | | | | Some of the reasons printed for invalid trace are specific to Ceilometer. Ceilometer driver already prints authentication failure message. Also, end-users shouldn't be concerned about configuring Ceilometer. Updating the error message so that it is generic enough for all backends. Change-Id: Id44cdacaf423852458ebef6fb4e5d142ee9ee8b4
* Highlight last trace for OSprofiler html output1.7.0Tovin Seven2017-03-081-1/+8
| | | | | | | | | | | | Sometime, exception or error occurs, we want to find problems quickly. However, if an output of OSprofiler is long, it will very hard to find where is the last trace that get stuck. This visualization can help us a lot in finding problems in services. Example: https://tovin07.github.io/glance-image-list-highlight.html Change-Id: Iaabb7850db4dfeec8ce38e0ef5264db8122355ef
* Merge "Change some bindings to one-time bindings"Jenkins2017-03-071-9/+9
|\
| * Change some bindings to one-time bindingsTovin Seven2017-02-071-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Almost our data-binding in this template is two-way binding. It is not necessary, 2-way binding will add lots of watchers, so, our html page will very slow with large trace. I tried with some html outputs >20MB, it's terrible. Reference (in One-time binding section): https://docs.angularjs.org/guide/expression Change-Id: Ida2f567abff356f20ddcc1d8535a22fd906035ea
* | Merge "Increase angular digest iteration limit"Jenkins2017-01-251-0/+3
|\ \
| * | Increase angular digest iteration limitTovin Seven2017-01-241-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default iteration limit is set to 10. Increase limit to 50 will display traces more than 10 levels. Why? Because some trace outputs by heat, magnum, nova have depth from 15 to 35 (so insane). Limit to 10: https://tovin07.github.io/cluster-create-with-default-iteration-limit.html Limit to 50: https://tovin07.github.io/cluster-create-with-50-iteration-limit.html Reference: https://docs.angularjs.org/api/ng/provider/$rootScopeProvider Change-Id: Ib83a8db570485af72c0875aad7d6b944210a7b68
* | Remove extra white spaces in json outputTovin Seven2017-01-241-0/+2
|/ | | | | | | | | json.dumps adds one space after colon by default. However, if we work with large trace, this will increase file size a lot. TrivialFix Change-Id: I46241ead0a09db4a32281f65a86bde2a413655b4
* Fix mistake in split meta stringTovin Seven2017-01-191-3/+5
| | | | | | | | | When trace meta include more than one dot "." such as: meta.raw_payload.Stack.state_set-start OSprofiler will display Stack section only. Change-Id: I53de736f9fbc3fd1fcd14aa975efdf8a60c6d126 Closes-Bug: #1657684
* Upgrade libraries, add highlight for JSON dataTovin Seven2016-12-151-101/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade libraries: - Angular 1.2.10 -> 1.6.0 - Angular UI 0.11.0 -> 2.3.1 - Bootstrap 3.2.0 -> 3.3.7 Remove old-style Bootstrap 2 CSS Move template from JS concatenate to template section Change naming convention to camelCase Angular style [1][2][3]: - `vm syntax` - `controller as` syntax - $inject property annotation [4] - IIFE for JS section instead of global variable all the time Add highlight.js for JSON in metadata section (when open modal) Add close button for modal Add toggle wrap text button for modal Preview output change: - Current: https://embed.plnkr.co/tfL1RHLJBvHR5om9ZoII/?show=preview - New: https://embed.plnkr.co/9s3uUy6v4OUpuYSrludz/?show=preview - Compare: https://dl.dropboxusercontent.com/u/16864276/compare_trace.png [1] https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md [2] https://github.com/toddmotto/angular-styleguide [3] https://github.com/airbnb/javascript [4] https://docs.angularjs.org/guide/di Change-Id: I381ac48114679844ed5cf8b4229701689e87a5f1 Implements: blueprint update-html-template
* Fix syntax in JS, JSON indent with 4 spacesTovin Seven2016-12-132-40/+44
| | | | | | | | | | | | | | | | | | template.html - Fix syntax: + Add a lot of semi-colons after statements/function expressions + Add a lot of brackets in for/if section - Change bracket notation -> dot notation (prefered in JS) - Change case in CSS colors - Change double quote to single quote - Add closing span tag commands.py - Indent json with 4 spaces Implements: blueprint update-html-template Change-Id: Idad248c3b3f9570045efb1495b69614a60e3f733
* Merge "Re-format html template"Jenkins2016-12-071-160/+158
|\
| * Re-format html templateTovin Seven2016-11-281-160/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | - Indent CSS - Indent JavaScript - Indent HTML - Remove some redundant spaces, empty lines - Add some empty lines to CSS section - Indent using 4 spaces Implements: blueprint update-html-template Change-Id: I7655b0cb040a6e36c41569f20022b548ec677f00
* | Merge "Use oslo_utils.uuidutils.is_uuid_like"Jenkins2016-12-061-1/+3
|\ \
| * | Use oslo_utils.uuidutils.is_uuid_likeVipin Balachandran2016-12-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Using oslo_utils.uuidutils.is_uuid_like() to check if the trace positional argument to "trace show" command is a trace ID or a file name containing the trace. Change-Id: I01c20beb2394805f29a1d7bdfa60ba6df5bac627
* | | Merge "Error out for invalid trace ID"Jenkins2016-12-061-1/+1
|\ \ \
| * | | Error out for invalid trace IDVipin Balachandran2016-12-021-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | There is no error message printed if the trace ID input to the 'trace show' command is invalid. Fixing this by checking for empty child nodes at the root of the trace result from driver. Change-Id: I8fc40356cffa98f5e9b9f6048b8fe422271f41f0 Closes-bug: #1644448
* | | Merge "Add exception to trace point details"Jenkins2016-12-061-1/+1
|\ \ \ | |/ / |/| / | |/
| * Add exception to trace point detailsVipin Balachandran2016-11-221-1/+1
| | | | | | | | | | | | | | Adding exception raised by the method to its corresponding trace point details. Change-Id: I8bdaee1f4eaf8cd7875c5264519e03f2d04ea12a
* | Merge "Visualize trace output as graph"Jenkins2016-12-021-2/+51
|\ \
| * | Visualize trace output as graphVipin Balachandran2016-11-221-2/+51
| |/ | | | | | | | | | | | | | | Adding output format 'dot' to generate the trace output as DOT graph. Also, adding option 'render-dot' to render the DOT graph in pdf format. Change-Id: Ie4f1cbefcdaf99be33ec497b9957c55e1ea4ceab
* | Merge "Fix import order"Jenkins2016-12-011-2/+1
|\ \
| * | Fix import orderVipin Balachandran2016-11-231-2/+1
| |/ | | | | | | | | | | | | | | As per OpenStack style guidelines, the import order is stdlib, followed by third-party lib imports and finally project imports. Fixing all violations of this guideline. Change-Id: I3b7f1082c04b8d6b1f860cefc0f1a08ae8b803f6
* | Pretty print json outputVipin Balachandran2016-11-221-1/+2
|/ | | | | | | Adding kwarg indent in json.dumps() to pretty print the trace output in json format. Change-Id: Icea772bd18e366ad576de7dbc2afc11b2fb376b9
* Use an env variable for connection string defaultVipin Balachandran2016-10-101-2/+5
| | | | | | | | | The user experience would be better if the connection string can be set as an environment variable while running the trace show command. This patch uses env[OSPROFILER_CONNECTION_STRING] as the default connection string if set. Change-Id: I816dceb05c4dad10897c965d7401a694d26a191a
* Add Elasticsearch driverAlexander Ignatyev2016-09-071-0/+4
| | | | Change-Id: Idca6ff8a946ec46c65fab57f10cd17ebcdc8bc3e
* Add Ceilometer driverAlexey Yelistratov2016-07-131-23/+20
| | | | | Change-Id: I186ce1c33f56e62edc14edf099d83c545dd9c248 Spec: Multi backend support
* Merge "Add backward compatible drivers structure"Jenkins2016-07-123-28/+4
|\
| * Add backward compatible drivers structureAlexey Yelistratov2016-07-043-28/+4
| | | | | | | | | | Change-Id: I3e904d0e456aa6999cd9a02a268f54e6d8b729de Spec: Multi backend support
* | Add an error tip when trace_id is not foundwangxiyuan2016-04-011-1/+2
|/ | | | | | | If ceilometer doesn't enable profiler notification topic, the trace_id would not be found as well. Change-Id: I54a976498ae77380ecdce1b449ba70a9522ce692
* Merge "Make it possible to specify file path as a source for trace"0.4.0Jenkins2016-01-121-26/+33
|\
| * Make it possible to specify file path as a source for traceBoris Pavlovic2016-01-111-26/+33
| | | | | | | | | | | | | | | | osprofiler trace show <file_path> --html will generate html report from file that contains trace info in json Change-Id: I20eaf679ce30d34bd8f974438e3cb4ee958c857a
* | Improve HTML reports performanceBoris Pavlovic2015-12-291-3/+3
|/ | | | | | | | Using angular logic instead of CSS rules for hover functionallity is really crazy idea that works very slow when we have >200 elements on page. Change-Id: Ifdf11694e526918b71ce3b384d94eea6b7357c4b
* Fix Ceilometer parser to use eventsDina Belova2015-12-241-9/+7
| | | | Change-Id: I83aa97b3caadb053fddc76088d19ed5110035c67
* Add hacking rules & fix hacking issuesBoris Pavlovic2015-11-233-105/+105
| | | | Change-Id: Id335bfdf49ed88edd14e896a48c22b11113600c8
* Various cleanupsBoris Pavlovic2015-06-241-18/+1
| | | | Change-Id: I311f694d2e2e92468d3345d0da3f550fffa560ee
* Merge "Imporve generated trace html"Jenkins2014-08-262-2/+3
|\
| * Imporve generated trace htmlBoris Pavlovic2014-08-262-2/+3
| | | | | | | | | | | | | | | | | | Use indent (to make trace info human readble) Remove duplicated host column in modulal window Add duration in modal window Change-Id: I0549927952d903b0d46261cbe8f4c0bfa4dc2da9
* | Adding a hits to notice operator when trace not foundZhi Yan Liu2014-08-251-2/+4
|/ | | | | | | | | | A wrong HMAC key provided in original calling will make osprofiler refuses to collect tracing data. This change updated hits output of command "trace show" when specified trace not found, to make operator awares this case. Change-Id: Ie9dbeb3d89c41cdba8a7f695c3460218204d5dbf Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>