ioa-observe-sdk 1.0.2__py3-none-any.whl → 1.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ioa_observe/sdk/tracing/tracing.py +1 -1
- {ioa_observe_sdk-1.0.2.dist-info → ioa_observe_sdk-1.0.3.dist-info}/METADATA +9 -78
- {ioa_observe_sdk-1.0.2.dist-info → ioa_observe_sdk-1.0.3.dist-info}/RECORD +6 -6
- {ioa_observe_sdk-1.0.2.dist-info → ioa_observe_sdk-1.0.3.dist-info}/WHEEL +0 -0
- {ioa_observe_sdk-1.0.2.dist-info → ioa_observe_sdk-1.0.3.dist-info}/licenses/LICENSE.md +0 -0
- {ioa_observe_sdk-1.0.2.dist-info → ioa_observe_sdk-1.0.3.dist-info}/top_level.txt +0 -0
|
@@ -751,7 +751,7 @@ def init_google_generativeai_instrumentor():
|
|
|
751
751
|
|
|
752
752
|
def init_langchain_instrumentor():
|
|
753
753
|
try:
|
|
754
|
-
if is_package_installed("langchain"):
|
|
754
|
+
if is_package_installed("langchain") or is_package_installed("langgraph"):
|
|
755
755
|
Telemetry().capture("instrumentation:langchain:init")
|
|
756
756
|
from opentelemetry.instrumentation.langchain import LangchainInstrumentor
|
|
757
757
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ioa-observe-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: IOA Observability SDK
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -41,16 +41,16 @@ Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.33.1
|
|
|
41
41
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.33.1
|
|
42
42
|
Requires-Dist: opentelemetry-instrumentation
|
|
43
43
|
Requires-Dist: opentelemetry-instrumentation-logging==0.54b1
|
|
44
|
-
Requires-Dist: opentelemetry-instrumentation-openai==0.40.
|
|
45
|
-
Requires-Dist: opentelemetry-instrumentation-llamaindex==0.40.
|
|
46
|
-
Requires-Dist: opentelemetry-instrumentation-ollama==0.40.
|
|
47
|
-
Requires-Dist: opentelemetry-instrumentation-langchain==0.40.
|
|
44
|
+
Requires-Dist: opentelemetry-instrumentation-openai==0.40.8
|
|
45
|
+
Requires-Dist: opentelemetry-instrumentation-llamaindex==0.40.8
|
|
46
|
+
Requires-Dist: opentelemetry-instrumentation-ollama==0.40.8
|
|
47
|
+
Requires-Dist: opentelemetry-instrumentation-langchain==0.40.8
|
|
48
48
|
Requires-Dist: opentelemetry-instrumentation-threading==00.54b1
|
|
49
49
|
Requires-Dist: opentelemetry-instrumentation-urllib3==0.54b1
|
|
50
50
|
Requires-Dist: opentelemetry-proto==1.33.1
|
|
51
51
|
Requires-Dist: opentelemetry-sdk==1.33.1
|
|
52
52
|
Requires-Dist: opentelemetry-semantic-conventions==0.54b1
|
|
53
|
-
Requires-Dist: opentelemetry-semantic-conventions-ai==0.4.
|
|
53
|
+
Requires-Dist: opentelemetry-semantic-conventions-ai==0.4.9
|
|
54
54
|
Requires-Dist: opentelemetry-util-http==0.54b1
|
|
55
55
|
Requires-Dist: packaging==24.2
|
|
56
56
|
Requires-Dist: propcache==0.3.0
|
|
@@ -90,8 +90,9 @@ IOA observability SDK for your multi-agentic application.
|
|
|
90
90
|
## Table of Contents
|
|
91
91
|
|
|
92
92
|
- [Installation](#installation)
|
|
93
|
-
- [
|
|
94
|
-
- [
|
|
93
|
+
- [Dev](#dev)
|
|
94
|
+
- [Testing](#testing)
|
|
95
|
+
- [Getting Started](#getting-started)
|
|
95
96
|
- [Contributing](#contributing)
|
|
96
97
|
|
|
97
98
|
## Installation
|
|
@@ -156,76 +157,6 @@ OPENAI_API_KEY=<KEY> make test
|
|
|
156
157
|
For getting started with the SDK, please refer to the [Getting Started](https://github.com/agntcy/observe/blob/main/GETTING-STARTED.md)
|
|
157
158
|
file. It contains detailed instructions on how to set up and use the SDK effectively.
|
|
158
159
|
|
|
159
|
-
## SLIM-Based Multi-Agentic Systems
|
|
160
|
-
|
|
161
|
-
For distributed agent systems using SLIM protocol, additional instrumentation is available:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
### Initializing the SLIM Connector with your agent
|
|
165
|
-
|
|
166
|
-
```python
|
|
167
|
-
from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
|
|
168
|
-
from ioa_observe.sdk.instrumentations.slim import SLIMInstrumentor
|
|
169
|
-
|
|
170
|
-
# Initialize SLIM connector
|
|
171
|
-
slim_connector = SLIMConnector(
|
|
172
|
-
remote_org="cisco",
|
|
173
|
-
remote_namespace="default",
|
|
174
|
-
shared_space="chat",
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
# Register agents with the connector
|
|
178
|
-
slim_connector.register("remote_client_agent")
|
|
179
|
-
|
|
180
|
-
# Instrument SLIM communications
|
|
181
|
-
SLIMInstrumentor().instrument()
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### Receiving Messages with a Callback
|
|
185
|
-
|
|
186
|
-
Add the decorator `process_slim_msg` to the callback function to process incoming messages. This function will be called whenever a message is received in the shared space.
|
|
187
|
-
|
|
188
|
-
```python
|
|
189
|
-
|
|
190
|
-
# Define a callback to process incoming messages
|
|
191
|
-
from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
|
|
192
|
-
import json
|
|
193
|
-
from typing import Dict, Any
|
|
194
|
-
|
|
195
|
-
@process_slim_msg("remote_client_agent")
|
|
196
|
-
async def send_and_recv(msg) -> Dict[str, Any]:
|
|
197
|
-
"""Send message to remote endpoint and wait for reply."""
|
|
198
|
-
gateway = GatewayHolder.gateway
|
|
199
|
-
session_info = GatewayHolder.session_info
|
|
200
|
-
|
|
201
|
-
if gateway is not None:
|
|
202
|
-
await gateway.publish(session_info, msg.encode(), "cisco", "default", "server")
|
|
203
|
-
async with gateway:
|
|
204
|
-
_, recv = await gateway.receive(session=session_info.id)
|
|
205
|
-
else:
|
|
206
|
-
raise RuntimeError("Gateway is not initialized yet!")
|
|
207
|
-
|
|
208
|
-
response_data = json.loads(recv.decode("utf8"))
|
|
209
|
-
return {"messages": response_data.get("messages", [])}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Starting the Message Receiver
|
|
213
|
-
|
|
214
|
-
```python
|
|
215
|
-
# Start receiving messages from the SLIM shared space
|
|
216
|
-
await slim.receive(callback=on_message_received)
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Publishing Messages
|
|
220
|
-
|
|
221
|
-
```python
|
|
222
|
-
# Publish a message to the SLIM shared space
|
|
223
|
-
message = {"type": "ChatMessage", "author": "moderator", "message": "Hello, world!"}
|
|
224
|
-
await slim.publish(msg=json.dumps(message).encode("utf-8"))
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
We will observe various events and metrics being sent to the Otel collector as we interact with other agents in the shared space via SLIM.
|
|
228
|
-
|
|
229
160
|
## Contributing
|
|
230
161
|
|
|
231
162
|
Contributions are welcome! Please follow these steps to contribute:
|
|
@@ -30,14 +30,14 @@ ioa_observe/sdk/tracing/__init__.py,sha256=RBc_lmUEdCDy1ICW6TtRor_0Tew1SyzYFjT4S
|
|
|
30
30
|
ioa_observe/sdk/tracing/content_allow_list.py,sha256=1fAkpIwUQ7vDwCTkIVrqeltWQtrIbYvj8gz6_7P6NrE,945
|
|
31
31
|
ioa_observe/sdk/tracing/context_manager.py,sha256=O0JEXYa9h8anhW78R8KKBuqS0j4by1E1KXxNIMPnLr8,400
|
|
32
32
|
ioa_observe/sdk/tracing/manual.py,sha256=KS6WN-zw9vAACzXYmnMoJm9d1fenYMfvzeK1GrGDPDE,1937
|
|
33
|
-
ioa_observe/sdk/tracing/tracing.py,sha256=
|
|
33
|
+
ioa_observe/sdk/tracing/tracing.py,sha256=6_3WJu_ZEwQTxieOq9khs-S11Hd7dkE8u1j8CFRGW_Y,37772
|
|
34
34
|
ioa_observe/sdk/utils/__init__.py,sha256=UPn182U-UblF_XwXaFpx8F-TmQTbm1LYf9y89uSp5Hw,704
|
|
35
35
|
ioa_observe/sdk/utils/const.py,sha256=GwbHakKPjBL4wLqAVkDrSoKB-8p18EUrbaqPuRuV_xg,1099
|
|
36
36
|
ioa_observe/sdk/utils/in_memory_span_exporter.py,sha256=H_4TRaThMO1H6vUQ0OpQvzJk_fZH0OOsRAM1iZQXsR8,2112
|
|
37
37
|
ioa_observe/sdk/utils/json_encoder.py,sha256=g4NQ0tTqgWssY6I1D7r4zo0G6PiUo61jhofTAw5-jno,639
|
|
38
38
|
ioa_observe/sdk/utils/package_check.py,sha256=1d1MjxhwoEZIx9dumirT2pRsEWgn-m-SI4npDeEalew,576
|
|
39
|
-
ioa_observe_sdk-1.0.
|
|
40
|
-
ioa_observe_sdk-1.0.
|
|
41
|
-
ioa_observe_sdk-1.0.
|
|
42
|
-
ioa_observe_sdk-1.0.
|
|
43
|
-
ioa_observe_sdk-1.0.
|
|
39
|
+
ioa_observe_sdk-1.0.3.dist-info/licenses/LICENSE.md,sha256=55VjUfgjWOS4vv3Cf55gfq-RxjPgRIO2vlgYPUuC5lA,11362
|
|
40
|
+
ioa_observe_sdk-1.0.3.dist-info/METADATA,sha256=Zf0VVVi7QfulJNs-LNiu4_vki7rqJAD2WUUB7ekCFbk,5095
|
|
41
|
+
ioa_observe_sdk-1.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
42
|
+
ioa_observe_sdk-1.0.3.dist-info/top_level.txt,sha256=Yt-6Y1olZEDqCs2REeqI30WjYx0pLGQSVqzYmDd67N8,12
|
|
43
|
+
ioa_observe_sdk-1.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|