aiqa-client 0.1.3__tar.gz → 0.1.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.1.3/aiqa_client.egg-info → aiqa_client-0.1.5}/PKG-INFO +1 -1
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa/__init__.py +1 -1
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa/tracing.py +4 -1
- {aiqa_client-0.1.3 → aiqa_client-0.1.5/aiqa_client.egg-info}/PKG-INFO +1 -1
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/pyproject.toml +1 -1
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/LICENSE +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/MANIFEST.in +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/README.md +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa/aiqa_exporter.py +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa/py.typed +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa_client.egg-info/SOURCES.txt +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa_client.egg-info/dependency_links.txt +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa_client.egg-info/requires.txt +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/aiqa_client.egg-info/top_level.txt +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/setup.cfg +0 -0
- {aiqa_client-0.1.3 → aiqa_client-0.1.5}/setup.py +0 -0
|
@@ -12,6 +12,7 @@ from functools import wraps
|
|
|
12
12
|
from opentelemetry import trace
|
|
13
13
|
from opentelemetry.sdk.trace import TracerProvider
|
|
14
14
|
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
|
15
|
+
from opentelemetry.sdk.trace.sampling import ALWAYS_ON
|
|
15
16
|
from opentelemetry.sdk.resources import Resource
|
|
16
17
|
from opentelemetry.semconv.resource import ResourceAttributes
|
|
17
18
|
from opentelemetry.trace import Status, StatusCode
|
|
@@ -24,12 +25,14 @@ logger = logging.getLogger(__name__)
|
|
|
24
25
|
exporter = AIQASpanExporter()
|
|
25
26
|
|
|
26
27
|
# Initialize OpenTelemetry
|
|
28
|
+
# Use ALWAYS_ON sampler to ensure all spans are recorded (important for FastAPI async contexts)
|
|
27
29
|
provider = TracerProvider(
|
|
28
30
|
resource=Resource.create(
|
|
29
31
|
{
|
|
30
32
|
ResourceAttributes.SERVICE_NAME: os.getenv("OTEL_SERVICE_NAME", "aiqa-service"),
|
|
31
33
|
}
|
|
32
|
-
)
|
|
34
|
+
),
|
|
35
|
+
sampler=ALWAYS_ON
|
|
33
36
|
)
|
|
34
37
|
|
|
35
38
|
provider.add_span_processor(BatchSpanProcessor(exporter))
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "aiqa-client"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.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
|