aiqa-client 0.3.4__tar.gz → 0.3.5__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.
- {aiqa_client-0.3.4/aiqa_client.egg-info → aiqa_client-0.3.5}/PKG-INFO +3 -3
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/README.md +2 -2
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/__init__.py +3 -3
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/tracing.py +5 -4
- {aiqa_client-0.3.4 → aiqa_client-0.3.5/aiqa_client.egg-info}/PKG-INFO +3 -3
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/pyproject.toml +1 -1
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/LICENSE +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/MANIFEST.in +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/aiqa_exporter.py +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/client.py +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/experiment_runner.py +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/object_serialiser.py +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/py.typed +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/test_experiment_runner.py +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa/test_tracing.py +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa_client.egg-info/SOURCES.txt +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa_client.egg-info/dependency_links.txt +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa_client.egg-info/requires.txt +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/aiqa_client.egg-info/top_level.txt +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/setup.cfg +0 -0
- {aiqa_client-0.3.4 → aiqa_client-0.3.5}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aiqa-client
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: OpenTelemetry-based Python client for tracing functions and sending traces to the AIQA server
|
|
5
5
|
Author-email: AIQA <info@aiqa.dev>
|
|
6
6
|
License: MIT
|
|
@@ -176,10 +176,10 @@ To link traces across different services or agents, you can extract and propagat
|
|
|
176
176
|
#### Getting Current Trace ID
|
|
177
177
|
|
|
178
178
|
```python
|
|
179
|
-
from aiqa import
|
|
179
|
+
from aiqa import get_active_trace_id, get_span_id
|
|
180
180
|
|
|
181
181
|
# Get the current trace ID and span ID
|
|
182
|
-
trace_id =
|
|
182
|
+
trace_id = get_active_trace_id() # Returns hex string (32 chars) or None
|
|
183
183
|
span_id = get_span_id() # Returns hex string (16 chars) or None
|
|
184
184
|
|
|
185
185
|
# Pass these to another service (e.g., in HTTP headers, message queue, etc.)
|
|
@@ -139,10 +139,10 @@ To link traces across different services or agents, you can extract and propagat
|
|
|
139
139
|
#### Getting Current Trace ID
|
|
140
140
|
|
|
141
141
|
```python
|
|
142
|
-
from aiqa import
|
|
142
|
+
from aiqa import get_active_trace_id, get_span_id
|
|
143
143
|
|
|
144
144
|
# Get the current trace ID and span ID
|
|
145
|
-
trace_id =
|
|
145
|
+
trace_id = get_active_trace_id() # Returns hex string (32 chars) or None
|
|
146
146
|
span_id = get_span_id() # Returns hex string (16 chars) or None
|
|
147
147
|
|
|
148
148
|
# Pass these to another service (e.g., in HTTP headers, message queue, etc.)
|
|
@@ -28,7 +28,7 @@ from .tracing import (
|
|
|
28
28
|
get_active_span,
|
|
29
29
|
get_provider,
|
|
30
30
|
get_exporter,
|
|
31
|
-
|
|
31
|
+
get_active_trace_id,
|
|
32
32
|
get_span_id,
|
|
33
33
|
create_span_from_trace_id,
|
|
34
34
|
inject_trace_context,
|
|
@@ -40,7 +40,7 @@ from .tracing import (
|
|
|
40
40
|
from .client import get_aiqa_client
|
|
41
41
|
from .experiment_runner import ExperimentRunner
|
|
42
42
|
|
|
43
|
-
__version__ = "0.3.
|
|
43
|
+
__version__ = "0.3.5"
|
|
44
44
|
|
|
45
45
|
__all__ = [
|
|
46
46
|
"WithTracing",
|
|
@@ -53,7 +53,7 @@ __all__ = [
|
|
|
53
53
|
"get_exporter",
|
|
54
54
|
"get_aiqa_client",
|
|
55
55
|
"ExperimentRunner",
|
|
56
|
-
"
|
|
56
|
+
"get_active_trace_id",
|
|
57
57
|
"get_span_id",
|
|
58
58
|
"create_span_from_trace_id",
|
|
59
59
|
"inject_trace_context",
|
|
@@ -55,7 +55,7 @@ async def shutdown_tracing() -> None:
|
|
|
55
55
|
__all__ = [
|
|
56
56
|
"get_provider", "get_exporter", "flush_tracing", "shutdown_tracing", "WithTracing",
|
|
57
57
|
"set_span_attribute", "set_span_name", "get_active_span",
|
|
58
|
-
"
|
|
58
|
+
"get_active_trace_id", "get_span_id", "create_span_from_trace_id", "inject_trace_context", "extract_trace_context",
|
|
59
59
|
"set_conversation_id", "set_component_tag", "set_token_usage", "set_provider_and_model", "get_span", "submit_feedback"
|
|
60
60
|
]
|
|
61
61
|
|
|
@@ -968,7 +968,7 @@ def get_exporter() -> Optional[AIQASpanExporter]:
|
|
|
968
968
|
return client.get("exporter")
|
|
969
969
|
|
|
970
970
|
|
|
971
|
-
def
|
|
971
|
+
def get_active_trace_id() -> Optional[str]:
|
|
972
972
|
"""
|
|
973
973
|
Get the current trace ID as a hexadecimal string (32 characters).
|
|
974
974
|
|
|
@@ -976,9 +976,10 @@ def get_trace_id() -> Optional[str]:
|
|
|
976
976
|
The trace ID as a hex string, or None if no active span exists.
|
|
977
977
|
|
|
978
978
|
Example:
|
|
979
|
-
trace_id =
|
|
979
|
+
trace_id = get_active_trace_id()
|
|
980
980
|
# Pass trace_id to another service/agent
|
|
981
981
|
# e.g., include in HTTP headers, message queue metadata, etc.
|
|
982
|
+
# Within a single thread, OpenTelemetry normally does this for you.
|
|
982
983
|
"""
|
|
983
984
|
span = trace.get_current_span()
|
|
984
985
|
if span and span.get_span_context().is_valid:
|
|
@@ -1023,7 +1024,7 @@ def create_span_from_trace_id(
|
|
|
1023
1024
|
|
|
1024
1025
|
Example:
|
|
1025
1026
|
# In service A: get trace ID
|
|
1026
|
-
trace_id =
|
|
1027
|
+
trace_id = get_active_trace_id()
|
|
1027
1028
|
span_id = get_span_id()
|
|
1028
1029
|
|
|
1029
1030
|
# Send to service B (e.g., via HTTP, message queue, etc.)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aiqa-client
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: OpenTelemetry-based Python client for tracing functions and sending traces to the AIQA server
|
|
5
5
|
Author-email: AIQA <info@aiqa.dev>
|
|
6
6
|
License: MIT
|
|
@@ -176,10 +176,10 @@ To link traces across different services or agents, you can extract and propagat
|
|
|
176
176
|
#### Getting Current Trace ID
|
|
177
177
|
|
|
178
178
|
```python
|
|
179
|
-
from aiqa import
|
|
179
|
+
from aiqa import get_active_trace_id, get_span_id
|
|
180
180
|
|
|
181
181
|
# Get the current trace ID and span ID
|
|
182
|
-
trace_id =
|
|
182
|
+
trace_id = get_active_trace_id() # Returns hex string (32 chars) or None
|
|
183
183
|
span_id = get_span_id() # Returns hex string (16 chars) or None
|
|
184
184
|
|
|
185
185
|
# Pass these to another service (e.g., in HTTP headers, message queue, etc.)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "aiqa-client"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.5"
|
|
8
8
|
description = "OpenTelemetry-based Python client for tracing functions and sending traces to the AIQA server"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|