* botocore: remove random packages from test-requirements
Refs #1736
* boto: remove random packages from test requirements
Refs #1736
* tox: re-enable boto3sqs tests with pypy3
* threading: remove confluent-kafka from test requirements
* fix: Ensure compability with Psycopg3 to extract libpq build version
Struggling with getting dbapi and psycopg3 working.
Think this is the error, __libpq_version does not exist on psycopg3
https://github.com/psycopg/psycopg/blob/master/psycopg/psycopg/pq/pq_ctypes.py#L1220
* docs: Add changelog entry
* docs: Fix spelling
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
* Calling the exception() method when future is in the cancelled state is causing a CancelledError
Calling the exception() method when future is in the cancelled state is causing a CancelledError. we should check the cancelled state first and call f.exception() only if it's not cancelled.
* modify lint
* modify lint
* Update CHANGELOG.md
* remove init()
* add future cancelled test code
* add future cancelled test code
* add future cancelled test code
* add future cancelled test code
* add future cancelled test code
* add future cancelled test code
* lint
* lint
* remove if condition
* modify test code
* lint
* lint
* remove pytest
---------
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Fix exception handling for events with requestContext
* added entry to changelog
* reformatted with black
---------
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* - fixed compatibility issue in set_channel of span_builder.py
- changed test-requirements-2.txt to use aio-pika==9.0.5
- added test-requirements-3.txt to use aio-pika==9.4.1 (latest atm)
- tox.ini: fixed incorrect commands_pre which would always install test-requirements-2.txt and cause dep installation conflict
- tox.ini: added aio-pika-3 commands
* Add version comment for aio-pika
---------
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* 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>
* [boto3sqs] Instrument `Session` and `resource`
This commit addresses the following open issues:
- https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1699
- https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1996
There are four ways to access the SQS API via `boto3`:
- `client = boto3.client("sqs")`
- `client = boto3.Session().client("sqs")`
- `sqs = boto3.resource("sqs")`
- `sqs = boto3.Session().resource("sqs")`
The existing wrapper tied into `boto3.client` to wrap a generated `botocore.client.SQS` class.
The change here covers the three missing initialization methods.
* update changelog
* rename duplicate test methods
* implement uninstrument
* [boto3sqs] Reduce number of wrapper targets
There are actually 6 ways to initialize a boto3 API object.
```py
boto3.client() # Using default global session
boto3.resource() # Using default global session
boto3.Session().client() # Using "re-exported" session.Session
boto3.Session().resource() # Using "re-exported" session.Session
boto3.session.Session().client() # Using session.Session directly
boto3.session.Session().resource() # Using session.Session directly
```
We only have to patch `session.Session.client` to catch all the cases.
- b3c158c62a/boto3/session.py (L217-L229)
- b3c158c62a/boto3/session.py (L446-L457)
* Remove unused import
---------
Co-authored-by: Matt Oberle <mattoberle@users.noreply.github.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>