2018 Commits

Author SHA1 Message Date
c1a51fde96 Pre Python 3.12 enablement fixes (#2529) 2024-05-24 10:57:29 -07:00
78285a5795 Pin codespell version to fix builds (#2550) 2024-05-24 10:49:18 -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
c28f9b837f Update functions detector readme (#2533) 2024-05-22 10:45:10 -07:00
f4f3042f85 fix(async-io): check for __name__ atribute when tracing coroutine (#2521) 2024-05-21 21:48:54 -07:00
f8758c6902 Implement functions resource detector (#2523)
* Update .pylintrc

* fn

* Update CHANGELOG.md

* commments

* Add deployment.environment to functions detector

* Revert "Add deployment.environment to functions detector"

This reverts commit 5411759711b8bc9976705deb416d5ffd8f65590f.

* Remove deployment.environment from readme

* Release 0.1.5

---------

Co-authored-by: jeremydvoss <jerevoss@gmail.com>
2024-05-16 15:05:21 -06: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
d0500c2f8a Add error handling to opentelemetry-bootstrap -a (#2517)
* Revert "Refactor bootstrap generation (#2101)"

This reverts commit 1ee7261ea7117fbd22e2262e488402213a874125.

* Add error handling to opentelemetry-bootstrap -a

Fixes #2516

---------

Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com>
2024-05-14 15:26:31 -05: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
46d2ce6ace Reinstate tox -e lint (#2482) 2024-05-10 09:51:32 -07:00
eabceff062 Bump jinja2 from 3.1.3 to 3.1.4 (#2503)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-05-09 13:53:12 -05: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
0a231e57f9 Update README.rst (#2499)
* Update README.rst

Fix README hyperlink syntax.

* updated README
2024-05-06 11:51:39 -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
1ee7261ea7 Refactor bootstrap generation (#2101)
* 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
2024-05-02 18:05:49 -05:00
2a174b2543 CONTRIBUTING: introduce pre-commit (#2479) 2024-05-02 10:11:02 -07:00
5116305f77 Separate lint into several jobs (#2467)
* 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
2024-04-30 09:05:49 -05:00
de7ce0fb22 Use local imports when importing from tests (#2464) 2024-04-29 11:49:08 -07:00
2493258af1 Ignore vm detector if already in other rps for azure resource detector (#2456) 2024-04-29 10:53:01 -07:00
58f3d87b78 gen-requirements: Bump jinja to latest one (#2463) 2024-04-29 10:35:04 -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
bd4a22a0d9 Remove unnecessary package installations (#2424)
* Remove unnecessary dependency installations

Fixes #2423

* Fix tox.ini merge conflicts
2024-04-25 16:23:22 -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
5375acf534 new(opentelemetry-processor-baggage): add new component (#2436)
* new(opentelemetry-processor-baggage): add new component

Fixes #2428

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* add tests

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* update changelog

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* update component owners

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* lint

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* update license

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* fix lint

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* lint

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* rename processors dir to processor

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-04-25 10:25:34 -05:00
a0c3211c4f Bump black to 24.3.0 (#2452) 2024-04-23 08:45:48 -07:00
1cd8ccb28a CHANGELOG: deduplicate unreleased entries (#2451) 2024-04-23 08:15:22 -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
4e90498bf3 Update action versions (#2441)
Fixes #2440

Co-authored-by: Leighton Chen <lechen@microsoft.com>
2024-04-22 15:34:27 -05: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
7f4853ac79 fix: revert modifications to Apache license (#2429)
* fix: revert modifications to Apache license

See open-telemetry/community#2056 for background

* path all LICENSE files

Signed-off-by: svrnm <neumanns@cisco.com>

* Fix missing LICENSE files

---------

Signed-off-by: svrnm <neumanns@cisco.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-04-22 13:23:38 -05:00
ad06e7043c feat(pika): adding support for channel.consume instrumentation (#2397)
* 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
2024-04-21 14:11:39 +03:00
2317adcc34 HTTP transition for wsgi (#2425) 2024-04-19 10:59:05 -07:00
7656bdb8fe fix(grpc): aio grpc client interceptor incorrect metadata handling (#2363) 2024-04-18 11:33:42 -07:00
4de0e5659d elasticsearch: stop testing on ancient versions (#2422)
Pick 6.0 as the baseline.
2024-04-18 08:57:26 -05:00
9ce1c26d27 django: Bump django version to latest (#2427) 2024-04-17 11:19:34 -07:00
ab50a4e151 tox: stop testing on python < 3.8 (#2414) 2024-04-17 10:08:18 -07:00
82b07959a9 fix: instrumentation-celery test tasks CustomError (#2416)
* fix: instrumentation-celery test tasks CustomError

* chore: lint

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-04-17 11:48:09 -05:00
07318bd378 Change AwsLambdaInstrumentor span attrs to meet faas semconv (#2372) 2024-04-17 09:09:55 -07:00
99678ccd3a Add section for semantic convention status for instrumentations (#2433) 2024-04-16 14:04:17 -07:00
8322ee790e Fix all issues from shellcheck --severity=warning (#2354) 2024-04-16 09:36:37 -07:00
e84bfff6cf readthedocs: update build os config (#2389) 2024-04-15 09:26:57 -07:00
a5c48871fa feat: add opentelemetry-instrumentation-threading library (#2253)
* 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>
2024-04-11 11:57:19 -05:00
804a9090a1 Add AWS resource detector entry points (#2382) 2024-04-10 10:05:38 -07:00
fdb2e141d4 Update contrib repo approvers list (#2395) 2024-04-09 10:49:26 -07:00