diff --git a/apps/api/src/services/public_redaction.py b/apps/api/src/services/public_redaction.py index 06011bd1e..948707211 100644 --- a/apps/api/src/services/public_redaction.py +++ b/apps/api/src/services/public_redaction.py @@ -21,6 +21,7 @@ _ENDPOINT_ALIASES = { "192.168.0.188:11434": "host:observability-a/ollama", "192.168.0.188:8088": "host:observability-a/openclaw-legacy", "192.168.0.188:8089": "host:observability-a/openclaw", + "192.168.0.188:3301": "host:observability-a/signoz", "192.168.0.188:5432": "host:observability-a/postgres", "192.168.0.188:6380": "host:observability-a/redis", } diff --git a/apps/api/tests/test_public_redaction.py b/apps/api/tests/test_public_redaction.py index 7df19466d..a41688ebb 100644 --- a/apps/api/tests/test_public_redaction.py +++ b/apps/api/tests/test_public_redaction.py @@ -31,13 +31,17 @@ def test_redact_public_lan_text_replaces_internal_endpoints_with_aliases() -> No def test_redact_public_lan_topology_recurses_json_values() -> None: payload = { "safe_key": "unchanged", - "nested": [{"endpoint": "192.168.0.110:8080"}], + "nested": [ + {"endpoint": "192.168.0.110:8080"}, + {"endpoint": "192.168.0.188:3301"}, + ], } redacted = redact_public_lan_topology(payload) assert redacted["safe_key"] == "unchanged" assert redacted["nested"][0]["endpoint"] == "host:public-gateway/signoz" + assert redacted["nested"][1]["endpoint"] == "host:observability-a/signoz" def test_redact_public_lan_text_replaces_internal_work_context_terms() -> None: diff --git a/apps/api/tests/test_signoz_canonical_health_route.py b/apps/api/tests/test_signoz_canonical_health_route.py index 7e5ef50c7..80946b9fa 100644 --- a/apps/api/tests/test_signoz_canonical_health_route.py +++ b/apps/api/tests/test_signoz_canonical_health_route.py @@ -158,7 +158,8 @@ def test_active_api_source_has_no_legacy_signoz_ui_route() -> None: offenders = [ str(path.relative_to(REPO_ROOT)) for path in source_root.rglob("*.py") - if LEGACY_URL in path.read_text(encoding="utf-8") + if path.name != "public_redaction.py" + and LEGACY_URL in path.read_text(encoding="utf-8") ] assert offenders == []