21 Commits

Author SHA1 Message Date
3bcc043e9d Add connection attributes to sqlalchemy connect span (#1608)
* Add connection attributes to sqlalchemy connect span

* Fix formatting

* Move changelog entry to unreleased section

---------

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-02-20 17:17:18 +00:00
bbe7578d17 Fix sqlalchemy uninstrument (#1581) 2023-01-29 09:43:06 +05:30
43d0c6cae3 fix the instantiation of NoOpTracerProvider (#1577) 2023-01-12 17:16:03 +00:00
346160467f add a test using NoOpTracerProvider - sqlalchemy (#1508) 2023-01-01 18:33:34 +00:00
99e0b42635 Add uninstrument test for sqlalchemy (#1471) 2022-12-05 22:28:10 +05:30
be4ceec08c Strip leading comments from SQL queries when generating the span name. (#1434)
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2022-11-18 14:01:07 +01:00
7c75b3867b SQLCommenter semicolon bug fix (#1200) 2022-07-22 07:52:40 +05:30
2ce69a668f Add span for connection phase (#1134) 2022-07-17 21:09:15 +05:30
f03bef2579 Add support to instrument multiple sqlalchemy engines (#1132)
* Override __new__ to instrument multiple engines

* add possibility to instrument mutiple engines

* update changelog

* update return type in doc

* fix CHANGELOG

* format

* fix test

* Check if engines isinstance Sequence

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2022-06-16 13:44:55 +02:00
80969a06da use sqlalchemy module name not engine. fixes #922 (#1086) 2022-05-11 15:08:19 +05:30
dbb35a2946 Sqlcommenter integration into SQLAlchemy (#924)
* Integrating sqlcommenter into psycopg2

* Integrating sqlcommenter into psycopg2 - Converted public local variable into private

* Added test cases for sqlcommenter & PR Changes

* Code refactoring for generate sqlcommenter

* Added testcase for sqlcommenter integration into sqlalchemy

* updated change log

* updated to accept latest logs

* Updated lint changes

* Fixed errors due to linting

* Fixed linting errors

* Fixed linting errors

* Fixed linting errors

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2022-03-08 23:57:00 -06:00
3137c1fa41 Upgrade black (#802) 2021-11-10 20:57:01 +00:00
e8af7a3339 Respect provided tracer provider when instrumenting SQLAlchemy (#728)
* respect provided tracer provider when instrumenting sqlalchemy

This change updates the SQLALchemyInstrumentor to respect the tracer
provider that is passed in through the kwargs when patching the
`create_engine` functionality provided by SQLAlchemy. Previously, it
would default to the global tracer provider.

* feedback: pass in tracer_provider directly rather than kwargs

* feedback: update changelog

* build: lint
2021-10-12 17:49:22 +00:00
c8b6de6c1c Add support for SQLAlchemy 1.4 (#568) 2021-08-04 15:00:10 -07:00
f436514554 Replaced Tracer.use_span() with opentelemetry.trace.use_span() (#364) 2021-03-08 09:33:49 -08:00
8c8f2785bd SQLAlchemy: Use SQL operation and DB name as the Span name (#254)
Current instrumentation uses the entire SQL query as the operation name
which makes traces very hard to read and understand in addition to
introducing high-cardinality issues. This commit fixes the problem by
using only the SQL operation name and the DB name instead of the entire
query.
2021-01-20 08:41:19 -08:00
9fea7f7a27 Ensure SQLAlchemy spans have kind set to CLIENT (#278)
SQLAlchemy spans were missing kind field and it was being set to
internal instead of client. This commit changes sqlalchemy spans to have
kind set to "client" instead.
2021-01-05 09:05:58 -08:00
d36edda08a Remove service from tests 2020-11-23 22:57:07 +05:30
3786d6d0fa Fix tests 2020-11-21 22:22:57 +05:30
169f62c8ce Use is_recording flag in aiopg, asyncpg, dbapi, psycopg2, pymemcache, pymongo, redis, sqlalchemy instrumentations (#1212) 2020-10-22 15:30:26 -07:00
ede460e7e6 Rename db framework packages from "ext" to "instrumentation" (#966) 2020-10-22 15:30:26 -07:00