1997 Commits

Author SHA1 Message Date
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
fdcbbddb6c Azure resource detector 0.1.4 (#2394) 2024-04-05 10:26:36 -07:00
85ca0a6b80 Change meta data service timeout to 200ms (#2387) 2024-04-05 09:47:10 -07:00
805c72ceff rename type to asgi.event.type in ASGI instrumentation (#2300) 2024-04-04 17:10:30 +00:00
955b483f7a Remove context manager check (#2391) 2024-04-03 18:44:09 -05:00
24eadcf63d Update version to 1.25.0.dev/0.46b0.dev (#2376) 2024-03-28 14:25:18 -07:00
37aba928d4 Add cloud.account.id attribute by AwsLambdaInstrumentor (#2367)
* Add cloud.account.id attribute by AwsLambdaInstrumentor

* Changelog

* Update test

* lint
2024-03-22 17:46:10 -06:00
d06de3f9f1 regression-fix: retain httpx.URL type on request.url (#2359)
* 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>
2024-03-22 17:15:51 -06:00
ca082a7c52 elasticsearch: don't set body as db statement for bulk requests (#2355)
* 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>
2024-03-22 16:56:29 -06:00
ada27842bd Remove [test] package from pika instrumentation (#2306)
Fixes #2209
2024-03-21 23:31:47 -06:00
96655cefbc Remove [test] package from _template (#2329)
Fixes #2328
2024-03-22 05:06:44 +00:00
86a552ecc8 Remove [test] package from boto3sqs instrumentation (#2252)
Fixes #2192
2024-03-22 04:39:20 +00:00
26479c8a34 Remove [test] package from pymysql instrumentation (#2272)
Fixes #2272
2024-03-22 04:21:36 +00:00
4360b5f6e8 Remove [test] package from confluent-kafka instrumentation (#2287)
Fixes #2196
2024-03-21 21:55:43 -06:00
c8889d7211 Remove [test] package from tortoiseorm instrumentation (#2281)
Fixes #2224
2024-03-21 21:39:57 -06:00
0e66ef6e20 Remove [test] package from system-metrics instrumentation (#2279)
Fixes #2222
2024-03-21 21:25:18 -06:00
9cf995c62e Remove [test] package from sqlite3 instrumentation (#2277)
Fixes #2220
2024-03-21 20:53:30 -06:00
35cb8c5254 Remove [test] package from distro (#2325)
Fixes #2237
2024-03-22 01:59:31 +00:00
4bb095e961 Remove [test] package from opentelemetry-instrumentation (#2327)
Fixes #2235
2024-03-21 19:31:51 -06:00
24c1ccabc5 Remove [test] package from sdk-extension-aws (#2324)
Fixes #2234
2024-03-21 19:16:41 -06:00
bc734282b9 Remove [test] package from exporter-prometheus-remote-write (#2323)
Fixes #2233
2024-03-21 18:01:24 -06:00
69fbfd6080 Remove [test] package from exporter-richconsole (#2322)
Fixes #2232
2024-03-21 17:45:12 -06:00