netra-sdk 0.1.15__py3-none-any.whl → 0.1.16__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.
Potentially problematic release.
This version of netra-sdk might be problematic. Click here for more details.
- netra/__init__.py +20 -5
- netra/version.py +1 -2
- {netra_sdk-0.1.15.dist-info → netra_sdk-0.1.16.dist-info}/METADATA +1 -1
- {netra_sdk-0.1.15.dist-info → netra_sdk-0.1.16.dist-info}/RECORD +6 -6
- {netra_sdk-0.1.15.dist-info → netra_sdk-0.1.16.dist-info}/LICENCE +0 -0
- {netra_sdk-0.1.15.dist-info → netra_sdk-0.1.16.dist-info}/WHEEL +0 -0
netra/__init__.py
CHANGED
|
@@ -88,7 +88,10 @@ class Netra:
|
|
|
88
88
|
Args:
|
|
89
89
|
session_id: Session identifier
|
|
90
90
|
"""
|
|
91
|
-
|
|
91
|
+
if session_id:
|
|
92
|
+
SessionManager.set_session_context("session_id", session_id)
|
|
93
|
+
else:
|
|
94
|
+
logger.warning("Session ID must be provided for setting session_id.")
|
|
92
95
|
|
|
93
96
|
@classmethod
|
|
94
97
|
def set_user_id(cls, user_id: str) -> None:
|
|
@@ -98,7 +101,10 @@ class Netra:
|
|
|
98
101
|
Args:
|
|
99
102
|
user_id: User identifier
|
|
100
103
|
"""
|
|
101
|
-
|
|
104
|
+
if user_id:
|
|
105
|
+
SessionManager.set_session_context("user_id", user_id)
|
|
106
|
+
else:
|
|
107
|
+
logger.warning("User ID must be provided for setting user_id.")
|
|
102
108
|
|
|
103
109
|
@classmethod
|
|
104
110
|
def set_tenant_id(cls, tenant_id: str) -> None:
|
|
@@ -108,7 +114,10 @@ class Netra:
|
|
|
108
114
|
Args:
|
|
109
115
|
user_account_id: User account identifier
|
|
110
116
|
"""
|
|
111
|
-
|
|
117
|
+
if tenant_id:
|
|
118
|
+
SessionManager.set_session_context("tenant_id", tenant_id)
|
|
119
|
+
else:
|
|
120
|
+
logger.warning("Tenant ID must be provided for setting tenant_id.")
|
|
112
121
|
|
|
113
122
|
@classmethod
|
|
114
123
|
def set_custom_attributes(cls, key: str, value: Any) -> None:
|
|
@@ -119,7 +128,10 @@ class Netra:
|
|
|
119
128
|
key: Custom attribute key
|
|
120
129
|
value: Custom attribute value
|
|
121
130
|
"""
|
|
122
|
-
|
|
131
|
+
if key and value:
|
|
132
|
+
SessionManager.set_session_context("custom_attributes", {key: value})
|
|
133
|
+
else:
|
|
134
|
+
logger.warning("Both key and value must be provided for custom attributes.")
|
|
123
135
|
|
|
124
136
|
@classmethod
|
|
125
137
|
def set_custom_event(cls, event_name: str, attributes: Any) -> None:
|
|
@@ -130,7 +142,10 @@ class Netra:
|
|
|
130
142
|
event_name: Name of the custom event
|
|
131
143
|
attributes: Attributes of the custom event
|
|
132
144
|
"""
|
|
133
|
-
|
|
145
|
+
if event_name and attributes:
|
|
146
|
+
SessionManager.set_custom_event(event_name, attributes)
|
|
147
|
+
else:
|
|
148
|
+
logger.warning("Both event_name and attributes must be provided for custom events.")
|
|
134
149
|
|
|
135
150
|
@classmethod
|
|
136
151
|
def start_span(
|
netra/version.py
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
2
|
-
|
|
1
|
+
__version__ = "0.1.16"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: netra-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.16
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
netra/__init__.py,sha256=
|
|
1
|
+
netra/__init__.py,sha256=8N0U8USfoep2rEnQEPyyFrd1nmuMgpmTSSTyugaW528,5376
|
|
2
2
|
netra/anonymizer/__init__.py,sha256=KeGPPZqKVZbtkbirEKYTYhj6aZHlakjdQhD7QHqBRio,133
|
|
3
3
|
netra/anonymizer/anonymizer.py,sha256=1VeYAsFpF_tYDlqJF-Q82-ZXGOR4YWBqrKUsRw3qOrA,3539
|
|
4
4
|
netra/anonymizer/base.py,sha256=ytPxHCUD2OXlEY6fNTuMmwImNdIjgj294I41FIgoXpU,5946
|
|
@@ -39,8 +39,8 @@ netra/scanner.py,sha256=wqjMZnEbVvrGMiUSI352grUyHpkk94oBfHfMiXPhpGU,3866
|
|
|
39
39
|
netra/session_manager.py,sha256=EVcnWcSj4NdkH--HmqHx0mmzivQiM4GCyFLu6lwi33M,6252
|
|
40
40
|
netra/span_wrapper.py,sha256=DA5jjXkHBUJ8_mdlYP06rcZzFoSih4gdP71Wwr3btcQ,8104
|
|
41
41
|
netra/tracer.py,sha256=In5QPVLz_6BxrolWpav9EuR9_hirD2UUIlyY75QUaKk,3450
|
|
42
|
-
netra/version.py,sha256=
|
|
43
|
-
netra_sdk-0.1.
|
|
44
|
-
netra_sdk-0.1.
|
|
45
|
-
netra_sdk-0.1.
|
|
46
|
-
netra_sdk-0.1.
|
|
42
|
+
netra/version.py,sha256=yF88-8vL8keLe6gCTumymw0UoMkWkSrJnzLru4zBCLQ,23
|
|
43
|
+
netra_sdk-0.1.16.dist-info/LICENCE,sha256=8B_UoZ-BAl0AqiHAHUETCgd3I2B9yYJ1WEQtVb_qFMA,11359
|
|
44
|
+
netra_sdk-0.1.16.dist-info/METADATA,sha256=5Cq-WcgwKPAsUaikTeP1qjO4MixYZ_VhLXSTvNJQpf0,25352
|
|
45
|
+
netra_sdk-0.1.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
46
|
+
netra_sdk-0.1.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|