Add "Repository" label to project urls pointing to the
opentelemetry-python repo root url.
Having within project urls one entry with the same value for all
packages released by the project will help tools for automatic
dependency management to suggest coherent upgrades for related packages.
* wrap sqlalchemy.engine.create.create_engine
sqlalchemy.engine_from_config directly calls create_engine imported from that path; if we don't
wrap that copy of the `create_engine` call then engines created via engine_from_config are not
instrumented.
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
* Update instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py
Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com>
* make some monkey-patching conditional on the version of SQLAlchemy
* lint
* fix changelog
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* Update CHANGELOG.md
---------
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Remove references to SQLAlchemy engines which are disposed of
EngineTracer in SQLAlchemy keeps weak references to a traced engine forever which
can cause a noticeable memory leak if engines are constantly getting creating.
* Updated changelog
---------
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Added deb to make cassandra tests work with python 3.13
* Bumped cffi to work with Python 3.13
* Fixed some test-requirements for Python 3.13
* Updated typing_extensions everywhere
---------
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
* Update version to 1.27.0.dev/0.48b0.dev
* Update SHA and fix test cases
* Update SHA
---------
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* requirements: bump zipp to 3.19.2
To resolve a dependabot securiy report.
* requirements: bump certifi to 2024.7.4
To resolve a dependabot security report.
* Remove unnecessary dependencies
Fixes#2661
* Separate runs
* Remove dev-requirements from test environment
* Try without negative if
* Remove positive if
* Remove if
* Separate benchmark-containing packages in another file
* Add missing test-requirements.txt file
* Use sqlalchemy version in sqlalchemy commenter instead of opentelemetry library version
The SqlAlchemy commenter is currently using the library version in the comment it emits, e.g.:
```
{
'db_driver': 'psycopg2',
'db_framework': 'sqlalchemy:0.45b0'
}
```
We should instead be using the sqlalchemy version here, as SqlCommenter did before
* Fix lint
* Fix lint
* Add CHANGELOG entry
---------
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Fix black an isort
* change bootstrap_gen to use a list instead of dict
* Bunch of updates
* Fix build
* fix lint
* Fix docs
* Fix lint
* More fixes
* Fix lint
* fix stupid mistake
---------
Co-authored-by: Christian Hartung <christian.hartung@olist.com>
* Use a weak reference to sqlalchemy Engine to avoid memory leak
Closes#1761
By using a weak reference to the `Engine` object, we can avoid the memory leak as disposed `Engines` get properly deallocated. Whenever `SQLAlchemy` is uninstrumented, we only trigger a removal for those event listeners which are listening for objects that haven't been garbage-collected yet.
* Made a mistake in resolving the weak reference
* Fixed formatting issues
* Updated changelog
* Added unit test to check that engine was garbage collected
* Do not save engine in EngineTracer to avoid memory leak
* Add an empty line to satisfy black formatter
* Fix isort complaints
* Fixed the issue when pool name is not set and =None
* Fix formatting issue
* Rebased after changes in a recent commit
* Updated PR number in changelog
---------
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>