* 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>
* fix: retain httpx.URL type on request.url
This fixes a regression caused in #2020 where request.url stopped being of `httpx.URL` type, causing issues with request/response hooks.
* Update CHANGELOG.md
* tests: adding assertions to verify request.url on hooks is a httpx.URL
* fixup: adjust check to consider httpx < 0.20.0
* fixup: keep code dry
---------
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* elasticsearch: don't set body as db statement for bulk requests
bulk requests can be too big and diverse to make sense as db statement.
Other than that the sanitizer currently only handles dicts so it's
crashing.
Closes#2150
Co-authored-by: Jason Mobarak <git@jason.mobarak.name>
Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>
* Update CHANGELOG
* Please the linter
---------
Co-authored-by: Jason Mobarak <git@jason.mobarak.name>
Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>