Убрал текущий трейс из ссылок

This commit is contained in:
2026-04-30 10:25:35 +03:00
parent 238c65c9c2
commit 9eb7282437
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "plba" name = "plba"
version = "0.3.6" version = "0.3.7"
description = "Platform runtime for business applications" description = "Platform runtime for business applications"
readme = "README.md" readme = "README.md"
requires-python = ">=3.11" requires-python = ">=3.11"
+1 -1
View File
@@ -260,7 +260,7 @@ class TraceResponseRenderer:
return f"{record.message}, {json.dumps(record.attrs_json, ensure_ascii=False, separators=(',', ':'))}" return f"{record.message}, {json.dumps(record.attrs_json, ensure_ascii=False, separators=(',', ':'))}"
def _related_trace_links(self, trace_view: TraceLogView, request: TraceQueryRequest) -> str: def _related_trace_links(self, trace_view: TraceLogView, request: TraceQueryRequest) -> str:
links = [self._trace_link_item("current", trace_view.trace_id, request)] links: list[str] = []
if trace_view.parent_id: if trace_view.parent_id:
links.append(self._trace_link_item("parent", trace_view.parent_id, request)) links.append(self._trace_link_item("parent", trace_view.parent_id, request))
links.extend(self._trace_link_item("child", child_id, request) for child_id in trace_view.child_ids) links.extend(self._trace_link_item("child", child_id, request) for child_id in trace_view.child_ids)
+1 -1
View File
@@ -208,7 +208,7 @@ def test_trace_endpoint_returns_html_page_with_related_links() -> None:
assert "filtered suspicious ticker" in response.text assert "filtered suspicious ticker" in response.text
assert "2026-04-28T10:11:12+00:00 | INFO | ok" in response.text assert "2026-04-28T10:11:12+00:00 | INFO | ok" in response.text
assert "2026-04-28T10:11:12+00:00 | WARNING | degraded" in response.text assert "2026-04-28T10:11:12+00:00 | WARNING | degraded" in response.text
assert 'href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' not in response.text
assert 'href="/traces/parent-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/parent-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text
assert 'href="/traces/child-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/child-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text
assert 'href="/traces/child-2?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/child-2?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text