From 7753980f54274758b70e16ec7de70d3c2233b7a3 Mon Sep 17 00:00:00 2001 From: Nithish-KV Date: Fri, 13 Mar 2026 15:58:21 +0530 Subject: [PATCH 1/3] [NET-432] fix: Update block_instruments to correctly block Redis and SQLAlchemy --- netra/instrumentation/__init__.py | 2 ++ netra/processors/instrumentation_span_processor.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/netra/instrumentation/__init__.py b/netra/instrumentation/__init__.py index 49f27ae..a3b0fdb 100644 --- a/netra/instrumentation/__init__.py +++ b/netra/instrumentation/__init__.py @@ -61,6 +61,8 @@ def init_instrumentations( Instruments.MISTRAL, Instruments.OPENAI, Instruments.GROQ, + Instruments.REDIS, + Instruments.PYMYSQL } ) diff --git a/netra/processors/instrumentation_span_processor.py b/netra/processors/instrumentation_span_processor.py index 6b85d1f..23d9168 100644 --- a/netra/processors/instrumentation_span_processor.py +++ b/netra/processors/instrumentation_span_processor.py @@ -116,10 +116,10 @@ def _wrap_set_attribute(self, span: Span) -> None: """ original_set_attribute: SetAttributeFunc = span.set_attribute instrumentation_name = self._extract_instrumentation_name(span) - is_httpx = self._is_httpx_instrumentation(instrumentation_name) + # is_httpx = self._is_httpx_instrumentation(instrumentation_name) - if is_httpx: - self._check_and_mark_blocked_url(span, original_set_attribute) + # if is_httpx: + self._check_and_mark_blocked_url(span, original_set_attribute) def wrapped_set_attribute(key: str, value: Any) -> None: self._handle_set_attribute( From 3a14d885eb09b3bc080dad8f7b96a34cbc7fdb4a Mon Sep 17 00:00:00 2001 From: Nithish-KV Date: Fri, 13 Mar 2026 16:05:42 +0530 Subject: [PATCH 2/3] Update httpx check based blocking --- netra/processors/instrumentation_span_processor.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/netra/processors/instrumentation_span_processor.py b/netra/processors/instrumentation_span_processor.py index 23d9168..35e9c81 100644 --- a/netra/processors/instrumentation_span_processor.py +++ b/netra/processors/instrumentation_span_processor.py @@ -126,7 +126,6 @@ def wrapped_set_attribute(key: str, value: Any) -> None: key=key, value=value, original_set_attribute=original_set_attribute, - is_httpx=is_httpx, ) setattr(span, "set_attribute", wrapped_set_attribute) @@ -136,7 +135,6 @@ def _handle_set_attribute( key: str, value: Any, original_set_attribute: SetAttributeFunc, - is_httpx: bool, ) -> None: """Handles a set_attribute call with truncation and URL blocking. @@ -147,7 +145,7 @@ def _handle_set_attribute( is_httpx: Whether this is an HTTPX instrumentation span. """ try: - if is_httpx and key in _URL_ATTRIBUTE_KEYS: + if key in _URL_ATTRIBUTE_KEYS: self._mark_blocked_if_internal_url(original_set_attribute, value) truncated_value = self._truncate_value(value) From c621791a6fd17f1f37448533e7093b1d0629659f Mon Sep 17 00:00:00 2001 From: Nithish-KV Date: Fri, 13 Mar 2026 16:14:01 +0530 Subject: [PATCH 3/3] Update sdk version --- CHANGELOG.md | 12 +++++++++--- netra/version.py | 2 +- pyproject.toml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d18336d..467df46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning. -## [0.1.74] - 2026-10-14 +## [0.1.75] - 2026-03-13 + +- Update block instrument functionality to correctly block Redis and SQLAlchemy +- Remove httpx based check for blocking url + + +## [0.1.74] - 2026-03-13 - Add utility for prompt management -## [0.1.73] - 2026-10-14 +## [0.1.73] - 2026-03-12 - Extended dependency support for opentelemetry and traceloop-sdk - Added TTFT for Cerebras and Groq instrumentation @@ -200,4 +206,4 @@ The format is based on Keep a Changelog and this project adheres to Semantic Ver - Added utility to set input and output data for any active span in a trace -[0.1.74]: https://github.com/KeyValueSoftwareSystems/netra-sdk-py/tree/main +[0.1.75]: https://github.com/KeyValueSoftwareSystems/netra-sdk-py/tree/main diff --git a/netra/version.py b/netra/version.py index a52a5aa..0077fa1 100644 --- a/netra/version.py +++ b/netra/version.py @@ -1 +1 @@ -__version__ = "0.1.74" +__version__ = "0.1.75" diff --git a/pyproject.toml b/pyproject.toml index e902228..29c7031 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [project] name = "netra-sdk" -version = "0.1.74" +version = "0.1.75" 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." authors = [ {name = "Sooraj Thomas",email = "sooraj@keyvalue.systems"}