* 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>
* Refactor bootstrap generation
This makes the bootstrap script get the package version directly from
pypi instead of from our lists of packages. This makes sure that the
packages are actually available for the end user to install.
Fixes#2053
* Fix lint
* Fix lint
* Remove aiohttp
* Add missing dependency for aiohttp-client
* Use hatch version
* Separate lint for flask
* Seaparate lint for resource-detector-container
* Add linting workflow
* Update contributing documentation
* Fix lint workflow
* Add fix for resource-detector-container
* Separate lint for sdk-extension-aws
* Separate lint for distro
* Separate lint for opentelemetry-instrumentation
* Separate lint for aiohttp-client
* Separate lint for aiohttp-server
* Separate lint for aiopg
* Separate lint for aws-lambda
* Separate lint for botocore
* Separate lint for boto3sqs
* Separate lint for django
* Separate lint for dbapi
* Separate lint for boto
* Separate lint for elasticsearch
* Separate lint for falcon
* Separate lint for fastapi
* Separate lint for urllib
* Separate lint for urllib3
* Separate lint for requests
* Separate lint for starlette
* Separate lint for jinja2
* Seaparate lint for logging and richconsole
* Separate lint for prometheus-remote-write
* Separate lint for mysql
* Separate lint for mysqlclient
* Separate lint for psycopg2
* Separate lint for psycopg
* Separate lint for pymemcache
* Separate lint for pymongo
* Separate lint for pymysql
* Separate lint for pyramid
* Separate lint for asgi
* Separate lint for asyncpg
* Separate lint for sqlite3
* Separate lint for wsgi
* Separate lint for grpc
* Separate lint for sqlalchemy
* Separate lint for redis
* Separate lint for remoulade
* Separate lint for celery and sklearn
* Separate lint for system-metrics
* Separate lint for threading
* Separate lint for tornado
* Separate lint for tortoiseorm
* Separate lint for httpx
* Separate lint for propagator-aws-xray
* Remove lint
* Separate lint for propagator-ot-trace
* Separate lint for sio-pika
* Separate lint for aio-pika
* Fix aio and sio pika
* Separate lint for kafka-python
* Separate lint for confluent-kafka
* Separate lint for asyncio
* Separate lint for cassandra
* Separate lint for processor-baggage
* Remove lint test environment
* Rename lint workflow file
* Fix sio-pika lint testing package path
* More fixes
* Fix linting for opentelemetry-instrumentation
* Add section for linting with 3.8
* Add missing lint install command for elasticsearch
* Sorted packages
* 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>
* feat(pika): adding support for channel.consume instrumentation
* updated changelog
* wip tests
* updating docs
* more tests
* removing span member on object proxy
* adding test for ReadyMessagesDequeProxy
* adding tests
* better comment on span.end()
* fixing docs
* ending span even on exceptions
* feat: add opentelemetry-instrumentation-threading library
* fix: update python file with black formatter
* fix: modified title underline too short issue
* fix: modified library sorted via isort tool
* fix: modified CHANGELOG.md and remove unused parameter
* test: migrated unit test cases from the #1582 to this project
* chroe: updated the tox.ini test commands
* fix: fixed the lint issue
* feat: support ThreadPool and update document
* fix: fixed the lint issue
* refactor: remove redundant class and simplify capture OTel context usage
* fix: removed unused parameter
* test: added a new test case for thread pool
* fix: remove unused return response
* refactor: compared the array
* fix: remove f-string
* fix: fixed pylint issue
* fix: test library
* fix: updated CHANGELOG.md
---------
Co-authored-by: Aaron Abbott <aaronabbott@google.com>