Убрал текущий трейс из ссылок
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "plba"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
description = "Platform runtime for business applications"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
|
||||
@@ -260,7 +260,7 @@ class TraceResponseRenderer:
|
||||
return f"{record.message}, {json.dumps(record.attrs_json, ensure_ascii=False, separators=(',', ':'))}"
|
||||
|
||||
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:
|
||||
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)
|
||||
|
||||
@@ -208,7 +208,7 @@ def test_trace_endpoint_returns_html_page_with_related_links() -> None:
|
||||
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 | 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/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
|
||||
|
||||
Reference in New Issue
Block a user