1295 Commits

Author SHA1 Message Date
fd6b8f1647 Fix response hook (#2038)
Response hook receives a third parameter, Response, and that should be reflected in the _ResponseHook type

Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2024-03-15 14:07:40 +02:00
e923938646 Remove [test] package from starlette instrumentation (#2278)
Fixes #2221
2024-03-15 01:53:17 +00:00
e56cdc8fec Remove [test] package from pyramid instrumentation (#2273)
Fixes #2214
2024-03-14 19:29:18 -06:00
ba05c2c0c3 Remove [test] package from wsgi instrumentation (#2283)
Fixes #2227
2024-03-15 01:15:50 +00:00
ce2de1f5a9 Remove [test] package from falcon instrumentation (#2313)
Fixes #2200
2024-03-14 19:05:44 -06:00
5f68e9701b Remove [test] package for django instrumentation (#2311)
Fixes #2198
2024-03-15 00:54:12 +00:00
d948f21ad3 Remove [test] package from flask instrumentation (#2127)
Fixes #2126
2024-03-15 00:42:46 +00:00
5552db2adf Remove [test] package from asyncio instrumentation (#2248)
Fixes #2188
2024-03-14 18:32:23 -06:00
1bf9f429e4 Remove [test] package from asgi instrumentation (#2247)
Fixes #2187
2024-03-14 18:18:52 -06:00
2417c099a0 Remove [test] package from aio-pika instrumentation (#2244)
Fixes #2186
2024-03-15 00:07:12 +00:00
c54a9d1ad2 Remove [test] package from aiopg instrumentation (#2243)
Fixes #2185
2024-03-14 17:57:38 -06:00
717d10760a feat: add importlib metadata default on flask module (#2302)
* feat: add importlib metadata default

* feat: add importlib metadata default

* feat: add importlib metadata default

* Fix lint

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-03-14 15:56:32 -06:00
3273d8c39f Fix asyncio related warnings in tests (#2335)
* aiopg: fix runtime warnings when running tests

Fixes:
RuntimeWarning: coroutine 'MockCursor.execute' was never awaited
    cursor.execute(query)

* aio-pika: no need to return an awaitable in mocked method

No need to return an awaitable since the mocked method awaits
itself.
Fixes:
    RuntimeWarning: coroutine 'sleep' was never awaited

---------

Co-authored-by: Leighton Chen <lechen@microsoft.com>
2024-03-14 13:27:18 -06:00
aa8ae2efe3 Celery duplicated instrumentation (#2342)
* * Adding (failing) testcase to cover Issue #2029

* * move Instance variables to class variables. Since the object in question will be a singelton. This will resolve #2029 where multiple calls to the instrumentation will assign Null values.

* * black formatting

* * Changelog stub entry, PR # to follow

* * updating the pullrequest number

* * remove superfluous constructor

* * moving Change log to unreleased section

---------

Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2024-03-14 10:50:04 +02:00
cb5a07c765 Update README.rst (#2111)
Co-authored-by: Leighton Chen <lechen@microsoft.com>
2024-03-13 14:05:31 +02:00
565e78de2c Fix OpenTelemetry Aio-pika instrumentation link (#2259) 2024-03-07 11:56:04 -08:00
2e746198bf Align gRPC server span status codes to OTEL specs (#2019) 2024-03-07 09:33:28 -08:00
8daa8ad481 Add instrumentation for Psycopg 3.x (#2123)
* Add instrumentation for Psycopg 3.x

* Add federicobond to component_owners.yml
2024-02-24 19:35:25 +00:00
d2d4561593 Update version to 1.24.0.dev/0.45b0.dev (#2262) 2024-02-23 10:13:21 -08:00
565d2e33f4 Remove werkzeug from Flask instrumentation dependencies (#2257)
Fixes #2256
2024-02-22 17:34:53 -06:00
efb327d4d7 AwsLambdaInstrumentor handles and re-raises handler function exception (#2245) 2024-02-22 09:16:34 -08:00
2518a4ac07 Drop obsolete parameterized test dependency (#2134)
In the test dependencies for `opentelemetry-instrumentation-falcon`,
don’t depend on `parametrized` because `pytest.mark.parametrize` is now
included in `pytest`.
2024-02-14 22:21:14 -06:00
b6492a7999 Feature/asyncio instrumentation (#1943)
* add asyncio instrumentation

* add asyncio instrumentation

* modify test configure

* modify test configure

* modify tox generate result

* modify tox generate result

* add python version check

* modify test code

* add CHANGELOG.md

* add docs

* modify pyproject.toml

* modify pyproject.toml

* Add comments mentioned in an issue #1919

* Add comments mentioned in an issue #1919

* add asyncio component owner

* - Add instrumentation-asyncio metric.
- Configure coroutines/to_thread func to apply trace via environment variables.
- Apply trace to future using a boolean environment variable.

* modify docs

* modify docs

* modify docs

* modify docs

* modify docs

* modify test_code

* modify test_code

* modify test_code

* modify asyncio version

* modify asyncio version

* update dependency

* modified lint results

* modified lint results

* modified lint results

* modified lint results

* modified lint results

* modified lint results

* modified lint results

* include feedback

* include feedback

* include feedback

* modify docs test results

* Update instrumentation/opentelemetry-instrumentation-asyncio/README.rst

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update instrumentation/opentelemetry-instrumentation-asyncio/README.rst

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update instrumentation/opentelemetry-instrumentation-asyncio/README.rst

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update instrumentation/opentelemetry-instrumentation-asyncio/README.rst

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/utils.py

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/utils.py

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* include feedback

* include feedback

* drop python 3.7 support

* drop python 3.7 support

* Removed from default_instrumentations

* Recover

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2024-02-14 15:44:17 -06:00
1a984d3ba1 Upgrade tox (#2118)
* Upgrade tox

* fixup! Upgrade tox

* Add excludes

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-02-13 22:33:14 -06:00
03fcc1742d Remove references to 3.7 (#2172)
Fixes #2171
2024-02-13 12:55:45 -06:00
d167ef7b43 Fix celery and urllib tests (#2170)
* Update core SHA

Fixes #2173

* Fix celery and urllib tests

Fixes #2164
2024-02-12 17:54:32 -06:00
47caeab7af Stop multiple calls to AsyncPGInstrumentor.__init__ from clobbering instance attributes (#1791)
* Stop multiple calls to AsyncPGInstrumentor.__init__ from clobbering instance tracer attribute

* Remove class-level initialisation of _tracer

* Fix regex

* Add to changelog

* Fix lint errors

* Update CHANGELOG.md

Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>

* Set tracer in class definition to avoid lint error

---------

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2024-02-05 13:55:24 +02:00
13ce910f14 Fix link to OpenTelemetry kafka-python Instrumentation (#2147)
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2024-02-04 09:26:49 +00:00
6c13a5eddc Drop support for 3.7 (#2152)
* Drop support for 3.7

Fixes #2151

* Remove 37
2024-02-03 11:57:08 -06:00
c68d0fd192 Add support for confluent_kafka until 2.3.0 version; (#2132)
* Updated version of supported confluent kafka to 2.3;

* Updated CHANGELOG.md;

---------
2024-01-30 22:48:45 -06:00
3400ecea5d Remove useless shebangs (#2135)
These files do not have the executable bit set in their filesystem
permissions (so the shebang line, `#!`, is useless), and they are not
script-like (do not have `if __name__ == "__main__"` or interesting
side-effects), so making them executable would not make sense.
2024-01-30 22:24:33 -06:00
4b1a9c75db feat: configure header extraction for ASGI middleware via constructor params (#2026)
* feat: configure header extraction for ASGI middleware via constructor params

* fix django middleware

* lint

* remove import

* Fix lint

* Update instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
2024-01-30 21:11:00 -06:00
c9d709a5c4 Feature/support for flask 3.0.0 (#2013)
* support flask 3.0.0

* support flask 3.0.0

* support flask 3.0.0

* modify tox.ini

* modify Werkzeug version

* modify Werkzeug version

* modify flask test version

* modify flask version

* modify flask version

* modify CHANGELOG.md

* include feedback

* include feedback

* Fix lint and generate

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-01-16 15:45:12 -06:00
9563ee73ac Clean up use of suppress_instrumentation in context and fix httpx bug (#2061)
* Clean up use of suppress_instrumentation in context and fix httpx bug

* Clean up use of suppress_instrumentation in context and fix httpx bug

* changelog

* fix tests

* fix import

* fmt

* update dep

* lint

* remove unused imports

* apply lint

* Fix version for pika

* Fix lint

---------
2023-12-22 22:43:12 +00:00
e5aa74ff7f Remove URL credentials (httpx integration) (#2020)
* Remove URL credentials (httpx)

* Add CHANGELOG
2023-12-22 22:03:51 +00:00
d7cc194609 FlaskInstrumentation doesn't exist (#2070)
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-12-22 21:23:38 +00:00
772063ca8a Update version to 1.23.0.dev/0.44b0.dev (#2091)
* Update version to 1.23.0.dev/0.44b0.dev

* Update core SHA

* Update generate

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2023-12-15 16:54:11 -06:00
b6c11054b9 Fix Falcon dependency (#2090)
Fixes #2089
2023-12-13 20:58:54 -06:00
4bf3577fb7 Requests instrumentation http semantic convention migration (#2002) 2023-11-29 14:22:16 -08:00
4336dc7330 Fix arity of context.abort for AIO RPCs (#2066) 2023-11-28 10:38:59 -08:00
b29682b561 aio-pika instrumentation: Removed check for non-sampled span when inject message header. (#1969)
* aio-pika instrumentation: Removed check for non-sampled span when inject message headers. Reason to change is that sampled flag can be propagate https://www.w3.org/TR/trace-context/#sampled-flag and be useful when trace is not sampled.

* black formting

---------

Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-11-27 14:22:34 +00:00
1b1c38d7cd [opentelemetry-instrumentation-httpx] fix mixing of sync and non async hooks (#1920)
* fix: sync response hooks being used on httpx.AsyncClient

* docs: add changelog

* docs: improved docs a bit more

* docs: fix variable name

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-11-21 15:45:15 +02:00
5888d4ef95 Enable lint on CI and update deps (#2067)
* Fix black an isort

* change bootstrap_gen to use a list instead of dict

* Bunch of updates

* Fix build

* fix lint

* Fix docs

* Fix lint

* More fixes

* Fix lint

* fix stupid mistake

---------

Co-authored-by: Christian Hartung <christian.hartung@olist.com>
2023-11-21 10:25:11 +02:00
9afaf26b3a urllib/urllib3 - set metric descriptions per semantic conventions (#1959)
* Set metric descriptions per semantic conventions

* Set metric descriptions per semantic conventions

* fix spelling

---------

Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-11-19 08:20:41 +02:00
f34771618c Don't collect system.network.connections due to limitation in psutil causing exceptions (#2008)
* Don't collect system.network.connections due to limitation in psutil causing exceptions

* add changelog

---------

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-11-17 08:54:56 +00:00
6f6c28da45 Added support for pypy3 system metrics (#2062)
* Added support for pypy3 system metrics

Co-authored-by: Suryanarayana Peri <suryanarayana.peri@fmr.com>
Signed-off-by: Rahul Kumar <Rahul.Kumar@fmr.com>

* Change in if condition to log warn message for pypy
Co-authored-by: Suryanarayana Peri <suryanarayana.peri@fmr.com>

Signed-off-by: Rahul Kumar <Rahul.Kumar@fmr.com>

* Added logger to else block if pypy
Co-authored-by: Suryanarayana Peri <suryanarayana.peri@fmr.com>

Signed-off-by: Rahul Kumar <Rahul.Kumar@fmr.com>

* Reverting the changes
Co-authored-by: Suryanarayana Peri <suryanarayana.peri@fmr.com>

Signed-off-by: Rahul Kumar <Rahul.Kumar@fmr.com>

* Changes requested by external reviewer
Co-authored-by: Suryanarayana Peri <suryanarayana.peri@fmr.com>

Signed-off-by: Rahul Kumar <Rahul.Kumar@fmr.com>

---------

Signed-off-by: Rahul Kumar <Rahul.Kumar@fmr.com>
Co-authored-by: Suryanarayana Peri <suryanarayana.peri@fmr.com>
2023-11-16 13:18:51 -06:00
1e1162c250 Fix error in build for README in Cassandra instrumentation (#2045) 2023-11-09 22:42:26 +00:00
c2f3894002 Fix contrib build (#2054) 2023-11-09 14:07:24 -08:00
46fc3ce638 Exclude background task execution from root server span in ASGI middleware (#1952) 2023-11-08 18:46:01 +00:00
3b9d6264e2 Update version to 1.22.0.dev/0.43b0.dev (#2031)
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2023-11-07 11:06:08 -06:00