Skip to content

Commit fd08416

Browse files
committed
Merge remote-tracking branch 'upstream/main' into genai-utils/agent-invocation
# Conflicts: # util/opentelemetry-util-genai/CHANGELOG.md
2 parents 928069a + d83761f commit fd08416

16 files changed

Lines changed: 260 additions & 41 deletions

File tree

.github/workflows/check-links.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: check-links
2+
on:
3+
push:
4+
branches: [ main ]
5+
paths:
6+
- '**/*.md'
7+
- '**/*.rst'
8+
- '.github/workflows/check-links.yml'
9+
- '.github/workflows/check_links_config.json'
10+
pull_request:
11+
paths:
12+
- '**/*.md'
13+
- '**/*.rst'
14+
- '.github/workflows/check-links.yml'
15+
- '.github/workflows/check_links_config.json'
16+
17+
permissions:
18+
contents: read
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
check-links:
26+
runs-on: ubuntu-latest
27+
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'otelbot[bot]' }}
28+
timeout-minutes: 15
29+
steps:
30+
- name: Checkout Repo
31+
uses: actions/checkout@v6
32+
33+
- name: Get changed markdown files
34+
id: changed-files
35+
uses: tj-actions/changed-files@v46
36+
with:
37+
files: |
38+
**/*.md
39+
**/*.rst
40+
41+
- name: Install markdown-link-check
42+
if: steps.changed-files.outputs.any_changed == 'true'
43+
run: npm install -g markdown-link-check@v3.12.2
44+
45+
- name: Run markdown-link-check
46+
if: steps.changed-files.outputs.any_changed == 'true'
47+
run: |
48+
markdown-link-check \
49+
--verbose \
50+
--config .github/workflows/check_links_config.json \
51+
${{ steps.changed-files.outputs.all_changed_files }} \
52+
|| { echo "Check that anchor links are lowercase"; exit 1; }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "http(s)?://\\d+\\.\\d+\\.\\d+\\.\\d+"
5+
},
6+
{
7+
"pattern": "http(s)?://localhost"
8+
},
9+
{
10+
"pattern": "http(s)?://example.com"
11+
}
12+
],
13+
"aliveStatusCodes": [429, 200]
14+
}

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

0 commit comments

Comments
 (0)