Skip to content

Commit 19f9e88

Browse files
authored
Merge branch 'main' into instrumentation-niquests
2 parents 4946427 + d83761f commit 19f9e88

11 files changed

Lines changed: 35 additions & 25 deletions

File tree

instrumentation-genai/opentelemetry-instrumentation-anthropic/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Fix compatibility with wrapt 2.x by using positional arguments in `wrap_function_wrapper()` calls
11+
([#4445](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4445))
12+
1013
### Added
1114

1215
- Add async Anthropic message stream wrappers and manager wrappers, with wrapper

instrumentation-genai/opentelemetry-instrumentation-anthropic/src/opentelemetry/instrumentation/anthropic/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ def _instrument(self, **kwargs: Any) -> None:
101101

102102
# Patch Messages.create
103103
wrap_function_wrapper(
104-
module="anthropic.resources.messages",
105-
name="Messages.create",
106-
wrapper=messages_create(handler),
104+
"anthropic.resources.messages",
105+
"Messages.create",
106+
messages_create(handler),
107107
)
108108

109109
def _uninstrument(self, **kwargs: Any) -> None:

instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/requirements.latest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ anthropic
4040
pytest==7.4.4
4141
pytest-vcr==1.0.2
4242
pytest-asyncio==0.21.0
43-
wrapt==1.16.0
43+
wrapt==2.1.2
4444
# test with the latest version of opentelemetry-api, sdk, and semantic conventions
4545

4646
-e opentelemetry-instrumentation

instrumentation-genai/opentelemetry-instrumentation-langchain/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Fix compatibility with wrapt 2.x by using positional arguments in `wrap_function_wrapper()` calls
11+
([#4445](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4445))
1012
- Added span support for genAI langchain llm invocation.
1113
([#3665](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3665))
1214
- Added support to call genai utils handler for langchain LLM invocations.

instrumentation-genai/opentelemetry-instrumentation-langchain/src/opentelemetry/instrumentation/langchain/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def _instrument(self, **kwargs: Any):
8383
)
8484

8585
wrap_function_wrapper(
86-
module="langchain_core.callbacks",
87-
name="BaseCallbackManager.__init__",
88-
wrapper=_BaseCallbackManagerInitWrapper(otel_callback_handler),
86+
"langchain_core.callbacks",
87+
"BaseCallbackManager.__init__",
88+
_BaseCallbackManagerInitWrapper(otel_callback_handler),
8989
)
9090

9191
def _uninstrument(self, **kwargs: Any):

instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Fix compatibility with wrapt 2.x by using positional arguments in `wrap_function_wrapper()` calls
11+
([#4445](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4445))
1012
- Fix `ChoiceBuffer` crash on streaming tool-call deltas with `arguments=None`
1113
([#4350](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4350))
1214
- Fix `StreamWrapper` missing `.headers` and other attributes when using `with_raw_response` streaming

instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ def _instrument(self, **kwargs):
119119
)
120120

121121
wrap_function_wrapper(
122-
module="openai.resources.chat.completions",
123-
name="Completions.create",
124-
wrapper=(
122+
"openai.resources.chat.completions",
123+
"Completions.create",
124+
(
125125
chat_completions_create_v_new(handler, content_mode)
126126
if latest_experimental_enabled
127127
else chat_completions_create_v_old(
@@ -131,9 +131,9 @@ def _instrument(self, **kwargs):
131131
)
132132

133133
wrap_function_wrapper(
134-
module="openai.resources.chat.completions",
135-
name="AsyncCompletions.create",
136-
wrapper=(
134+
"openai.resources.chat.completions",
135+
"AsyncCompletions.create",
136+
(
137137
async_chat_completions_create_v_new(handler, content_mode)
138138
if latest_experimental_enabled
139139
else async_chat_completions_create_v_old(
@@ -144,17 +144,17 @@ def _instrument(self, **kwargs):
144144

145145
# Add instrumentation for the embeddings API
146146
wrap_function_wrapper(
147-
module="openai.resources.embeddings",
148-
name="Embeddings.create",
149-
wrapper=embeddings_create(
147+
"openai.resources.embeddings",
148+
"Embeddings.create",
149+
embeddings_create(
150150
tracer, instruments, latest_experimental_enabled
151151
),
152152
)
153153

154154
wrap_function_wrapper(
155-
module="openai.resources.embeddings",
156-
name="AsyncEmbeddings.create",
157-
wrapper=async_embeddings_create(
155+
"openai.resources.embeddings",
156+
"AsyncEmbeddings.create",
157+
async_embeddings_create(
158158
tracer, instruments, latest_experimental_enabled
159159
),
160160
)

instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/requirements.latest.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ pydantic==2.12.5
4141
httpx==0.27.2
4242
# older jiter is required for PyPy < 3.11
4343
jiter==0.11.1
44-
Deprecated==1.2.14
44+
Deprecated==1.3.1
4545
importlib-metadata==6.11.0
4646
packaging==24.0
4747
pytest==7.4.4
4848
pytest-vcr==1.0.2
4949
pytest-asyncio==0.21.0
50-
wrapt==1.16.0
50+
wrapt==2.1.2
5151
# test with the latest version of opentelemetry-api, sdk, and semantic conventions
5252

5353
-e opentelemetry-instrumentation

instrumentation-genai/opentelemetry-instrumentation-vertexai/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Fix compatibility with wrapt 2.x by using positional arguments in `wrap_function_wrapper()` calls
11+
([#4445](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4445))
12+
1013
## Version 2.2b0 (2025-12-19)
1114
- Fix overwritten log attributes in vertexai instrumentation
1215
([#3925](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3925))

instrumentation-genai/opentelemetry-instrumentation-vertexai/src/opentelemetry/instrumentation/vertexai/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def _instrument(self, **kwargs: Any):
163163
):
164164
wrap_function_wrapper(
165165
client_class,
166-
name=method_name,
167-
wrapper=wrapper,
166+
method_name,
167+
wrapper,
168168
)
169169
self._methods_to_unwrap.append((client_class, method_name))
170170

0 commit comments

Comments
 (0)