-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dbapi] Trace db fetch and session methods #664
Conversation
do you have any sample traces? mostly curious to see what these look like, it is usually a 1:1 of |
Sure here it is To answer you question, correct, there is one |
cool, looks great. I think my concern was if we end up with a library that calls |
Your concern is absolutely reasonable. I would say that in the real world if someone calls |
is this still considered a WIP? |
@brettlangdon I need to take some time to go through it for final checks. Will do asap! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
big picture looks pretty good, few minor changes.
… integration backward compatibilityè
* [core] add Tracer.on and Tracer.emit for span hooks * [core] rename Tracer.emit to Tracer._emit * [core] fix mispelling of Tracer._hooks * [core] do not raise an exception or error log * [falcon] add span hook documentation for Falcon * [core] add tests for Tracer.on/Tracer._emit * [core] add tracer hook argument tests * [core] register span hooks on config object instead * [core] fix flake8 issues * Update ddtrace/settings.py * Update ddtrace/settings.py * Update ddtrace/settings.py * [core] remove Hooks.__getattr__, add Hooks.on alias for Hooks.register
b0b9de9
to
0929589
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple things to clean-up. Looks good otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff. Caught a find and replace mistake, but isn't show stopping.
Co-Authored-By: majorgreys <tahir@tahirbutt.com>
* [dbapi] Trace fetch methods * [dbapi] Fix unit tests after adding the row count as a tag for django integration backward compatibilityè * [dbapi] Minor fixes to the the dbapi tracing implementation * Add tracing to commit and rollback to dbapi * Add tests for dbapi TracedConnections * [core] add support for integration span hooks (#679) * [core] add Tracer.on and Tracer.emit for span hooks * [core] rename Tracer.emit to Tracer._emit * [core] fix mispelling of Tracer._hooks * [core] do not raise an exception or error log * [falcon] add span hook documentation for Falcon * [core] add tests for Tracer.on/Tracer._emit * [core] add tracer hook argument tests * [core] register span hooks on config object instead * [core] fix flake8 issues * Update ddtrace/settings.py * Update ddtrace/settings.py * Update ddtrace/settings.py * [core] remove Hooks.__getattr__, add Hooks.on alias for Hooks.register * Add tests to dbapi for commit/rollback * Update test for fetch tracing * Update tests for changes to commit/rollback tracing * Replace double quotes * Replace pytest+fixtures with unittest * Add tracer to pin * Convert double quotes to single * Remove unnecessary tox changes * Update tests * Clean-up * Remove duplicate test * Update tests/contrib/sqlite3/test_sqlite3.py Co-Authored-By: majorgreys <tahir@tahirbutt.com>
In addition to
execute
,executemany
andcallproc
methods, we want to trace also the variousfetch
methods to provide users with a more powerful set of information.In the process of doing so, we realized that the django integration was using a custom tailored version of the dbapi traced cursor that could be replaced with the generic dbapi traced cursor.
Further, we want to create spans for the session-level
commit
androllback
methods.