ioa-observe-sdk 1.0.24__tar.gz → 1.0.25__tar.gz

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.
Files changed (59) hide show
  1. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/PKG-INFO +32 -1
  2. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/README.md +31 -0
  3. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/instrumentations/slim.py +7 -1
  4. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe_sdk.egg-info/PKG-INFO +32 -1
  5. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/pyproject.toml +1 -1
  6. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/LICENSE.md +0 -0
  7. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/__init__.py +0 -0
  8. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/__init__.py +0 -0
  9. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/client/__init__.py +0 -0
  10. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/client/client.py +0 -0
  11. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/client/http.py +0 -0
  12. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/config/__init__.py +0 -0
  13. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/connectors/__init__.py +0 -0
  14. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/connectors/slim.py +0 -0
  15. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/decorators/__init__.py +0 -0
  16. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/decorators/base.py +0 -0
  17. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/decorators/helpers.py +0 -0
  18. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/decorators/util.py +0 -0
  19. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/instrumentations/__init__.py +0 -0
  20. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/instrumentations/a2a.py +0 -0
  21. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/instrumentations/mcp.py +0 -0
  22. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/instrumentations/nats.py +0 -0
  23. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/instruments.py +0 -0
  24. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/logging/__init__.py +0 -0
  25. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/logging/logging.py +0 -0
  26. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/__init__.py +0 -0
  27. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agent.py +0 -0
  28. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agents/__init__.py +0 -0
  29. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agents/agent_connections.py +0 -0
  30. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agents/availability.py +0 -0
  31. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agents/heuristics.py +0 -0
  32. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agents/recovery_tracker.py +0 -0
  33. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agents/tool_call_tracker.py +0 -0
  34. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/agents/tracker.py +0 -0
  35. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/metrics/metrics.py +0 -0
  36. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/telemetry.py +0 -0
  37. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/tracing/__init__.py +0 -0
  38. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/tracing/content_allow_list.py +0 -0
  39. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/tracing/context_manager.py +0 -0
  40. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/tracing/context_utils.py +0 -0
  41. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/tracing/manual.py +0 -0
  42. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/tracing/tracing.py +0 -0
  43. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/tracing/transform_span.py +0 -0
  44. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/utils/__init__.py +0 -0
  45. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/utils/const.py +0 -0
  46. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/utils/in_memory_span_exporter.py +0 -0
  47. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/utils/json_encoder.py +0 -0
  48. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/utils/package_check.py +0 -0
  49. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe/sdk/version.py +0 -0
  50. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe_sdk.egg-info/SOURCES.txt +0 -0
  51. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe_sdk.egg-info/dependency_links.txt +0 -0
  52. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe_sdk.egg-info/requires.txt +0 -0
  53. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/ioa_observe_sdk.egg-info/top_level.txt +0 -0
  54. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/setup.cfg +0 -0
  55. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/tests/test_client.py +0 -0
  56. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/tests/test_instrumentor.py +0 -0
  57. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/tests/test_manual_instrumentation.py +0 -0
  58. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/tests/test_transform_span.py +0 -0
  59. {ioa_observe_sdk-1.0.24 → ioa_observe_sdk-1.0.25}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ioa-observe-sdk
3
- Version: 1.0.24
3
+ Version: 1.0.25
4
4
  Summary: IOA Observability SDK
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.10
@@ -76,6 +76,37 @@ Alternatively, to download the SDK from git, you could also use the following co
76
76
  uv add "git+https://github.com/agntcy/observe"
77
77
  ```
78
78
 
79
+ ### Quick Start
80
+
81
+ After installation, import and initialize the SDK:
82
+
83
+ ```python
84
+ import os
85
+ from ioa_observe.sdk import Observe
86
+ from ioa_observe.sdk.decorators import agent
87
+ from ioa_observe.sdk.tracing import session_start
88
+
89
+ # Initialize Observe
90
+ Observe.init(
91
+ app_name="your_app_name",
92
+ api_endpoint=os.getenv("OTLP_HTTP_ENDPOINT", "http://localhost:4318")
93
+ )
94
+
95
+ # Use decorators to instrument your agents
96
+ @agent(name="my_agent", description="Example agent")
97
+ def my_agent_function(state):
98
+ # Your agent logic here
99
+ return {"result": "success"}
100
+
101
+ # Start a session for tracking
102
+ with session_start() as session_id:
103
+ result = my_agent_function({"input": "data"})
104
+ ```
105
+
106
+ **Note:** The package name for installation is `ioa_observe_sdk`, but imports use `ioa_observe` (underscore, not hyphen).
107
+
108
+ For comprehensive integration examples with LangGraph, LlamaIndex, and other frameworks, see the [Getting Started Guide](GETTING-STARTED.md).
109
+
79
110
  ## Schema
80
111
 
81
112
  The AGNTCY observability schema is an extension of the OTel LLM Semantic Conventions for Generative AI systems.
@@ -27,6 +27,37 @@ Alternatively, to download the SDK from git, you could also use the following co
27
27
  uv add "git+https://github.com/agntcy/observe"
28
28
  ```
29
29
 
30
+ ### Quick Start
31
+
32
+ After installation, import and initialize the SDK:
33
+
34
+ ```python
35
+ import os
36
+ from ioa_observe.sdk import Observe
37
+ from ioa_observe.sdk.decorators import agent
38
+ from ioa_observe.sdk.tracing import session_start
39
+
40
+ # Initialize Observe
41
+ Observe.init(
42
+ app_name="your_app_name",
43
+ api_endpoint=os.getenv("OTLP_HTTP_ENDPOINT", "http://localhost:4318")
44
+ )
45
+
46
+ # Use decorators to instrument your agents
47
+ @agent(name="my_agent", description="Example agent")
48
+ def my_agent_function(state):
49
+ # Your agent logic here
50
+ return {"result": "success"}
51
+
52
+ # Start a session for tracking
53
+ with session_start() as session_id:
54
+ result = my_agent_function({"input": "data"})
55
+ ```
56
+
57
+ **Note:** The package name for installation is `ioa_observe_sdk`, but imports use `ioa_observe` (underscore, not hyphen).
58
+
59
+ For comprehensive integration examples with LangGraph, LlamaIndex, and other frameworks, see the [Getting Started Guide](GETTING-STARTED.md).
60
+
30
61
  ## Schema
31
62
 
32
63
  The AGNTCY observability schema is an extension of the OTel LLM Semantic Conventions for Generative AI systems.
@@ -686,7 +686,13 @@ class SLIMInstrumentor(BaseInstrumentor):
686
686
  baggage.set_baggage(f"execution.{traceparent}", session_id)
687
687
 
688
688
  # Wrap the message (first argument for publish, second for publish_to)
689
- message_idx = 1 if method_name == "publish_to" else 0
689
+ # If the session_class is SessionContext, the message is always in second position
690
+ message_idx = (
691
+ 1
692
+ if method_name == "publish_to"
693
+ or session_class.__name__ == "SessionContext"
694
+ else 0
695
+ )
690
696
  if len(args) > message_idx:
691
697
  args_list = list(args)
692
698
  message = args_list[message_idx]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ioa-observe-sdk
3
- Version: 1.0.24
3
+ Version: 1.0.25
4
4
  Summary: IOA Observability SDK
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.10
@@ -76,6 +76,37 @@ Alternatively, to download the SDK from git, you could also use the following co
76
76
  uv add "git+https://github.com/agntcy/observe"
77
77
  ```
78
78
 
79
+ ### Quick Start
80
+
81
+ After installation, import and initialize the SDK:
82
+
83
+ ```python
84
+ import os
85
+ from ioa_observe.sdk import Observe
86
+ from ioa_observe.sdk.decorators import agent
87
+ from ioa_observe.sdk.tracing import session_start
88
+
89
+ # Initialize Observe
90
+ Observe.init(
91
+ app_name="your_app_name",
92
+ api_endpoint=os.getenv("OTLP_HTTP_ENDPOINT", "http://localhost:4318")
93
+ )
94
+
95
+ # Use decorators to instrument your agents
96
+ @agent(name="my_agent", description="Example agent")
97
+ def my_agent_function(state):
98
+ # Your agent logic here
99
+ return {"result": "success"}
100
+
101
+ # Start a session for tracking
102
+ with session_start() as session_id:
103
+ result = my_agent_function({"input": "data"})
104
+ ```
105
+
106
+ **Note:** The package name for installation is `ioa_observe_sdk`, but imports use `ioa_observe` (underscore, not hyphen).
107
+
108
+ For comprehensive integration examples with LangGraph, LlamaIndex, and other frameworks, see the [Getting Started Guide](GETTING-STARTED.md).
109
+
79
110
  ## Schema
80
111
 
81
112
  The AGNTCY observability schema is an extension of the OTel LLM Semantic Conventions for Generative AI systems.
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "ioa-observe-sdk"
8
- version = "1.0.24"
8
+ version = "1.0.25"
9
9
  license = "Apache-2.0"
10
10
  description = "IOA Observability SDK"
11
11
  readme = "README.md"