9 Commits

Author SHA1 Message Date
f436514554 Replaced Tracer.use_span() with opentelemetry.trace.use_span() (#364) 2021-03-08 09:33:49 -08:00
f0adb23143 Remove 'component' span attribute in instrumentations (#301) 2021-01-29 13:15:26 -08:00
8b9202be6f Updated dbapi and psycopg2 instrumentations. (#246)
Changes:

- Update dbapi instrumentation to use the SQL statement name as the span
instead of the entire SQL query.
- Renamed TracedCursor with CursorTracing. The class was not a valid
Cursor so the name was confusing.
- Updated CursorTracing's (previously TracedCursor) traced_execution
method to accept the cursor instance as the first argument. This is
required as for some dbapi implementations, we need a reference to the
cursor in order to correctly format the SQL query.
- Updated psycopg2 instrumentation to leverage dbapi's `cursor_factory`
mechanism instead of wrapping the cursor with wrapt. This results in a
simpler instrumentation without monkey patching objects at runtime and
allows psycopg2's type registration system to work. This should make it
possible to use psycopg2 instrumentation when using the JSONB feature or
with frameworks like Django.
2021-01-20 10:45:28 -08:00
a208316dca Fix tests for dbapi 2020-11-18 01:35:50 +05:30
6bf1013d2e Apply suggestions from code review
Co-authored-by: Yusuke Tsutsumi <tsutsumi.yusuke@gmail.com>
2020-11-08 08:52:09 -08:00
8afbd83e8c add param to control collection of db.statement.parameters 2020-11-06 09:37:28 -08:00
5cab8136f7 Change status codes from grpc status codes, remove setting status in instrumentations except on ERROR (#1282) 2020-10-28 14:28:58 -07:00
362fe9c05e Use is_recording flag in aiopg, asyncpg, dbapi, psycopg2, pymemcache, pymongo, redis, sqlalchemy instrumentations (#1212) 2020-10-08 12:25:20 -07:00
8fef469ab7 Rename db framework packages from "ext" to "instrumentation" (#966) 2020-08-03 17:48:44 -07:00