netra-sdk 0.1.2__tar.gz → 0.1.3__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.
Potentially problematic release.
This version of netra-sdk might be problematic. Click here for more details.
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/PKG-INFO +1 -5
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/README.md +0 -1
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/__init__.py +1 -61
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/instruments.py +0 -4
- netra_sdk-0.1.3/netra/version.py +1 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/pyproject.toml +1 -4
- netra_sdk-0.1.2/netra/version.py +0 -1
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/LICENCE +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/anonymizer/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/anonymizer/anonymizer.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/anonymizer/base.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/anonymizer/fp_anonymizer.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/config.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/decorators.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/exceptions/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/exceptions/injection.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/exceptions/pii.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/input_scanner.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/aiohttp/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/aiohttp/version.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/cohere/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/cohere/version.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/google_genai/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/google_genai/config.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/google_genai/utils.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/google_genai/version.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/httpx/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/httpx/version.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/mistralai/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/mistralai/config.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/mistralai/utils.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/mistralai/version.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/weaviate/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/instrumentation/weaviate/version.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/pii.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/processors/__init__.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/processors/session_span_processor.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/processors/span_aggregation_processor.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/scanner.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/session.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/session_manager.py +0 -0
- {netra_sdk-0.1.2 → netra_sdk-0.1.3}/netra/tracer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: netra-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: A Python SDK for AI application observability that provides OpenTelemetry-based monitoring, tracing, and PII protection for LLM and vector database applications. Enables easy instrumentation, session tracking, and privacy-focused data collection for AI systems in production environments.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Keywords: netra,tracing,observability,sdk,ai,llm,vector,database
|
|
@@ -22,14 +22,12 @@ Requires-Dist: llm-guard (>=0.3.16,<0.4.0) ; extra == "llm-guard"
|
|
|
22
22
|
Requires-Dist: opentelemetry-api (>=1.34.0,<2.0.0)
|
|
23
23
|
Requires-Dist: opentelemetry-instrumentation-aio-pika (>=0.55b1,<1.0.0)
|
|
24
24
|
Requires-Dist: opentelemetry-instrumentation-aiohttp-client (>=0.55b1,<1.0.0)
|
|
25
|
-
Requires-Dist: opentelemetry-instrumentation-aiohttp-server (>=0.55b1,<1.0.0)
|
|
26
25
|
Requires-Dist: opentelemetry-instrumentation-aiokafka (>=0.55b1,<1.0.0)
|
|
27
26
|
Requires-Dist: opentelemetry-instrumentation-aiopg (>=0.55b1,<1.0.0)
|
|
28
27
|
Requires-Dist: opentelemetry-instrumentation-asyncclick (>=0.55b1,<1.0.0)
|
|
29
28
|
Requires-Dist: opentelemetry-instrumentation-asyncio (>=0.55b1,<1.0.0)
|
|
30
29
|
Requires-Dist: opentelemetry-instrumentation-asyncpg (>=0.55b1,<1.0.0)
|
|
31
30
|
Requires-Dist: opentelemetry-instrumentation-aws-lambda (>=0.55b1,<1.0.0)
|
|
32
|
-
Requires-Dist: opentelemetry-instrumentation-boto (>=0.55b1,<1.0.0)
|
|
33
31
|
Requires-Dist: opentelemetry-instrumentation-boto3sqs (>=0.55b1,<1.0.0)
|
|
34
32
|
Requires-Dist: opentelemetry-instrumentation-botocore (>=0.55b1,<1.0.0)
|
|
35
33
|
Requires-Dist: opentelemetry-instrumentation-cassandra (>=0.55b1,<1.0.0)
|
|
@@ -55,7 +53,6 @@ Requires-Dist: opentelemetry-instrumentation-pymemcache (>=0.55b1,<1.0.0)
|
|
|
55
53
|
Requires-Dist: opentelemetry-instrumentation-pymongo (>=0.55b1,<1.0.0)
|
|
56
54
|
Requires-Dist: opentelemetry-instrumentation-pymssql (>=0.55b1,<1.0.0)
|
|
57
55
|
Requires-Dist: opentelemetry-instrumentation-pymysql (>=0.55b1,<1.0.0)
|
|
58
|
-
Requires-Dist: opentelemetry-instrumentation-pyramid (>=0.55b1,<1.0.0)
|
|
59
56
|
Requires-Dist: opentelemetry-instrumentation-redis (>=0.55b1,<1.0.0)
|
|
60
57
|
Requires-Dist: opentelemetry-instrumentation-remoulade (>=0.55b1,<1.0.0)
|
|
61
58
|
Requires-Dist: opentelemetry-instrumentation-requests (>=0.55b1,<1.0.0)
|
|
@@ -228,7 +225,6 @@ class CustomerSupportAgent:
|
|
|
228
225
|
- **Django** - High-level Python web framework
|
|
229
226
|
- **Flask** - Lightweight WSGI web application framework
|
|
230
227
|
- **Falcon** - High-performance Python web framework
|
|
231
|
-
- **Pyramid** - Small, fast, down-to-earth Python web framework
|
|
232
228
|
- **Starlette** - Lightweight ASGI framework/toolkit
|
|
233
229
|
- **Tornado** - Asynchronous networking library and web framework
|
|
234
230
|
- **gRPC** - High-performance, open-source universal RPC framework
|
|
@@ -149,7 +149,6 @@ class CustomerSupportAgent:
|
|
|
149
149
|
- **Django** - High-level Python web framework
|
|
150
150
|
- **Flask** - Lightweight WSGI web application framework
|
|
151
151
|
- **Falcon** - High-performance Python web framework
|
|
152
|
-
- **Pyramid** - Small, fast, down-to-earth Python web framework
|
|
153
152
|
- **Starlette** - Lightweight ASGI framework/toolkit
|
|
154
153
|
- **Tornado** - Asynchronous networking library and web framework
|
|
155
154
|
- **gRPC** - High-performance, open-source universal RPC framework
|
|
@@ -86,10 +86,6 @@ def init_instrumentations(
|
|
|
86
86
|
if CustomInstruments.AIO_PIKA in netra_custom_instruments:
|
|
87
87
|
init_aio_pika_instrumentation()
|
|
88
88
|
|
|
89
|
-
# Initialize aiohttp_server instrumentation.
|
|
90
|
-
if CustomInstruments.AIOHTTP_SERVER in netra_custom_instruments:
|
|
91
|
-
init_aiohttp_server_instrumentation()
|
|
92
|
-
|
|
93
89
|
# Initialize aiokafka instrumentation.
|
|
94
90
|
if CustomInstruments.AIOKAFKA in netra_custom_instruments:
|
|
95
91
|
init_aiokafka_instrumentation()
|
|
@@ -114,10 +110,6 @@ def init_instrumentations(
|
|
|
114
110
|
if CustomInstruments.AWS_LAMBDA in netra_custom_instruments:
|
|
115
111
|
init_aws_lambda_instrumentation()
|
|
116
112
|
|
|
117
|
-
# Initialize boto instrumentation.
|
|
118
|
-
if CustomInstruments.BOTO in netra_custom_instruments:
|
|
119
|
-
init_boto_instrumentation()
|
|
120
|
-
|
|
121
113
|
# Initialize boto3sqs instrumentation.
|
|
122
114
|
if CustomInstruments.BOTO3SQS in netra_custom_instruments:
|
|
123
115
|
init_boto3sqs_instrumentation()
|
|
@@ -210,10 +202,6 @@ def init_instrumentations(
|
|
|
210
202
|
if CustomInstruments.PYMYSQL in netra_custom_instruments:
|
|
211
203
|
init_pymysql_instrumentation()
|
|
212
204
|
|
|
213
|
-
# Initialize pyramid instrumentation.
|
|
214
|
-
if CustomInstruments.PYRAMID in netra_custom_instruments:
|
|
215
|
-
init_pyramid_instrumentation()
|
|
216
|
-
|
|
217
205
|
# Initialize redis instrumentation.
|
|
218
206
|
if CustomInstruments.REDIS in netra_custom_instruments:
|
|
219
207
|
init_redis_instrumentation()
|
|
@@ -455,22 +443,6 @@ def init_aio_pika_instrumentation() -> bool:
|
|
|
455
443
|
return False
|
|
456
444
|
|
|
457
445
|
|
|
458
|
-
def init_aiohttp_server_instrumentation() -> bool:
|
|
459
|
-
"""Initialize aiohttp_server instrumentation."""
|
|
460
|
-
try:
|
|
461
|
-
if is_package_installed("aiohttp"):
|
|
462
|
-
from opentelemetry.instrumentation.aiohttp_server import AioHttpServerInstrumentor
|
|
463
|
-
|
|
464
|
-
instrumentor = AioHttpServerInstrumentor()
|
|
465
|
-
if not instrumentor.is_instrumented_by_opentelemetry:
|
|
466
|
-
instrumentor.instrument()
|
|
467
|
-
return True
|
|
468
|
-
except Exception as e:
|
|
469
|
-
logging.error(f"Error initializing aiohttp_server instrumentor: {e}")
|
|
470
|
-
Telemetry().log_exception(e)
|
|
471
|
-
return False
|
|
472
|
-
|
|
473
|
-
|
|
474
446
|
def init_aiokafka_instrumentation() -> bool:
|
|
475
447
|
"""Initialize aiokafka instrumentation."""
|
|
476
448
|
try:
|
|
@@ -567,22 +539,6 @@ def init_aws_lambda_instrumentation() -> bool:
|
|
|
567
539
|
return False
|
|
568
540
|
|
|
569
541
|
|
|
570
|
-
def init_boto_instrumentation() -> bool:
|
|
571
|
-
"""Initialize boto instrumentation."""
|
|
572
|
-
try:
|
|
573
|
-
if is_package_installed("boto"):
|
|
574
|
-
from opentelemetry.instrumentation.boto import BotoInstrumentor
|
|
575
|
-
|
|
576
|
-
instrumentor = BotoInstrumentor()
|
|
577
|
-
if not instrumentor.is_instrumented_by_opentelemetry:
|
|
578
|
-
instrumentor.instrument()
|
|
579
|
-
return True
|
|
580
|
-
except Exception as e:
|
|
581
|
-
logging.error(f"Error initializing boto instrumentor: {e}")
|
|
582
|
-
Telemetry().log_exception(e)
|
|
583
|
-
return False
|
|
584
|
-
|
|
585
|
-
|
|
586
542
|
def init_boto3sqs_instrumentation() -> bool:
|
|
587
543
|
"""Initialize boto3sqs instrumentation."""
|
|
588
544
|
try:
|
|
@@ -618,7 +574,7 @@ def init_botocore_instrumentation() -> bool:
|
|
|
618
574
|
def init_cassandra_instrumentation() -> bool:
|
|
619
575
|
"""Initialize cassandra instrumentation."""
|
|
620
576
|
try:
|
|
621
|
-
if is_package_installed("cassandra-driver"):
|
|
577
|
+
if is_package_installed("cassandra-driver") and is_package_installed("scylla-driver"):
|
|
622
578
|
from opentelemetry.instrumentation.cassandra import CassandraInstrumentor
|
|
623
579
|
|
|
624
580
|
instrumentor = CassandraInstrumentor()
|
|
@@ -951,22 +907,6 @@ def init_pymysql_instrumentation() -> bool:
|
|
|
951
907
|
return False
|
|
952
908
|
|
|
953
909
|
|
|
954
|
-
def init_pyramid_instrumentation() -> bool:
|
|
955
|
-
"""Initialize pyramid instrumentation."""
|
|
956
|
-
try:
|
|
957
|
-
if is_package_installed("pyramid"):
|
|
958
|
-
from opentelemetry.instrumentation.pyramid import PyramidInstrumentor
|
|
959
|
-
|
|
960
|
-
instrumentor = PyramidInstrumentor()
|
|
961
|
-
if not instrumentor.is_instrumented_by_opentelemetry:
|
|
962
|
-
instrumentor.instrument()
|
|
963
|
-
return True
|
|
964
|
-
except Exception as e:
|
|
965
|
-
logging.error(f"Error initializing pyramid instrumentor: {e}")
|
|
966
|
-
Telemetry().log_exception(e)
|
|
967
|
-
return False
|
|
968
|
-
|
|
969
|
-
|
|
970
910
|
def init_redis_instrumentation() -> bool:
|
|
971
911
|
"""Initialize redis instrumentation."""
|
|
972
912
|
try:
|
|
@@ -90,13 +90,11 @@ NetraInstruments follows the given structure. Refer this for usage within Netra
|
|
|
90
90
|
|
|
91
91
|
class InstrumentSet(Enum):
|
|
92
92
|
AIOHTTP = "aiohttp"
|
|
93
|
-
AIOHTTP_SERVER = "aiohttp_server"
|
|
94
93
|
AIO_PIKA = "aio_pika"
|
|
95
94
|
AIOKAFKA = "aiokafka"
|
|
96
95
|
AIOPG = "aiopg"
|
|
97
96
|
ALEPHALPHA = "alephalpha"
|
|
98
97
|
ANTHROPIC = "anthropic"
|
|
99
|
-
ASGI = "asgi"
|
|
100
98
|
ASYNCCLICK = "asyncclick"
|
|
101
99
|
ASYNCIO = "asyncio"
|
|
102
100
|
ASYNCPG = "asyncpg"
|
|
@@ -145,7 +143,6 @@ class InstrumentSet(Enum):
|
|
|
145
143
|
PYMONGO = "pymongo"
|
|
146
144
|
PYMSSQL = "pymssql"
|
|
147
145
|
PYMYSQL = "pymysql"
|
|
148
|
-
PYRAMID = "pyramid"
|
|
149
146
|
QDRANTDB = "qdrant_db"
|
|
150
147
|
REDIS = "redis"
|
|
151
148
|
REMOULADE = "remoulade"
|
|
@@ -166,5 +163,4 @@ class InstrumentSet(Enum):
|
|
|
166
163
|
VERTEXAI = "vertexai"
|
|
167
164
|
WATSONX = "watsonx"
|
|
168
165
|
WEAVIATEDB = "weaviate_db"
|
|
169
|
-
WSGI = "wsgi"
|
|
170
166
|
"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.3"
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "netra-sdk"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.3"
|
|
8
8
|
description = "A Python SDK for AI application observability that provides OpenTelemetry-based monitoring, tracing, and PII protection for LLM and vector database applications. Enables easy instrumentation, session tracking, and privacy-focused data collection for AI systems in production environments."
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Sooraj Thomas",email = "sooraj@keyvalue.systems"}
|
|
@@ -37,14 +37,12 @@ dependencies = [
|
|
|
37
37
|
"opentelemetry-instrumentation-httpx>=0.55b1,<1.0.0",
|
|
38
38
|
"opentelemetry-instrumentation-aiohttp-client>=0.55b1,<1.0.0",
|
|
39
39
|
"opentelemetry-instrumentation-aio-pika>=0.55b1,<1.0.0",
|
|
40
|
-
"opentelemetry-instrumentation-aiohttp-server>=0.55b1,<1.0.0",
|
|
41
40
|
"opentelemetry-instrumentation-aiokafka>=0.55b1,<1.0.0",
|
|
42
41
|
"opentelemetry-instrumentation-aiopg>=0.55b1,<1.0.0",
|
|
43
42
|
"opentelemetry-instrumentation-asyncclick>=0.55b1,<1.0.0",
|
|
44
43
|
"opentelemetry-instrumentation-asyncio>=0.55b1,<1.0.0",
|
|
45
44
|
"opentelemetry-instrumentation-asyncpg>=0.55b1,<1.0.0",
|
|
46
45
|
"opentelemetry-instrumentation-aws-lambda>=0.55b1,<1.0.0",
|
|
47
|
-
"opentelemetry-instrumentation-boto>=0.55b1,<1.0.0",
|
|
48
46
|
"opentelemetry-instrumentation-boto3sqs>=0.55b1,<1.0.0",
|
|
49
47
|
"opentelemetry-instrumentation-botocore>=0.55b1,<1.0.0",
|
|
50
48
|
"opentelemetry-instrumentation-cassandra>=0.55b1,<1.0.0",
|
|
@@ -68,7 +66,6 @@ dependencies = [
|
|
|
68
66
|
"opentelemetry-instrumentation-pymongo>=0.55b1,<1.0.0",
|
|
69
67
|
"opentelemetry-instrumentation-pymssql>=0.55b1,<1.0.0",
|
|
70
68
|
"opentelemetry-instrumentation-pymysql>=0.55b1,<1.0.0",
|
|
71
|
-
"opentelemetry-instrumentation-pyramid>=0.55b1,<1.0.0",
|
|
72
69
|
"opentelemetry-instrumentation-redis>=0.55b1,<1.0.0",
|
|
73
70
|
"opentelemetry-instrumentation-remoulade>=0.55b1,<1.0.0",
|
|
74
71
|
"opentelemetry-instrumentation-requests>=0.55b1,<1.0.0",
|
netra_sdk-0.1.2/netra/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.2"
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|