1862 Commits

Author SHA1 Message Date
Grégoire Deveaux
78c948b15f feat: add support for capture_parameters to Psycopg2Instrumentor (#4212)
* feat: add support for capture_parameters to Psycopg2Instrumentor

* Update CHANGELOG.md

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-12 10:35:42 +00:00
Riccardo Magliocchetti
b35be0d73e Silence some pylint4 warnings (#4272)
* pylint: use unnecessary-dunder-call instead of E1101

Since pylint 4 now raises a different error code

* opentelemetry-instrumentation-sqlite3: fix pylint warnings

Possibly using variable 'root_span' before assignment (possibly-used-before-assignment)
Possibly using variable 'child_span' before assignment (possibly-used-before-assignment)

* opentelemetry-instrumentation-botocore: silence a bunch of pylint warnings

In the form of
Possibly using variable '<var>' before assignment (possibly-used-before-assignment)

* opentelemetry-instrumentation-redis: remove useless return spotted by pylint

* opentelemetry-instrumentation-fastapi: silence some pylint warnings

E0102: function already defined line 2034 (function-redefined)

* opentelemetry-instrumentation-google-genai: fix pylint warnings

Assisted by Cursor.

* opentelemetry-instrumentation-openai-v2: fix pylint 4 errors

Assisted by Cursor

* opentelemetry-instrumentation-elasticsearch: fix pylint 4 errors

Assisted by Cursor.

* opentelemetry-instrumentation-pika: fix pylint 4 errors

Assisted by cursor.

* opentelemetry-instrumentation-starlette: fix pylint 4 errors

* opentelemetry-instrumentation: fix pylint 4 errors

Assisted by Cursor.

* opentelemetry-util-http: fix pylint 4 errors
2026-03-12 10:07:32 +00:00
Riccardo Magliocchetti
6fae4c1187 tests requirements: Bump pluggy to 1.6.0 (#4319)
To silence some Python 3.14 warnings.
2026-03-12 10:18:50 +01:00
Riccardo Magliocchetti
f99d6d59a0 Remove boto instrumentation (#4303)
* Remove boto instrumentation

* Add changelog

* Run tox -e generate
2026-03-12 09:38:17 +01:00
Tobias Macey
7d42bd1130 Add support for wrapt 2.x (#4203)
* Add support for wrapt 2.x

- Update wrapt version constraint from '>=1.0.0, <2.0.0' to '>=1.0.0' in all affected packages
- Replace ObjectProxy with BaseObjectProxy where iteration support is not needed
- Add fallback import for wrapt 1.x compatibility (ObjectProxy as BaseObjectProxy)
- Keep ObjectProxy usage in classes that implement __iter__ (botocore, aiopg)
- Update CHANGELOG.md

This change maintains backward compatibility with wrapt 1.x while enabling
support for wrapt 2.x. BaseObjectProxy is the new base class in wrapt 2.x,
while ObjectProxy is now a subclass that adds __iter__() support.

Fixes #3903
Related to #3930 and #4082

* Restructure wrapt test requirements

- Remove wrapt from base test-requirements.txt (installed via pyproject.toml)
- Remove Deprecated from base test-requirements.txt (version conflicts with wrapt 2.x)
- Create test-requirements-wrapt1.txt with wrapt<2.0.0 and Deprecated==1.2.14
- Create test-requirements-wrapt2.txt with wrapt>=2.0.0 and Deprecated>=1.2.18
- Update tox.ini to use requirements files instead of factor-based deps
- Add Deprecated to lint environment deps

This follows the pattern used by other packages (botocore, httpx) and
resolves dependency conflicts where Deprecated 1.2.14 requires wrapt<2.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: Resolve conflicts and add Wrapt 3 as upper bound

* Add wrapt 1.x/2.x test matrix for all ObjectProxy-using instrumentations

Extend the wrapt1/wrapt2 test matrix to all instrumentations that use
wrapt.ObjectProxy or wrapt.BaseObjectProxy: botocore, dbapi, grpc, pika,
aiopg, httpx, and asyncpg.

Changes:
- tox.ini: Add {wrapt1,wrapt2} factor to envlist for all 7 packages;
  update deps to reference per-version test-requirements files
- botocore/pyproject.toml: Add missing wrapt dependency (>= 1.0.0, < 3.0.0)
- All base test-requirements files: Remove pinned wrapt== and Deprecated==
- New test-requirements-wrapt1.txt / test-requirements-wrapt2.txt files for
  each package (using Deprecated>=1.2.18 for wrapt2 to avoid conflict with
  Deprecated==1.2.14 which requires wrapt<2)
- Regenerate GitHub Actions workflows (including new test_3.yml due to
  expanded job count)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix CI failures: ruff formatting and lint wrapt version pin

- utils.py: reformat multi-condition if statement to satisfy ruff line
  length requirement (fixes generate/precommit CI jobs)
- tox.ini: pin wrapt>=1.0.0,<2.0.0 for lint envs of botocore, dbapi,
  grpc, and sio-pika; with wrapt 1.x removed from base test-requirements,
  lint envs were getting wrapt 2.x which caused pylint no-member errors
  on __wrapped__ (a C-extension attribute not visible to static analysis)
  Also add Deprecated==1.2.14 to same lint envs for consistency

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix remaining CI failures: unused imports and uv.lock

- dbapi/__init__.py: remove unused bare 'import wrapt' (F401); the
  compat shim imports BaseObjectProxy directly from wrapt
- grpc/_aio_server.py: remove unused 'import wrapt' (F401) and fix
  import ordering (I001) flagged by ruff pre-commit hook
- uv.lock: regenerate after adding wrapt dependency to botocore
  pyproject.toml

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix aiopg lint wrapt pin, uv.lock format, and ruff blank lines

- tox.ini: pin wrapt>=1.0.0,<2.0.0 + Deprecated==1.2.14 for
  lint-instrumentation-aiopg; aiopg source uses __wrapped__ heavily and
  pylint's no-member error appeared when wrapt 2.x was installed
- uv.lock: regenerate using pre-commit hook (uv v0.9.30) to fix
  trailing-slash format on registry URLs
- httpx/test_httpx_integration.py: add blank line before try/except
  block (ruff I001/E303 formatting fix)
- pika/utils.py: add blank line before try/except block (same ruff fix)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix pylint E0611: disable no-name-in-module for BaseObjectProxy compat shim

pylint with wrapt 1.x installed reports E0611 ('No name BaseObjectProxy
in module wrapt') when it sees the try/except ImportError compat shim,
even though the except branch provides a fallback. Add a per-line
pylint disable comment to suppress this false positive.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix asyncpg test: use BaseObjectProxy compat shim for wrapt 2.x

In wrapt 2.x, BoundFunctionWrapper no longer subclasses ObjectProxy
(it subclasses BaseObjectProxy instead). Update the test to use
the compat shim so isinstance checks pass with both wrapt 1.x and 2.x.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review comments: add wrapt 2.0.0+ comments and fix CHANGELOG

- Add '# wrapt 2.0.0+' comment above BaseObjectProxy import in all
  try/except compat shim blocks to clarify why the pattern is used
- Fix CHANGELOG.md PR link from #XXXX to #4203

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* chore: Update changelog and workflows

* Apply suggestions from code review

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* fix: Update workflows again

* Apply suggestions from code review

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Remove Deprecated version pins from test-requirements and tox.ini

Deprecated>=1.2.14 was pinned because Deprecated==1.2.14 requires
wrapt<2. Since pip automatically resolves compatible versions based
on the wrapt constraint in each test env, explicit Deprecated pins
are unnecessary. Remove them from all test-requirements-wrapt*.txt
files and from lint env deps in tox.ini.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove stale .orig file leftover from rebase

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Move lint env wrapt pins from tox.ini into test-requirements files

All dependencies should be managed via requirements.txt files rather
than inline in tox.ini. Move wrapt>=1.0.0,<2.0.0 pins for lint
environments into their respective test-requirements files:
- instrumentation-grpc/test-requirements-1.txt
- instrumentation-botocore/test-requirements-1.txt
- instrumentation-dbapi/test-requirements.txt
- instrumentation-aiopg/test-requirements.txt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Apply suggestions from code review

* Update instrumentation/opentelemetry-instrumentation-botocore/test-requirements-1.txt

* Update instrumentation/opentelemetry-instrumentation-grpc/test-requirements-1.txt

* Update instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt

* Update instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt

* Address latest PR feedback: botocore compat shim, exact wrapt versions, lint env refs

- botocore/bedrock_utils.py: apply BaseObjectProxy compat shim to
  ConverseStreamWrapper and InvokeModelWithResponseStreamWrapper (both
  classes define __iter__ so BaseObjectProxy is correct)
- All test-requirements-wrapt1.txt: pin wrapt==1.17.3 (exact version)
- All test-requirements-wrapt2.txt: pin wrapt==2.1.2 (exact version)
- tox.ini lint envs: switch to -wrapt2.txt files so lint runs with
  wrapt 2.x; remove wrapt pin from base test-requirements files
  (grpc/test-requirements-1.txt, botocore/test-requirements-1.txt,
  dbapi/test-requirements.txt, aiopg/test-requirements.txt)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: add pylint disable=no-member for __wrapped__ and abstract-method usages

Add pylint: disable=no-member to all class definitions and usages of
__wrapped__ that are invisible to pylint when using wrapt's C extension
proxy types (BaseObjectProxy/ObjectProxy).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-11 22:10:21 +01:00
Manuel Lang
82e72435d0 opentelemetry-instrumentation-confluent-kafka: Loosen confluent-kafka upper bound to <3.0.0 (#4289)
* opentelemetry-instrumentation-confluent-kafka: Add support for confluent-kafka 2.13.2

* chore: Losen confluent-kafka upper bound to <3.0.0

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-10 10:43:05 +00:00
Emídio Neto
d7a3b18760 fix fastapi tests failure with >= 0.118.0 (#4277)
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-06 10:48:51 +00:00
otelbot[bot]
9247085b30 Update version to 1.41.0.dev/0.62b0.dev (#4294)
* Update version to 1.41.0.dev/0.62b0.dev

* Apply suggestions from code review

---------

Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-04 15:05:55 +00:00
Riccardo Magliocchetti
489bca37c5 Move logger handlers to opentelemetry-instrumentation-logging (#4210)
* Move logging integrations into auto-instrumentation

* opentelemetry-instrumentation-logging: move the sdk logging handler here

And hook it up via entry point

* Add header and future annotations import

* Rename entry point group to opentelemetry_logging_integrations

* Consider setting up the LoggingHandler as a normal instrumentation

* Fix typo

* Add missing import

* Copy handler tests from core

* More work towards green tests

* Cleanup properly after loggingHandler tests

* Quite hard to expect a mock to setup the handler

* Call removehandler also on local loggers

No change in practice

* Fix wrong noop test

* Move to our own env var for controlling autoinstrumentation

* Copy handler benchmark from sdk

* Document the new environment variables

* Add changelog

* Please pylint

* Added warning about coexistence with sdk code

* Reword a bit

* Assert that the LoggingHandler has not been setup in uninstrumented test

* Add manual handling of auto instrumentation and code attributes logging

* Update instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py

* Apply suggestions from code review

Co-authored-by: Pablo Collins <pablo.collins@gmail.com>

* Apply more Pablo feedback

---------

Co-authored-by: Pablo Collins <pablo.collins@gmail.com>
2026-03-03 10:55:30 +01:00
Tammy Baylis
c907282d68 Fix psycopg2 (un)instrument_connection to use weakref, not mutate connection object (#4257)
* Fix psycopg2 (un)instrument_connection to use weakref, not mutate object

* Changelog

* conditional import for docs types

* Lint

* SImplify test

* Simplify

* Fix docs

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-03 08:35:29 +00:00
Sri Kaaviya
821e332d7e Fix falcon-instrumentation _handle_exception method to remove pylint disables (#4207)
* Fix falcon-instrumentation _handle_exception method to remove pylint disables

* Refactor _handle_exception method for Falcon 3

* try fix

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* Add CHANGELOG entry for falcon _handle_exception refactor (#4207)

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-02 11:27:24 +00:00
Ritesh Tripathi
4880e33217 fix(flask): align http.server.active_requests metric with semconv helper (#4094)
* fix(flask): correct HTTP metrics handling with semconv opt-in

* fix(flask): avoid hardcoded legacy http.server.duration metric name

* changelog: note flask http server metrics consistency fix

* fix(flask): use semconv constant for legacy http.server.duration metric

* Update instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py

* Update CHANGELOG.md

* fix(flask): explicitly split active requests metric by semconv mode

* fix(flask): align http.server.active_requests metric with semconv helper

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-02 11:24:07 +00:00
Sri Kaaviya
3fcabc3f41 asyncio: fix environment variables not appearing in docs (#4261)
* asyncio: fix environment variables not in docs

Fix the docstrings in environment_variables.py so they are correctly
picked up by Sphinx autodoc for Read the Docs.

Previously the docstrings were placed above the variable assignments,
which Sphinx cannot parse. Moved them below and added the
required '.. envvar::' directives, consistent with how other
packages (e.g. opentelemetry-instrumentation) document their
environment variables.

Fixes #4256

* Fix typo from 'determines' to 'determine'

* Apply suggestion from @xrmx

* asyncio: move environment_variables docs to __init__ module docstring for sphinx

* asyncio: keep envvar docs in environment_variables.py with module-level docstring

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-03-02 08:47:10 +00:00
Riccardo Magliocchetti
7e49db45ab confluent-kafka: add basic autoinstrumentation tests (#4266)
* confluent-kafka: test auto-instrumentation code path

* Add TODO to simpligy the instrumentation

* silence pylint

* Update __init__.py
2026-02-27 08:54:02 +00:00
Dinmukhamed Mailibay
8fec6b672e fix(threading): attribute error when run is called w/o start (#4246)
* fix(threading): attribute error when run is called w/o start

* update changelog

* don't initialize context on run, fix tests

* address styling comments

* remove no-op context attachment
2026-02-26 15:33:15 +00:00
Ritesh Tripathi
413c98e542 test(mysql): provide concrete DBAPI connection attributes in mocks (#4116)
* test(mysql): provide concrete DBAPI connection attributes in mocks

* test(mysql): pass concrete attributes via MagicMock helpers

* test(mysql): refactor mocks and remove redundant attribute assignments

* changelog: add mysql test mock fix entry

* test(mysql): refactor SQL commenter mocks into helper

* test(mysql): refactor SQL commenter mocks into helper

- Introduce make_mysql_commenter_mocks helper
- Remove duplicated MagicMock setup
- Preserve test assertions and behavior
- Improve readability and maintainability

* test(mysql): use concrete DBAPI connection attributes in mocks to fix attribute type warnings

* Update instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-02-20 12:32:59 +01:00
Emídio Neto
22e31a5571 Add python 3.14 support (#4193)
* try 3.14 in pyramid

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* see what's broken

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix pyramid

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix pyramid ci

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix sqlalchemy

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix httpx tests

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix pymssql

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix grpc tests

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix exporter-prometheus-write tests

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* try fastapi fix

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix django tests

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix aiopg

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix aiohttp-client

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix django

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix aiopg

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix httpx

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix fastapi

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix vertexai

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix workflows

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix openai-v2

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix contributing.md and lint to use py314

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix lint

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* Update tox.ini

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Update instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_run_coroutine_threadsafe.py

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

* Apply suggestion from @emdneto

* Apply suggestion from @emdneto

* Update tox.ini

* Update tox.ini

* fix lint

Signed-off-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* add changelog

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* add trove classifiers

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Signed-off-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2026-02-19 14:37:02 -05:00
Lukas Hering
1eca3e6b8e opentelemetry-instrumentation-aws-lambda: Fix aws lambda span creation (#3966)
* update invocation span to have kind SERVER and have name equal to the function name

* update Lambda invocation span name and kind

* add type checking check

* move changelog entry to 'Breaking changes'

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-02-16 10:45:09 +00:00
Andrea Mattè
d5aebefb51 cassandra: use _instruments_any instead of _instruments for driver deps (#4182)
* cassandra: use _instruments_any instead of _instruments for driver deps

The cassandra instrumentation listed both cassandra-driver and
scylla-driver in _instruments, which requires ALL listed packages to be
installed. Since users install one OR the other (they are alternative
drivers for the same API), this should use _instruments_any so that
having either driver installed is sufficient.

This follows the same pattern already used by psycopg2 and kafka-python
instrumentations, introduced in #3610.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix ci

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix uv.lock

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: emdneto <9735060+emdneto@users.noreply.github.com>
2026-02-13 12:31:13 +01:00
Antoine D
b8a80209d7 fix instrument of typed psycopg sql (#4171)
* fix instrument of typed psycopg sql

The instrumentation is not working when using [typed `SQL`](https://www.psycopg.org/psycopg3/docs/api/sql.html) from psycopg (only when using the `Composed` type, that is returned when the query is formated).

```python
from psycopg.sql import SQL
query = SQL("SELECT * FROM test")
```

This fixes it by checking the `Composable` base class instead of the more restricted `Composed`.

* add changelog

* fix tests for python 3.9

using an identifier requires a real connection, I just replaced it since we only want to test with a composed.

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-02-10 16:34:24 +00:00
Anuraag (Rag) Agrawal
16f7be0719 Add scope to metric assertions in more tests (#4165)
* Add scope to metric assertions in more tests

* More

* Lint

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-02-10 14:51:06 +00:00
Riccardo Magliocchetti
a64940861a requirements: stick with older setuptools for packages still using pkg_resources (#4187)
* requirements: stick with older setuptools for packages still using pkg_resources

* Set build constraints for cassandra driver
2026-02-10 15:22:57 +01:00
Emídio Neto
6ae0f47561 aiohttp-server: fix HTTP error inconsistencies (#4175)
* aiohttp-server: fix HTTP error inconsistencies

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix failing test

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* changelog and fix pylint

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* changelog and fix pylint

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-02-06 16:56:04 +00:00
Anuraag (Rag) Agrawal
24c7bbb562 asgi: use test_base helpers where possible and otherwise filter scope (#4122)
* asgi: use test_base helpers where possible and otherwise filter scope

* Pass scope
2026-02-04 16:28:37 +00:00
Anuraag (Rag) Agrawal
ef924e34e5 fastapi: use test_base to fetch metrics for assertions or filter locally (#4127)
* fastapi: use test_base to fetch metrics for assertions or filter locally

* Pass scope

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-02-04 16:23:46 +00:00
Anuraag (Rag) Agrawal
6a1a74f684 Pass scope to get_sorted_metrics (#4150)
* Pass scope to get_sorted_metrics

* Lint
2026-02-04 16:19:01 +00:00
Lukas Hering
262a09729b opentelemetry-instrumentation-urllib3: fix multiple arguments error (#4144)
* opentelemetry-instrumentation-urllib3: fix multiple arguments error

* update CHANGELOG.md
2026-01-28 16:45:05 +00:00
Riccardo Magliocchetti
d1a6c1dc45 aiohttp-server: pass request attributes at span creation (#4118)
* aiohttp-server: pass request attributes at span creation

To easy sampling work.

* Add changelog
2026-01-27 08:36:35 +00:00
Tammy Baylis
3b357c07a8 Add DB-API sqlcomment mysql_client_version fallback (#3729)
* Add dbapi comment mysql_client_version fallback

* Changelog

* Add docker test_mysql_sqlcommenter

* Update dbapi docker-tests

* Add test fetchall

* Add test case for cmysql unknown

* Change to patch

* Rm test attempt

* Changelog

* simplify commenter_data assn

* Add Pure Python mysql_client_version unknown test

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2026-01-26 16:55:01 +00:00
Lukas Hering
0b379bef8e feat: add unit tests for tortoiseorm (#4141)
* feat: add unit tests for tortoiseorm

* update CHANGELOG.md

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-26 16:44:46 +00:00
Gershon Papi
c1fe0169cc fix: confluent-kafka: fix incorrect number of arguments (#3922)
* confluent-kafka: fix incorrect number of arguments

* update confluent-kafka dep

* changelog

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-26 16:46:00 +01:00
Riccardo Magliocchetti
315043aca9 opentelemetry-instrumentation-falcon: pass request attributes at span creation (#4119)
* opentelemetry-instrumentation-falcon: pass request attributes at span creation

To ease sampling work.

* Add changelog
2026-01-26 11:03:58 +00:00
Riccardo Magliocchetti
6778776763 pyramid: pass request attributes at span creation (#4139)
* pyramid: pass request attributes at span creation

To ease sampling work.

* Add changelog
2026-01-26 11:00:00 +00:00
Riccardo Magliocchetti
9f0b7b5617 tornado: pass request attributes at span creation (#4140)
* tornado: pass request attributes at span creation

To ease sampling.

* Add changelog
2026-01-26 10:44:49 +00:00
Anuraag (Rag) Agrawal
5babfb2e97 aiohttp-server: migrate test telemetry management to test_base (#4121)
* aiohttp-server: migrate test telemetry management to test_base

* Lint

* Lint
2026-01-26 10:10:26 +00:00
Anuraag (Rag) Agrawal
ea03d20c4d urllib3: filter metrics for scope assertion (#4132)
* urllib3: filter metrics for scope assertion

* Update test_urllib3_metrics.py

* Update test_urllib3_metrics.py

* Update test_urllib3_metrics.py

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-23 15:57:19 +00:00
Anuraag (Rag) Agrawal
dcb3316f63 starlette: use test_base to fetch metrics for assertions or filter lo… (#4131)
* starlette: use test_base to fetch metrics for assertions or filter locally

* Update test_starlette_instrumentation.py

* Update test_starlette_instrumentation.py

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-23 15:36:13 +00:00
Anuraag (Rag) Agrawal
be799f48cd pyramid: use test_base to fetch metrics for assertions (#4129)
* pyramid: use test_base to fetch metrics for assertions

* Fix assertion

* Update instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-23 16:05:57 +01:00
Riccardo Magliocchetti
277b1a7b1c opentelemetry-instrumentation-logging: don't add out of spec attributes by default (#4112)
* opentelemetry-instrumentation-logging: don't add out of spec attributes by default

Add span context attributes to logging module LogRecord only if the instrumentation
has been configured to do so via set_logging_format argument or OTEL_PYTHON_LOG_CORRELATION
environment variable.

* Add changelog

* Update doc and cleanup tests

* Reduce diff

* Add missing test
2026-01-23 14:44:24 +00:00
Manuel Lang
95b52b50ff opentelemetry-instrumentation-confluent-kafka: Increase confluent-kafka upper bound to support newer versions (#4099)
* opentelemetry-instrumentation-confluent-kafka: Increase confluent-kafka upper bound to support newer versions

* Update CHANGELOG.md

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2026-01-23 12:38:07 +00:00
Anuraag (Rag) Agrawal
ac64750c53 django: use test_base to fetch metrics for assertions (#4126) 2026-01-23 12:06:39 +00:00
Anuraag (Rag) Agrawal
c07ceaecb0 falcon: use test_base to fetch metrics for assertions (#4125)
* falcon: use test_base to fetch metrics for assertions

* Formatting
2026-01-23 12:02:53 +00:00
Anuraag (Rag) Agrawal
fa598691d2 celery: use self helper to retrieve metrics for assertion (#4124)
* celery: use self helper to retrieve metrics for assertion

* Manual formatting
2026-01-23 11:59:53 +00:00
Anuraag (Rag) Agrawal
d163fb7aee requests: use test_base to fetch metrics for assertions (#4130) 2026-01-23 11:56:48 +00:00
Anuraag (Rag) Agrawal
269d9460bd wsgi: use test_base to fetch metrics for assertions (#4133) 2026-01-23 11:53:42 +00:00
Anuraag (Rag) Agrawal
98782d2df9 asyncio: use test_base helpers to get metrics (#4123)
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-23 11:49:38 +00:00
Anuraag (Rag) Agrawal
b960b38535 flask: use test_base to fetch metrics for assertions (#4128) 2026-01-23 11:45:37 +00:00
Tammy Baylis
0e7244b31f HTTP semantic convention stability migration for Tornado (#3993)
* Add Tornado http semconv opt-in

* lint

* Add test

* changelog

* lint

* Update CHANGELOG.md

* Update instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Update instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Add tornado semconv_status

* Simplify path check, record vars

* tornado sem_conv_opt_in_mode as attr and arg

* add Tornado set_http_url, set_http_user_agent

* Fix set_http_target call

* Sanitize for _set_http_target tornado

* Update instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-23 09:12:49 +00:00
Tammy Baylis
fc3a76b9d6 HTTP semantic convention stability migration for Pyramid (#3982)
* wip

* Fix opt-in mode set at init

* Add tests

* Changelog

* Style

* Update CHANGELOG.md

* pyramid semconv migration

* Revise test

* Add _set_http_url to Pyramid instr

* adjust test imports

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-23 09:04:46 +00:00
saurabh-saraswat
533ece6904 Remove span attributes pymemcache (#4076)
* opentelemetry-instrumentation-pymemcache: Remove usage of deprecated SpanAttributes

* Fixed linting issues

* Incorporated Review Comments for usage of NET_TRANSPORT

* Added back the empty lines

* Apply suggestions from code review

* Update __init__.py

* Update __init__.py

* Update test_pymemcache.py

* Executed tox

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-01-21 15:09:41 +01:00