Skip to content

Commit 41ce634

Browse files
authored
feat(copaw): add CoPaw instrumentation, LoongSuite CI, and bootstrap mapping (#162)
1 parent 0e39f80 commit 41ce634

35 files changed

Lines changed: 1330 additions & 133 deletions

File tree

.github/workflows/loongsuite_lint_0.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,22 @@ jobs:
222222
- name: Run tests
223223
run: tox -c tox-loongsuite.ini -e lint-loongsuite-instrumentation-crewai
224224

225+
lint-loongsuite-instrumentation-copaw:
226+
name: LoongSuite loongsuite-instrumentation-copaw
227+
runs-on: ubuntu-latest
228+
timeout-minutes: 30
229+
steps:
230+
- name: Checkout repo @ SHA - ${{ github.sha }}
231+
uses: actions/checkout@v4
232+
233+
- name: Set up Python 3.13
234+
uses: actions/setup-python@v5
235+
with:
236+
python-version: "3.13"
237+
238+
- name: Install tox
239+
run: pip install tox-uv
240+
241+
- name: Run tests
242+
run: tox -c tox-loongsuite.ini -e lint-loongsuite-instrumentation-copaw
243+

.github/workflows/loongsuite_test_0.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,3 +1533,79 @@ jobs:
15331533
- name: Run tests
15341534
run: tox -c tox-loongsuite.ini -e py313-test-loongsuite-instrumentation-crewai -- -ra
15351535

1536+
py310-test-loongsuite-instrumentation-copaw_ubuntu-latest:
1537+
name: LoongSuite loongsuite-instrumentation-copaw 3.10 Ubuntu
1538+
runs-on: ubuntu-latest
1539+
timeout-minutes: 30
1540+
steps:
1541+
- name: Checkout repo @ SHA - ${{ github.sha }}
1542+
uses: actions/checkout@v4
1543+
1544+
- name: Set up Python 3.10
1545+
uses: actions/setup-python@v5
1546+
with:
1547+
python-version: "3.10"
1548+
1549+
- name: Install tox
1550+
run: pip install tox-uv
1551+
1552+
- name: Run tests
1553+
run: tox -c tox-loongsuite.ini -e py310-test-loongsuite-instrumentation-copaw -- -ra
1554+
1555+
py311-test-loongsuite-instrumentation-copaw_ubuntu-latest:
1556+
name: LoongSuite loongsuite-instrumentation-copaw 3.11 Ubuntu
1557+
runs-on: ubuntu-latest
1558+
timeout-minutes: 30
1559+
steps:
1560+
- name: Checkout repo @ SHA - ${{ github.sha }}
1561+
uses: actions/checkout@v4
1562+
1563+
- name: Set up Python 3.11
1564+
uses: actions/setup-python@v5
1565+
with:
1566+
python-version: "3.11"
1567+
1568+
- name: Install tox
1569+
run: pip install tox-uv
1570+
1571+
- name: Run tests
1572+
run: tox -c tox-loongsuite.ini -e py311-test-loongsuite-instrumentation-copaw -- -ra
1573+
1574+
py312-test-loongsuite-instrumentation-copaw_ubuntu-latest:
1575+
name: LoongSuite loongsuite-instrumentation-copaw 3.12 Ubuntu
1576+
runs-on: ubuntu-latest
1577+
timeout-minutes: 30
1578+
steps:
1579+
- name: Checkout repo @ SHA - ${{ github.sha }}
1580+
uses: actions/checkout@v4
1581+
1582+
- name: Set up Python 3.12
1583+
uses: actions/setup-python@v5
1584+
with:
1585+
python-version: "3.12"
1586+
1587+
- name: Install tox
1588+
run: pip install tox-uv
1589+
1590+
- name: Run tests
1591+
run: tox -c tox-loongsuite.ini -e py312-test-loongsuite-instrumentation-copaw -- -ra
1592+
1593+
py313-test-loongsuite-instrumentation-copaw_ubuntu-latest:
1594+
name: LoongSuite loongsuite-instrumentation-copaw 3.13 Ubuntu
1595+
runs-on: ubuntu-latest
1596+
timeout-minutes: 30
1597+
steps:
1598+
- name: Checkout repo @ SHA - ${{ github.sha }}
1599+
uses: actions/checkout@v4
1600+
1601+
- name: Set up Python 3.13
1602+
uses: actions/setup-python@v5
1603+
with:
1604+
python-version: "3.13"
1605+
1606+
- name: Install tox
1607+
run: pip install tox-uv
1608+
1609+
- name: Run tests
1610+
run: tox -c tox-loongsuite.ini -e py313-test-loongsuite-instrumentation-copaw -- -ra
1611+

README-zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ LoongSuite Python Agent 同时也是上游 [OTel Python Agent](https://github.co
3333
| [AgentScope](https://github.com/agentscope-ai/agentscope) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-agentscope/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-agentscope/) |
3434
| [Agno](https://github.com/agno-agi/agno) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-agno/README.md) | in dev |
3535
| [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-claude-agent-sdk/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-claude-agent-sdk/) |
36+
| [CoPaw](https://github.com/agentscope-ai/CoPaw) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-copaw/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-copaw/) |
3637
| [CrewAI](https://github.com/crewAIInc/crewAI) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-crewai/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-crewai/) |
3738
| [DashScope](https://github.com/dashscope/dashscope-sdk-python) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-dashscope/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-dashscope/) |
3839
| [Dify](https://github.com/langgenius/dify) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-dify/README.md) | in dev |

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Source tree: [`instrumentation-loongsuite/`](instrumentation-loongsuite).
3333
| [AgentScope](https://github.com/agentscope-ai/agentscope) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-agentscope/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-agentscope/) |
3434
| [Agno](https://github.com/agno-agi/agno) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-agno/README.md) | in dev |
3535
| [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-claude-agent-sdk/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-claude-agent-sdk/) |
36+
| [CoPaw](https://github.com/agentscope-ai/CoPaw) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-copaw/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-copaw/) |
3637
| [CrewAI](https://github.com/crewAIInc/crewAI) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-crewai/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-crewai/) |
3738
| [DashScope](https://github.com/dashscope/dashscope-sdk-python) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-dashscope/README.md) | [PyPI](https://pypi.org/project/loongsuite-instrumentation-dashscope/) |
3839
| [Dify](https://github.com/langgenius/dify) | [GUIDE](instrumentation-loongsuite/loongsuite-instrumentation-dify/README.md) | in dev |
@@ -537,4 +538,4 @@ our [DingTalk group](https://qr.dingtalk.com/action/joingroup?code=v1,k1,mexukXI
537538

538539
## Resources
539540
* AgentScope: https://github.com/modelscope/agentscope
540-
* Observability Community: https://observability.cn
541+
* Observability Community: https://observability.cn

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme-renderer==42.0
1010
bleach==4.1.0 # transient dependency for readme-renderer
1111
markupsafe>=2.0.1
1212
codespell==2.1.0
13-
requests==2.32.3
13+
requests==2.32.4 # LoongSuite Extension: Copaw requires requests>=2.32.4
1414
ruamel.yaml==0.17.21
1515
flaky==3.7.0
1616
pre-commit==3.7.0; python_version >= '3.9'

instrumentation-loongsuite/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
| [loongsuite-instrumentation-agentscope](./loongsuite-instrumentation-agentscope) | agentscope >= 1.0.0 | No | development
55
| [loongsuite-instrumentation-agno](./loongsuite-instrumentation-agno) | agno | No | development
66
| [loongsuite-instrumentation-claude-agent-sdk](./loongsuite-instrumentation-claude-agent-sdk) | claude-agent-sdk >= 0.1.0 | No | development
7+
| [loongsuite-instrumentation-copaw](./loongsuite-instrumentation-copaw) | copaw >= 0.1.0 | No | development
8+
| [loongsuite-instrumentation-crewai](./loongsuite-instrumentation-crewai) | crewai >= 0.80.0 | No | development
79
| [loongsuite-instrumentation-dashscope](./loongsuite-instrumentation-dashscope) | dashscope >= 1.0.0 | No | development
810
| [loongsuite-instrumentation-dify](./loongsuite-instrumentation-dify) | dify | No | development
911
| [loongsuite-instrumentation-google-adk](./loongsuite-instrumentation-google-adk) | google-adk >= 0.1.0 | No | development
1012
| [loongsuite-instrumentation-langchain](./loongsuite-instrumentation-langchain) | langchain_core >= 0.1.0 | No | development
13+
| [loongsuite-instrumentation-langgraph](./loongsuite-instrumentation-langgraph) | langgraph >= 0.2 | No | development
14+
| [loongsuite-instrumentation-litellm](./loongsuite-instrumentation-litellm) | litellm >= 1.0.0 | No | development
1115
| [loongsuite-instrumentation-mcp](./loongsuite-instrumentation-mcp) | mcp >= 1.3.0, <= 1.25.0 | No | development
1216
| [loongsuite-instrumentation-mem0](./loongsuite-instrumentation-mem0) | mem0ai >= 1.0.0 | No | development

instrumentation-loongsuite/loongsuite-instrumentation-agentscope/tests/requirements.latest.txt

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
1-
# Test requirements for latest versions
1+
# Copyright The OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# ********************************
16+
# WARNING: NOT HERMETIC !!!!!!!!!!
17+
# ********************************
18+
#
19+
# This "requirements.txt" is installed in conjunction
20+
# with multiple other dependencies in the top-level "tox-loongsuite.ini"
21+
# file. In particular, please see:
22+
#
23+
# agentscope-latest: {[testenv]test_deps}
24+
# agentscope-latest: -r {toxinidir}/instrumentation-loongsuite/loongsuite-instrumentation-agentscope/tests/requirements.latest.txt
25+
#
26+
# This provides additional dependencies, namely:
27+
#
28+
# opentelemetry-api
29+
# opentelemetry-sdk
30+
# opentelemetry-semantic-conventions
31+
#
32+
# ... with a "dev" version based on the latest distribution.
33+
34+
# This variant of the requirements aims to test the system using
35+
# the newest supported version of external dependencies.
36+
237
agentscope>=1.0.0
338
pytest
439
pytest-asyncio

instrumentation-loongsuite/loongsuite-instrumentation-agentscope/tests/requirements.oldest.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
# Test requirements for latest versions
1+
# Copyright The OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This variant of the requirements aims to test the system using
16+
# the oldest supported version of external dependencies.
17+
218
agentscope>=1.0.0
319
pytest
420
pytest-asyncio

instrumentation-loongsuite/loongsuite-instrumentation-claude-agent-sdk/tests/requirements.latest.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# ********************************
16+
# WARNING: NOT HERMETIC !!!!!!!!!!
17+
# ********************************
18+
#
19+
# This "requirements.txt" is installed in conjunction
20+
# with multiple other dependencies in the top-level "tox-loongsuite.ini"
21+
# file. In particular, please see:
22+
#
23+
# claude-agent-sdk-latest: {[testenv]test_deps}
24+
# claude-agent-sdk-latest: -r {toxinidir}/instrumentation-loongsuite/loongsuite-instrumentation-claude-agent-sdk/tests/requirements.latest.txt
25+
#
26+
# This provides additional dependencies, namely:
27+
#
28+
# opentelemetry-api
29+
# opentelemetry-sdk
30+
# opentelemetry-semantic-conventions
31+
#
32+
# ... with a "dev" version based on the latest distribution.
33+
1534
# This variant of the requirements aims to test the system using
1635
# the newest supported version of external dependencies.
1736

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## Unreleased
9+
10+
### Added
11+
12+
- **CoPaw instrumentation initialization**: ``CoPawInstrumentor`` registers
13+
automatic instrumentation for CoPaw when ``instrument()`` is called (included
14+
in LoongSuite distro automatic injection).
15+
([#162](https://github.com/alibaba/loongsuite-python-agent/pull/162))
16+
17+
### Changed
18+
19+
- Instrumentor depends on ``opentelemetry-util-genai`` and passes
20+
``tracer_provider``, ``meter_provider``, and ``logger_provider`` from
21+
``instrument()`` into the shared GenAI telemetry handler.
22+
([#162](https://github.com/alibaba/loongsuite-python-agent/pull/162))

0 commit comments

Comments
 (0)