Commit Graph

2819 Commits

Author SHA1 Message Date
Aaron Abbott
87b20abdca Fix version of dependents of util-genai for release (#4230)
I missed a few more when making https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4224
2026-02-20 10:06:16 +01:00
Teja
a025a206da Anthropic agents boilerplate (#4179)
* Add initial implementation of Anthropic Agents instrumentation

- Introduced `opentelemetry-instrumentation-anthropic-agents` package for tracing LLM requests using the Anthropic Python SDK.
- Added support for capturing request and response attributes in accordance with GenAI semantic conventions.
- Included examples for both manual and zero-code instrumentation.
- Created a CHANGELOG.md to document notable changes.
- Added LICENSE and README files for package details and usage instructions.

This commit lays the groundwork for enhanced observability in applications utilizing Anthropic's capabilities.

* Enhance instrumentation for Anthropic Agents

- Added support for the `opentelemetry-instrumentation-anthropic-agents` package, enabling tracing of requests made through the Claude Agent SDK.
- Updated `pyproject.toml` and `tox.ini` to include new test environments and dependencies for the Anthropic Agents instrumentation.
- Modified GitHub workflows to incorporate linting and testing for the new instrumentation.
- Improved documentation in README files and examples to reflect changes in usage and setup.
- Introduced new examples demonstrating both manual and zero-code instrumentation approaches.

This commit strengthens observability for applications utilizing Claude Agents, ensuring comprehensive tracing and logging capabilities.

* Remove outdated entries from CHANGELOG.md for Anthropic Agents instrumentation, streamlining the document to reflect current features and improvements.

* Update Anthropic Agents instrumentation to use Claude Agent SDK

- Changed dependency from `anthropic >= 0.16.0` to `claude-agent-sdk >= 0.1.14` in `README.md`, `pyproject.toml`, and related files.
- Refactored `AnthropicAgentsInstrumentor` to align with the new SDK, including updates to initialization and logging.
- Removed unused utility functions and cleaned up test configurations to reflect the new dependency.
- Updated tests to ensure compatibility with the Claude Agent SDK.

This commit enhances the instrumentation for applications using the Claude Agent SDK, ensuring accurate tracing and logging capabilities.

* Update Python version requirements and clean up workflows for Anthropic Agents instrumentation

- Updated `tox.ini` and `pyproject.toml` to require Python 3.10 or higher, removing support for Python 3.9.
- Cleaned up GitHub workflows by removing outdated test jobs for Python 3.9 and adding new jobs for Python 3.10.
- Updated `README.md` to reflect the new dependency on `claude-agent-sdk` and removed references to the old SDK.
- Made minor code cleanups in example scripts and test files to improve readability.

These changes ensure compatibility with the latest Python versions and streamline the testing process for the Anthropic Agents instrumentation.

* Add Anirudha as a component owner for Anthropic instrumentation.

* fixing precommit errors.

* Update version comment in `version.py` to indicate future stable release

* Refactor imports in `__init__.py` for Anthropic Agents instrumentation.

* regenerate uv.lock file.

* Update uv.lock to standardize package source URLs with trailing slashes

* Rename instrumentation for Anthropic Agents to Claude Agent SDK, updating references in configuration files, workflows, and documentation. Add new files for the Claude Agent SDK instrumentation, including README, examples, and changelog. Ensure proper setup for testing and linting in CI/CD workflows.

* Update release documentation and workflows to include new instrumentation for Anthropic and Claude Agent SDK.

* Add Mike Goldsmith as a component owner for Anthropic and Claude Agent SDK instrumentation

* Revert "Merge remote-tracking branch 'upstream/main' into feat/anthropic-agents-boilerplate"

This reverts commit 7ed01ecb2d, reversing
changes made to 7e83cd7d74.

* Reapply "Merge remote-tracking branch 'upstream/main' into feat/anthropic-agents-boilerplate"

This reverts commit 7714e3c544.

* Update Python version in workflows and adjust dependencies in uv.lock.

* Fix source URLs in uv.lock to ensure proper registry formatting.
2026-02-19 20:57:06 -05:00
Aaron Abbott
f189a1f56d Prepare anthropic and google-genai for util-genai release (#4224) 2026-02-19 18:20:35 -05:00
Ridhima Satam
e8fdc53e79 Add log and metrics provider to langchain (#4214)
* Added log and metrics provider to langchain

* updated changelog

* added line

* deleted handler

* removed multiple cassettes

* fixed ruff

* fixed spellcheck
2026-02-19 17:23:41 -05:00
Wiktoria Walczak
8c3cc8539f Align gen_ai.tool_definitions with JSON Schema and add it to completion hook (#4181)
* add gen_ai.tool_definitions to completion hook

* hash tool defintions

* Update CHANGELOG

* make tool.defintions optional in on_completion

* fix lint errors

* add gen_ai.tool_definitions to completion hook

* hash tool defintions

* fix CompetionHook docstring

* fix lint test

* add gen_ai.tool_definitions to completion hook

* hash tool defintions

* Update CHANGELOG

* align tool.defintions with JSON schema

* fix tests

* fix ruff

* fix unexpected indent

* use local changes from util/opentelemetry-util-genai

* fix ruff

* add gen_ai.tool_definitions to completion hook

* re-add changes lost during merge

* put tool.defintions in the telemetry by default and the params behind the flag

* fix: Too many local variables

* address comments

* Add comments to udpate of util-genai version after release

---------

Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2026-02-19 15:17:40 -05: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
Minghui Zhang
93bea2dde7 opentelemetry-util-genai: add support for emitting inference events and enrich message types (#3994)
* Add support for emitting inference events and enrich message types

Change-Id: I8fd0b896fc103a986f78c7351ce627611e545a62
Co-developed-by: Cursor <noreply@cursor.com>

* Add change log

Change-Id: I5c4c93613e3e1084245b7298955a08cbc7c9708d
Co-developed-by: Cursor <noreply@cursor.com>

* Fix unit tests

Change-Id: If34cfce0e7eb130db6a1e8e30a5f4be7c215285f
Co-developed-by: Cursor <noreply@cursor.com>

* Fix linting failure

Change-Id: I847f75259e01729db88129a44b241afb0ea2aca4
Co-developed-by: Cursor <noreply@cursor.com>

* Fix readme

Change-Id: I818a042d275d3c8e3348647d73e34560e7d92f54
Co-developed-by: Cursor <noreply@cursor.com>

* Format codes

Change-Id: I40b8e01bbe4fa9c182e99085a7c71d4536042247
Co-developed-by: Cursor <noreply@cursor.com>

* Fix missing trace context in events

Change-Id: Ie07c495002143fb2f0cf88033206290eb85386ad
Co-developed-by: Cursor <noreply@cursor.com>

* feedback

Change-Id: Ida0c2305d950d978c31eb04a80e21e947fabdfba
Co-developed-by: Cursor <noreply@cursor.com>

* fix type check

Change-Id: I1da48b52b76042a9efd124057681f579cc93fb6e
Co-developed-by: Cursor <noreply@cursor.com>

* Fix the span name of LLM invocations

Change-Id: I1b9f40e5576e699b1f61fa3d7e7790ee4b1448a5
Co-developed-by: Cursor <noreply@cursor.com>

* Fix span name

Change-Id: I7adf6fc9cf0bcbed3927862ff87d441bb2a1f78b
Co-developed-by: Cursor <noreply@cursor.com>

* Fix operation name of llm span

Change-Id: I4a6f48d0f66b8ad00a6ce4be8dcf4a46aba68e33
Co-developed-by: Cursor <noreply@cursor.com>

* Adjust event emission switches to optimize the integration experience

Change-Id: Ied7182fe2f3493a1eba96d7eaae5fd1b790c16e7
Co-developed-by: Cursor <noreply@cursor.com>

* Resolve conflicts

Change-Id: I95472013fe59b2b7a7448bb4374fe103021ec8a1
Co-developed-by: Cursor <noreply@cursor.com>

* Fix lint error

Change-Id: I78008c9b812d81a705eb7e7c75bd622b47d9da5a
Co-developed-by: Cursor <noreply@cursor.com>

* Refactor span_utils.py to streamline attribute collection

Change-Id: I243cc757454c085818d621011435076bf501108d
Co-developed-by: Cursor <noreply@cursor.com>

* Fix the lint error

Change-Id: If8bfaf1fde5594f7918c195243db9ec83f156156
Co-developed-by: Cursor <noreply@cursor.com>

---------

Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2026-02-10 12:16:29 -05: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
Emídio Neto
36aa71b21c Add pypi.org as explicit default index for uv in pre-commit (#4167)
* Add pypi.org as explicit default index for uv

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

* try modifying uv.lock pointing to artifact registry -- ci should fail

* try uv lock before

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

* try wrong uv.lock

* test

* test

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

* final test with wrong uv.lock -- precommit job should fail again

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

* fix uv.lock -- ci should pass

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

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
2026-02-10 16:27:56 +00:00
Nagkumar Arkalgud
1e92f1ab0c fix(openai-v2): Add __getattr__ to StreamWrapper to proxy unknown attributes (#4184)
StreamWrapper did not proxy unknown attributes like .headers to the
underlying stream, causing AttributeError when using
with_raw_response.create(stream=True).

Add __getattr__ to delegate attribute lookups to self.stream.

Fixes #4113

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2026-02-10 16:23:01 +00:00
Riccardo Magliocchetti
f64f04fe1a Add Lukas Hering as contrib approver (#4174) 2026-02-10 16:19:29 +00:00
Emídio Neto
5d09f06cf6 openai-v2(ci): reduce CI testing time by installing numpy manually (#4176)
* install numpy manually

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

* try numpy~=2.0

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

* fix

Signed-off-by: Emídio Neto <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>
2026-02-10 17:13:27 +01: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
Ridhima Satam
e381a36718 Switched langchain llm callbacks to use genai utils handler (#3889)
* Removed telemetry from inference callbacks and added calls to genai utils apis instead.

* Fixed errors

* Fixed typecheck errors

* Fixed typecheck errors

* Fixed precommit errors

* added util dependancy

* updated invocation manager

* removed unnecessary dependancies

* fixed precommit

* fixed typecheck

* fixed precommit

* fixed test

* removed unnecessary line

* addressed comments

* fixed errors

* fixed precommit

* removed get_property_value method

* fixed format

* Make tox -e typecheck install langchain, and fixed some of the type
errors. The remaining ones seem like real issues that need to be fixed.

* Please fix reportPossiblyUnboundVariable

* fixed typecheck

* added and updated tests

* Fixed conflicts and removed unnecessary changes

* Fixed precommit

---------

Co-authored-by: aaronabbott <aaronabbott@google.com>
2026-02-06 09:55:32 -05:00
Wiktoria Walczak
e01a4c195d Fix changelog from #4142 (#4170) 2026-02-05 11:34:00 -05:00
Emídio Neto
8c84a3dfd2 fiv ux lock to use pythonhosted.org (#4164) 2026-02-05 09:44:12 +01:00
Wiktoria Walczak
b162ac1572 opentelementry-instrumentation-google-genai: add gen_ai.tool.definitions to experimental semconv (#4142)
* opentelementry-instrumentation-google-genai: add gen_ai.tool.definitions to experimental semconv

* Add _to_tool_definition

* Remove unused import

* Add GEN_AI_TOOL_DEFINITIONS to tests.

* Remove uneccesary space.

* address comments: add exclude_none to model_dump and tool type to error message

* address comment: add if/else statement on tool types and add tests for each tool

* dont serilize mcp client sessions in case of synchronous methods

* Refactor _to_tool_definition_common to be more clear

* remove uncessary 'function' key

* fix failing tests: make mcp import conditional

* Update changelog

* Update uv.lock

* address comment: remove undecessary typing.Type

* address comment: make mcp import conditional
2026-02-04 15:19:02 -05: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
DylanRussell
1f64f15d07 Fix bug in how tokens are counted when streaming generateContent method is called. (#4152)
* Fix token count bug

* Add changelog

* Fix changelog
2026-02-02 15:35:55 -05: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
otelbot[bot]
626f44bfb3 Update opentelemetry-instrumentation-google-genai version to v0.7b0 (#4147)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2026-01-27 17:12:50 -05: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
Michał Wiatrowski
5429c6c973 feat: propagate custom genai generate_content attributes to logs, in addition to spans (#4103)
* feat propagate custom genai generate_content attributes to logs in addition to spans

* Put the extra attributes on logs that follow the old semanting convention as well

* Use dict[str, AttributeValue] instead of dict[str, Any]

* Revert "Put the extra attributes on logs that follow the old semanting convention as well"

This reverts commit 72a5c99cad.

* Update CHANGELOG.md

* Fix lint

---------

Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2026-01-23 11:24:25 -05: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
Liudmila Molkova
e3e7e0ce90 GenAI utils: Add server address, port and additional metric attributes to LLM invocation (#4069)
* Add server address, port and additional metric attributes to LLM invocation

* changelog

* harden tests

* lint

* review

* up

* comments
2026-01-23 12:23:09 +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