Commit Graph

15 Commits

Author SHA1 Message Date
Thiyagu55 7c75b3867b
SQLCommenter semicolon bug fix (#1200) 2022-07-22 07:52:40 +05:30
Diego Hurtado 6876ad857f
Refactor TracedConnectionProxy (#1097)
* Refactor TracedConnectionProxy

Fixes #1077

* Remove unecessary methods
2022-06-07 18:20:59 +01:00
Srikanth Chekuri d54b61e687
feat(instrumentation-dbapi): add experimental sql commenter capability (#908)
* feat(instrumentation-dbapi): add experimental sql commenter capability

* Update instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>

* Fix lint

* Add CHANGELOG entry

* Fix lint

* Fix lint again

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2022-02-11 10:14:26 -06:00
Srikanth Chekuri 3ec77360cb
Update instrumentations to use tracer_provider for creating tracer if given, otherwise use global tracer provider (#402) 2021-04-28 08:36:37 -07:00
Srikanth Chekuri 8d0c150b31
Sync with auto generated semantic convention constants (#428) 2021-04-19 23:37:10 -07:00
alrex 9315eb0fb2
use StatusCode from trace instead of trace.status (#366) 2021-03-09 14:33:13 -08:00
Owais Lone f436514554
Replaced Tracer.use_span() with opentelemetry.trace.use_span() (#364) 2021-03-08 09:33:49 -08:00
Mario Jonke f0adb23143
Remove 'component' span attribute in instrumentations (#301) 2021-01-29 13:15:26 -08:00
Owais Lone 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
Srikanth Chekuri a208316dca Fix tests for dbapi 2020-11-18 01:35:50 +05:30
stschenk 6bf1013d2e
Apply suggestions from code review
Co-authored-by: Yusuke Tsutsumi <tsutsumi.yusuke@gmail.com>
2020-11-08 08:52:09 -08:00
stschenk 8afbd83e8c add param to control collection of db.statement.parameters 2020-11-06 09:37:28 -08:00
Leighton Chen 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
Leighton Chen 362fe9c05e Use is_recording flag in aiopg, asyncpg, dbapi, psycopg2, pymemcache, pymongo, redis, sqlalchemy instrumentations (#1212) 2020-10-08 12:25:20 -07:00
Leighton Chen 8fef469ab7 Rename db framework packages from "ext" to "instrumentation" (#966) 2020-08-03 17:48:44 -07:00