netra-sdk 0.1.40__tar.gz → 0.1.41__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.

Files changed (56) hide show
  1. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/PKG-INFO +1 -1
  2. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/__init__.py +3 -3
  3. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/config.py +0 -7
  4. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/session_manager.py +6 -6
  5. netra_sdk-0.1.41/netra/version.py +1 -0
  6. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/pyproject.toml +1 -1
  7. netra_sdk-0.1.40/netra/version.py +0 -1
  8. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/LICENCE +0 -0
  9. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/README.md +0 -0
  10. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/anonymizer/__init__.py +0 -0
  11. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/anonymizer/anonymizer.py +0 -0
  12. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/anonymizer/base.py +0 -0
  13. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/anonymizer/fp_anonymizer.py +0 -0
  14. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/decorators.py +0 -0
  15. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/exceptions/__init__.py +0 -0
  16. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/exceptions/injection.py +0 -0
  17. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/exceptions/pii.py +0 -0
  18. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/input_scanner.py +0 -0
  19. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/__init__.py +0 -0
  20. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/aiohttp/__init__.py +0 -0
  21. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/aiohttp/version.py +0 -0
  22. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/cohere/__init__.py +0 -0
  23. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/cohere/version.py +0 -0
  24. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/fastapi/__init__.py +0 -0
  25. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/fastapi/version.py +0 -0
  26. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/google_genai/__init__.py +0 -0
  27. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/google_genai/config.py +0 -0
  28. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/google_genai/utils.py +0 -0
  29. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/google_genai/version.py +0 -0
  30. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/httpx/__init__.py +0 -0
  31. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/httpx/version.py +0 -0
  32. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/instruments.py +0 -0
  33. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/litellm/__init__.py +0 -0
  34. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/litellm/version.py +0 -0
  35. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/litellm/wrappers.py +0 -0
  36. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/mistralai/__init__.py +0 -0
  37. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/mistralai/config.py +0 -0
  38. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/mistralai/utils.py +0 -0
  39. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/mistralai/version.py +0 -0
  40. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/openai/__init__.py +0 -0
  41. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/openai/version.py +0 -0
  42. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/openai/wrappers.py +0 -0
  43. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/pydantic_ai/__init__.py +0 -0
  44. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/pydantic_ai/utils.py +0 -0
  45. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/pydantic_ai/version.py +0 -0
  46. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/pydantic_ai/wrappers.py +0 -0
  47. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/weaviate/__init__.py +0 -0
  48. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/instrumentation/weaviate/version.py +0 -0
  49. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/pii.py +0 -0
  50. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/processors/__init__.py +0 -0
  51. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/processors/instrumentation_span_processor.py +0 -0
  52. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/processors/scrubbing_span_processor.py +0 -0
  53. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/processors/session_span_processor.py +0 -0
  54. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/scanner.py +0 -0
  55. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/span_wrapper.py +0 -0
  56. {netra_sdk-0.1.40 → netra_sdk-0.1.41}/netra/tracer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: netra-sdk
3
- Version: 0.1.40
3
+ Version: 0.1.41
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
@@ -9,7 +9,7 @@ from opentelemetry.trace import SpanKind
9
9
 
10
10
  from netra.instrumentation.instruments import InstrumentSet, NetraInstruments
11
11
 
12
- from .config import Config, ConversationType
12
+ from .config import Config
13
13
 
14
14
  # Instrumentor functions
15
15
  from .instrumentation import init_instrumentations
@@ -249,13 +249,13 @@ class Netra:
249
249
  logger.warning("Both event_name and attributes must be provided for custom events.")
250
250
 
251
251
  @classmethod
252
- def add_conversation(cls, type: ConversationType, field_name: str, value: Any) -> None:
252
+ def add_conversation(cls, conversation_type: ConversationType, field_name: str, value: Any) -> None:
253
253
  """
254
254
  Append a conversation entry and set span attribute 'conversation' as an array.
255
255
  If a conversation array already exists for the current active span, this appends
256
256
  to it; otherwise, it initializes a new array.
257
257
  """
258
- SessionManager.add_conversation(type=type, field_name=field_name, value=value)
258
+ SessionManager.add_conversation(conversation_type=conversation_type, field_name=field_name, value=value)
259
259
 
260
260
  @classmethod
261
261
  def start_span(
@@ -1,6 +1,5 @@
1
1
  import json
2
2
  import os
3
- from enum import Enum
4
3
  from typing import Any, Dict, List, Optional
5
4
 
6
5
  from opentelemetry.util.re import parse_env_headers
@@ -8,12 +7,6 @@ from opentelemetry.util.re import parse_env_headers
8
7
  from netra.version import __version__
9
8
 
10
9
 
11
- class ConversationType(str, Enum):
12
- INPUT = "input"
13
- OUTPUT = "output"
14
- SYSTEM = "system"
15
-
16
-
17
10
  class Config:
18
11
  """
19
12
  Holds configuration options for the tracer:
@@ -262,7 +262,7 @@ class SessionManager:
262
262
  logger.exception(f"Failed to add custom event: {name} - {e}")
263
263
 
264
264
  @staticmethod
265
- def add_conversation(type: ConversationType, field_name: str, value: Any) -> None:
265
+ def add_conversation(conversation_type: ConversationType, field_name: str, value: Any) -> None:
266
266
  """
267
267
  Append a conversation entry and set span attribute 'conversation' as an array.
268
268
 
@@ -274,17 +274,17 @@ class SessionManager:
274
274
  """
275
275
 
276
276
  # Hard runtime validation of input types and values
277
- if not isinstance(type, ConversationType):
278
- raise TypeError("type must be a ConversationType enum value (input, output, system)")
279
- normalized_type = type.value
277
+ if not isinstance(conversation_type, ConversationType):
278
+ raise TypeError("conversation_type must be a ConversationType enum value (input, output, system)")
279
+ normalized_type = conversation_type.value
280
280
 
281
281
  if not isinstance(field_name, str):
282
282
  raise TypeError(f"field_name must be a string, got {type(field_name)}")
283
283
  if not field_name:
284
284
  raise ValueError("field_name must be a non-empty string")
285
285
 
286
- if value is None:
287
- raise ValueError("value must not be None")
286
+ if not value:
287
+ raise ValueError("value must not be empty")
288
288
 
289
289
  try:
290
290
  span = trace.get_current_span()
@@ -0,0 +1 @@
1
+ __version__ = "0.1.41"
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "netra-sdk"
7
- version = "0.1.40"
7
+ version = "0.1.41"
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.40"
File without changes
File without changes
File without changes
File without changes
File without changes