netra-sdk 0.1.38__tar.gz → 0.1.39__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.38 → netra_sdk-0.1.39}/PKG-INFO +1 -1
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/processors/instrumentation_span_processor.py +0 -1
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/session_manager.py +0 -19
- netra_sdk-0.1.39/netra/version.py +1 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/pyproject.toml +1 -1
- netra_sdk-0.1.38/netra/version.py +0 -1
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/LICENCE +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/README.md +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/anonymizer/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/anonymizer/anonymizer.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/anonymizer/base.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/anonymizer/fp_anonymizer.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/config.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/decorators.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/exceptions/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/exceptions/injection.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/exceptions/pii.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/input_scanner.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/aiohttp/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/aiohttp/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/cohere/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/cohere/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/fastapi/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/fastapi/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/google_genai/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/google_genai/config.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/google_genai/utils.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/google_genai/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/httpx/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/httpx/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/instruments.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/litellm/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/litellm/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/litellm/wrappers.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/mistralai/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/mistralai/config.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/mistralai/utils.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/mistralai/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/openai/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/openai/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/openai/wrappers.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/pydantic_ai/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/pydantic_ai/utils.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/pydantic_ai/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/pydantic_ai/wrappers.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/weaviate/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/instrumentation/weaviate/version.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/pii.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/processors/__init__.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/processors/scrubbing_span_processor.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/processors/session_span_processor.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/scanner.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/netra/span_wrapper.py +0 -0
- {netra_sdk-0.1.38 → netra_sdk-0.1.39}/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.39
|
|
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
|
|
@@ -89,7 +89,6 @@ class InstrumentationSpanProcessor(SpanProcessor): # type: ignore[misc]
|
|
|
89
89
|
|
|
90
90
|
# Set this span's instrumentation name
|
|
91
91
|
name = self._detect_raw_instrumentation_name(span)
|
|
92
|
-
print(name)
|
|
93
92
|
if name in ALLOWED_INSTRUMENTATION_NAMES:
|
|
94
93
|
span.set_attribute(f"{Config.LIBRARY_NAME}.instrumentation.name", name)
|
|
95
94
|
except Exception:
|
|
@@ -225,26 +225,7 @@ class SessionManager:
|
|
|
225
225
|
ctx = baggage.set_baggage("user_id", value, ctx)
|
|
226
226
|
elif session_key == "tenant_id":
|
|
227
227
|
ctx = baggage.set_baggage("tenant_id", value, ctx)
|
|
228
|
-
elif isinstance(value, dict) and value:
|
|
229
|
-
if session_key == "custom_attributes":
|
|
230
|
-
custom_keys = list(value.keys())
|
|
231
|
-
ctx = baggage.set_baggage("custom_keys", ",".join(custom_keys), ctx)
|
|
232
|
-
for key, val in value.items():
|
|
233
|
-
ctx = baggage.set_baggage(f"custom.{key}", str(val), ctx)
|
|
234
|
-
|
|
235
|
-
# Decide whether to attach globally. We only attach if there is no
|
|
236
|
-
# active recording span (safe point) or if the caller forces it.
|
|
237
|
-
current_span = trace.get_current_span()
|
|
238
|
-
has_active_span = bool(current_span and getattr(current_span, "is_recording", lambda: False)())
|
|
239
|
-
if attach_globally or not has_active_span:
|
|
240
228
|
otel_context.attach(ctx)
|
|
241
|
-
else:
|
|
242
|
-
# Best-effort: annotate the current span for observability
|
|
243
|
-
if isinstance(value, str) and value:
|
|
244
|
-
current_span.set_attribute(f"{Config.LIBRARY_NAME}.session.{session_key}", value)
|
|
245
|
-
elif isinstance(value, dict) and value and session_key == "custom_attributes":
|
|
246
|
-
for key, val in value.items():
|
|
247
|
-
current_span.set_attribute(f"{Config.LIBRARY_NAME}.session.custom.{key}", str(val))
|
|
248
229
|
except Exception as e:
|
|
249
230
|
logger.exception(f"Failed to set session context for key={session_key}: {e}")
|
|
250
231
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.39"
|
|
@@ -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.39"
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.38"
|
|
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
|
|
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
|