netra-sdk 0.1.33__tar.gz → 0.1.34__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.33 → netra_sdk-0.1.34}/PKG-INFO +1 -1
  2. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/tracer.py +32 -11
  3. netra_sdk-0.1.34/netra/version.py +1 -0
  4. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/pyproject.toml +1 -1
  5. netra_sdk-0.1.33/netra/version.py +0 -1
  6. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/LICENCE +0 -0
  7. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/README.md +0 -0
  8. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/__init__.py +0 -0
  9. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/anonymizer/__init__.py +0 -0
  10. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/anonymizer/anonymizer.py +0 -0
  11. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/anonymizer/base.py +0 -0
  12. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/anonymizer/fp_anonymizer.py +0 -0
  13. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/config.py +0 -0
  14. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/decorators.py +0 -0
  15. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/exceptions/__init__.py +0 -0
  16. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/exceptions/injection.py +0 -0
  17. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/exceptions/pii.py +0 -0
  18. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/input_scanner.py +0 -0
  19. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/__init__.py +0 -0
  20. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/aiohttp/__init__.py +0 -0
  21. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/aiohttp/version.py +0 -0
  22. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/cohere/__init__.py +0 -0
  23. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/cohere/version.py +0 -0
  24. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/fastapi/__init__.py +0 -0
  25. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/fastapi/version.py +0 -0
  26. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/google_genai/__init__.py +0 -0
  27. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/google_genai/config.py +0 -0
  28. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/google_genai/utils.py +0 -0
  29. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/google_genai/version.py +0 -0
  30. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/httpx/__init__.py +0 -0
  31. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/httpx/version.py +0 -0
  32. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/instruments.py +0 -0
  33. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/litellm/__init__.py +0 -0
  34. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/litellm/version.py +0 -0
  35. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/litellm/wrappers.py +0 -0
  36. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/mistralai/__init__.py +0 -0
  37. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/mistralai/config.py +0 -0
  38. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/mistralai/utils.py +0 -0
  39. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/mistralai/version.py +0 -0
  40. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/openai/__init__.py +0 -0
  41. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/openai/version.py +0 -0
  42. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/openai/wrappers.py +0 -0
  43. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/pydantic_ai/__init__.py +0 -0
  44. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/pydantic_ai/utils.py +0 -0
  45. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/pydantic_ai/version.py +0 -0
  46. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/pydantic_ai/wrappers.py +0 -0
  47. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/weaviate/__init__.py +0 -0
  48. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/instrumentation/weaviate/version.py +0 -0
  49. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/pii.py +0 -0
  50. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/processors/__init__.py +0 -0
  51. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/processors/instrumentation_span_processor.py +0 -0
  52. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/processors/scrubbing_span_processor.py +0 -0
  53. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/processors/session_span_processor.py +0 -0
  54. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/scanner.py +0 -0
  55. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/session_manager.py +0 -0
  56. {netra_sdk-0.1.33 → netra_sdk-0.1.34}/netra/span_wrapper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: netra-sdk
3
- Version: 0.1.33
3
+ Version: 0.1.34
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
@@ -62,19 +62,40 @@ class FilteringSpanExporter(SpanExporter): # type: ignore[misc]
62
62
  if name is None:
63
63
  filtered.append(s)
64
64
  continue
65
- if name in self._exact:
66
- continue
67
- blocked = False
68
- for pref in self._prefixes:
69
- if name.startswith(pref):
70
- blocked = True
71
- break
72
- if not blocked and self._suffixes:
73
- for suf in self._suffixes:
74
- if name.endswith(suf):
65
+ # Only apply blocked span patterns to root-level spans (no valid parent)
66
+ parent = getattr(s, "parent", None)
67
+ # Determine if the span has a valid parent. SpanContext.is_valid may be a property or method.
68
+ has_valid_parent = False
69
+ if parent is not None:
70
+ is_valid_attr = getattr(parent, "is_valid", None)
71
+ if callable(is_valid_attr):
72
+ try:
73
+ has_valid_parent = bool(is_valid_attr())
74
+ except Exception:
75
+ has_valid_parent = False
76
+ else:
77
+ has_valid_parent = bool(is_valid_attr)
78
+
79
+ is_root_span = parent is None or not has_valid_parent
80
+
81
+ if is_root_span:
82
+ # Apply name-based blocking only for root spans
83
+ if name in self._exact:
84
+ continue
85
+ blocked = False
86
+ for pref in self._prefixes:
87
+ if name.startswith(pref):
75
88
  blocked = True
76
89
  break
77
- if not blocked:
90
+ if not blocked and self._suffixes:
91
+ for suf in self._suffixes:
92
+ if name.endswith(suf):
93
+ blocked = True
94
+ break
95
+ if not blocked:
96
+ filtered.append(s)
97
+ else:
98
+ # Do not block child spans based on name
78
99
  filtered.append(s)
79
100
  if not filtered:
80
101
  return SpanExportResult.SUCCESS
@@ -0,0 +1 @@
1
+ __version__ = "0.1.34"
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "netra-sdk"
7
- version = "0.1.33"
7
+ version = "0.1.34"
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.33"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes