summaryrefslogtreecommitdiff
path: root/osprofiler/sqlalchemy.py
Commit message (Collapse)AuthorAgeFilesLines
* In case of an error, always add messageShoham Peller2018-12-161-0/+1
| | | | | | | | The Jaeger driver counts on this message to be in the error description. It fails if the message is not present Closes-Bug: 1804218 Change-Id: I08f8328700049d9a0d791b12375fe9a6e8a3948a
* Handle and report SQLAlchemy errorsIlya Shakhat2017-10-271-0/+24
| | | | | | | | | | Add handling of SQLAlchemy errors into OSProfiler. For errors profiler will emit stop event with information about error (Python exception). Closes bug: #1706299 Change-Id: Ib9c1ea2ee3fb0450b8591ff1164f3e7153c5472a
* Add function/sql results to trace infoTovin Seven2017-08-071-6/+22
| | | | | | | | | | | | | This patch adds function/sql results to trace info New arg: hide_result (Boolean True/False) - True (default): Hide function/sql result by default - False: Show result in trace info With database: add_tracing(sqlalchemy, engine, name, hide_result=True) Demo: https://tovin07.github.io/murano/environment-show-with-results.html Change-Id: I317dfa04e0109d46c1a5ca1e0a3523cfd8470d78
* Add hepler to trace sessions1.3.0Dina Belova2016-04-111-0/+11
| | | | | | | | | Lots of OpenStack projects are moving from direct usage of engine to enginefacade module usage with its _TransactionContextManager. Sessions for the context are created via .using() method of this manager. Change-Id: Ie517524a10713e09bb2491f2d76b651b20ecd4b6
* Fix Ceilometer parser to use eventsDina Belova2015-12-241-1/+4
| | | | Change-Id: I83aa97b3caadb053fddc76088d19ed5110035c67
* Add hacking rules & fix hacking issuesBoris Pavlovic2015-11-231-2/+2
| | | | Change-Id: Id335bfdf49ed88edd14e896a48c22b11113600c8
* Improve tracing of sqlalchemyBoris Pavlovic2014-07-091-16/+11
| | | | | | | | | | Use before_cursor_execute and after_cursor_execute instead of before_execute and after_execute. 1) Migration with custom types will work now (even if tracing is enabled) 2) We don't need to render 2 times SQL expressesion => less overhead Change-Id: I7c6b6909ce0f15a69ce5caad544e1351a647b472
* Move public methods to top of sqlalchemy moduleBoris Pavlovic2014-07-021-21/+21
| | | | | | It's easy for end users to find all public methdos when they are on top. Change-Id: I0b80ea745d42dfec8523730a1f0410e2e8a1d388
* Add "_" to names of private methodsBoris Pavlovic2014-07-021-4/+5
| | | | | | Add "_" to private things, so user won't access them directly Change-Id: Iab7d42c3b0a3f5ac3952b2be5c688ac939761701
* Add extra docs in sqlalchemy module0.1.0Boris Pavlovic2014-06-241-0/+7
| | | | Change-Id: Ieb9181a2e997e5e3ea02fd91d2b85aa54a4b83be
* Add possibility to disable sqlalchemy tracingBoris Pavlovic2014-05-071-2/+16
| | | | | | Engine that is used in migraiton shouldn't be traced. So add built-in support for disable tracing. This simplifies a lot code in OpenStack projects
* Remove from sqlachemy.after_execute notifcation resutls and add UTsBoris Pavlovic2014-02-241-11/+10
| | | | Mostly this patch just covers by UTs sqlalcehmy module
* Fix licensesBoris Pavlovic2014-01-121-1/+1
|
* Fix pepBoris Pavlovic2014-01-121-1/+1
|
* Add tracer for sqlalchemyBoris Pavlovic2014-01-101-0/+45
To use it in your code you should add 2 sqlalchemy engine event listeners import sqlalchemy from sqlalchemy import event as sa_event from osprofiler import sqlalchemy as sa_profiler engine = sqlaclhemy.create_engine('your_db_host') sa_profiler.add_tracing(sqlalchemy, engine, 'your_service')