1402 Commits

Author SHA1 Message Date
feed69bcc7 Upgrade Werkzeug library for testing (#2623) 2024-06-20 10:35:28 -07:00
fecb1e2862 Added recording of exceptions in Pyramid (#2622) 2024-06-20 10:19:20 -07:00
3669b477bd requirements: Bump urllib3 to latest (#2618) 2024-06-20 09:26:01 -07:00
4a75c535a7 boto: bump cryptography in test requirements (#2615) 2024-06-20 08:39:13 -07:00
b94c5906fd Use generated symbols from semantic conventions package (#2611) 2024-06-17 09:20:17 -07:00
daa84a6c63 instrumentation/tornado: bump to latest 6.4.1 in test-requirements (#2606) 2024-06-14 10:20:50 -07:00
91a69d4c99 aiohttp: bump aiohttp in test requirements to latest (#2607) 2024-06-14 10:11:24 -07:00
795c93376c instrumentation/pymysql: bump pymysql to 1.1.1 in test requirements (#2608) 2024-06-14 10:01:11 -07:00
6be205e604 consistently use of suppress_instrumentation utils (#2590) 2024-06-14 09:53:28 -07:00
361da3e45e botocore: bump moto to latest (#2605)
So we can bump Werkzeug too.
2024-06-13 16:56:04 -06:00
477b73cd9a requirements: bump requests to 2.32.3 (#2603) 2024-06-12 08:14:11 -07:00
da78275a55 increase delta for fastapi flaky test (#2591) 2024-06-11 10:16:18 -07:00
af9675cf04 requirements: bump sqlparse to 0.5.0 (#2595) 2024-06-11 09:44:16 -07:00
20e68e38e7 requirements: bump Jinja2 to 3.1.4 (#2593) 2024-06-11 09:18:56 -07:00
ab0ea0e0f9 Add support for python 3.12 (#2572) 2024-06-10 12:49:10 -07:00
97621523b8 requirements: bump Werkzeug (#2594) 2024-06-10 09:08:14 -07:00
3511ed180d requirements: Bump idna to 3.7 (#2583) 2024-06-07 12:54:38 -07:00
bc4b0493b9 requirements: bump pytest to 7.4.4 (#2587) 2024-06-07 08:53:22 -07:00
5b841282ab Do not use asgi name and version for tracer/meter for instrumentations using Asgi Middleware (#2580) 2024-06-06 12:52:32 -07:00
95fea2bfa7 Fix running async psycopg tests (#2540) 2024-06-05 11:14:44 -07:00
ed51ebb312 feat(asgi,fastapi,starlette)!: provide both send and receive hooks with scope and message (#2546) 2024-06-03 10:18:47 -07:00
0db9dbe311 Update version to 1.26.0.dev/0.47b0.dev (#2568) 2024-05-30 18:48:51 -07:00
dc711e870e Ensure httpx non-client methods are instrumented (#2538)
* Ensure httpx non-client methods are instrumented

* Update changelog

* Added subTest to distinguish tests inside a loop

* Updated changelog

* Add a comment explaining private attribute usage

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-05-30 22:48:22 +00:00
728976fb10 Fix net peer attribute for unix socket connection (#2493) 2024-05-30 14:50:53 -07:00
41792e7bb3 Add confluent kafka producer poll and flush returns (#2527) 2024-05-30 14:27:35 -07:00
7bddbb5419 fix: remove dependency on sdk for system-metrics instrumentation (#2557) 2024-05-29 10:17:50 -07:00
bd9156fff8 Remove unrelated packages from test requirements (#2559)
* 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
2024-05-29 09:56:27 -06:00
ac97b00457 Fix typos in test names (#2558) 2024-05-28 14:31:44 -07:00
88111d0a83 fix(requests): Fix wrong time unit for duration histogram (#2553) 2024-05-28 11:34:28 -07:00
eb8e45695e elasticsearch: don't produce spans if native elasticsearch support is enabled (#2524) 2024-05-24 13:13:37 -07:00
e6409568c1 Reenable pylint broad exception (#2536) 2024-05-24 11:12:53 -07:00
c1a51fde96 Pre Python 3.12 enablement fixes (#2529) 2024-05-24 10:57:29 -07:00
66a107fa49 fix(async-io): return coro when __name__ is not present (#2541) 2024-05-23 16:28:50 -07:00
da75015fad fix: Ensure compability with Psycopg3 to extract libpq build version (#2500)
* 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>
2024-05-23 12:02:46 +03:00
f4f3042f85 fix(async-io): check for __name__ atribute when tracing coroutine (#2521) 2024-05-21 21:48:54 -07:00
460fc33583 Fix typo in sample code (#2494)
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2024-05-15 12:52:59 +03:00
6a40ffd905 elasticsearch: tests against elasticsearch 8 (#2420)
* elasticsearch: bump handled version to 6.0

After 4de0e5659d451baee65af412242b95f174444d87

* elasticsearch: tests against elasticsearch 8
2024-05-14 14:59:41 -05:00
9b7197d3b9 docs: fix name of response hook signature in botocore instrumentation (#2512) 2024-05-13 10:24:24 -07:00
935f51eb8e upgrade pymongo to avoid CWE-125 vulnerability issue (#2497)
Signed-off-by: Yang, Robin <Robin.Yang@fmr.com>
2024-05-09 10:14:08 -05:00
bc804a3b07 Bugfix/check future cancelled (#2461)
* 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>
2024-05-07 18:40:21 -05:00
1d3dea0475 Remove SDK dependency from opentelemetry-instrumentation-grpc (#2474)
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2024-05-04 15:47:19 -05:00
de7ce0fb22 Use local imports when importing from tests (#2464) 2024-04-29 11:49:08 -07:00
3291f38e8d elasticsearch: test against elasticsearch 7 (#2431)
* Update core repo SHA

* elasticsearch: test against elasticsearch 7

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-04-28 09:20:17 -05:00
c8d5f851ed HTTP transition for flask (#2454) 2024-04-25 10:40:03 -07:00
d5b5925cf8 Fix exception handling for events with requestContext (#2418)
* Fix exception handling for events with requestContext

* added entry to changelog

* reformatted with black

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-04-25 10:57:39 -05:00
a0c3211c4f Bump black to 24.3.0 (#2452) 2024-04-23 08:45:48 -07:00
0980486f2f Fix compatibility issue aio-pika instrumentation (#2450)
* - 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>
2024-04-22 23:53:59 +00:00
5cb4dab364 Use sqlalchemy version in sqlalchemy commenter instead of opentelemetry library version (#2404)
* 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>
2024-04-22 18:04:20 -05:00
c644f0d7d5 [boto3sqs] Instrument Session and resource (#2161)
* [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>
2024-04-22 22:44:31 +00:00
2718ffc7a7 Fix elasticsearch test requirements file name (#2443)
Fixes #2442

Co-authored-by: Leighton Chen <lechen@microsoft.com>
2024-04-22 13:48:51 -05:00