antithesis-query-logs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAntithesis Logs Explorer
Antithesis Logs Explorer
Purpose and Goal
用途与目标
Search across all timelines in an Antithesis test run to find events,
correlate property failures, and answer temporal questions about ordering
and causation — cascade elimination, fault correlation, root cause hypothesis
testing, and any "if X happened before Y" query.
The Logs Explorer is distinct from the per-example log viewer used in triage.
The triage log viewer shows one timeline centered on one event. The Logs
Explorer searches across ALL timelines in a run, supports temporal queries
(preceded by, not preceded by, followed by, not followed by), and visualizes
results on a multiverse map.
在Antithesis测试运行的所有时间线中进行搜索,以查找事件、关联属性失败,并解答关于顺序和因果关系的时序问题——包括排除连锁故障、关联故障、测试根因假设,以及任何“X是否发生在Y之前”的查询。
Logs Explorer 与分类排查(triage)中使用的单示例日志查看器不同。分类排查日志查看器仅显示以单个事件为中心的一条时间线,而Logs Explorer 会搜索一次运行中的所有时间线,支持时序查询(先于、不先于、后于、不后于),并在多元宇宙图谱(multiverse map)上可视化结果。
When to Use
使用场景
- Investigating whether a property failure is independent or a cascade from an earlier failure
- Counting how many independent occurrences of a failure exist across timelines
- Correlating failures with fault injection events
- Comparing failure patterns between backend configurations
- Identifying timeline clusters where failures co-occur
- 调查属性失败是独立故障还是由早期故障引发的连锁反应
- 统计跨时间线的独立故障发生次数
- 将故障与故障注入事件相关联
- 对比不同后端配置下的故障模式
- 识别故障共同发生的时间线集群
Prerequisites
前提条件
- A completed Antithesis run. If you don't have a specific run URL, use the
skill's run discovery workflow to find one first.
antithesis-triage - installed and authenticated to the Antithesis tenant
agent-browser
- 已完成的Antithesis测试运行。如果没有特定的运行URL,请先使用技能的运行发现工作流找到一个。
antithesis-triage - 已安装并完成Antithesis租户的身份验证
agent-browser
Key Concepts
核心概念
- Temporal query: Search for event X that is (or is not) preceded by or followed by event Y. Used to filter out cascade failures.
- Multiverse map: Visualization of the timeline tree. Failures appear as dots. Clusters of dots on related timelines suggest a shared root cause.
- Independent cluster count: The number of distinct timeline branches where a failure appears. "8 failures in 2 clusters" is much more informative than just "8 failures" — it tells you how many independent reproductions exist.
- Session ID: Each run has a unique session ID that scopes all queries. Queries against the wrong session return no results. The session ID is embedded in the encoded search URL parameter.
- Temporal query(时序查询):搜索事件X是否在事件Y之前(或不先于)、之后(或不后于)发生,用于过滤连锁故障。
- Multiverse map(多元宇宙图谱):时间线树的可视化展示,故障以圆点形式呈现。相关时间线上的圆点集群表明存在共同根因。
- Independent cluster count(独立集群数):出现故障的不同时间线分支数量。“2个集群中出现8次故障”比单纯的“8次故障”更有价值——它能告诉你有多少个独立的复现案例。
- Session ID(会话ID):每次运行都有唯一的会话ID,用于限定所有查询的范围。针对错误会话的查询将返回空结果。会话ID嵌入在编码后的搜索URL参数中。
Important: Field Names
重要提示:字段名称
The Logs Explorer uses singular field names, not plural:
- — the property/assertion name (NOT
assertion.message)assertions.message - —
assertion.statusorpassing(NOTfailing)assertions.status - — log output text
general.output_text
The field requires the operator, not
. Other text fields use .
assertion.statusmatchescontainscontainsLogs Explorer 使用单数字段名称,而非复数:
- — 属性/断言名称(不是
assertion.message)assertions.message - —
assertion.status或passing(不是failing)assertions.status - — 日志输出文本
general.output_text
assertion.statusmatchescontainscontainsSession Setup
会话设置
Use with the shared Antithesis authentication:
agent-browserSESSION="logs-explorer-$(date +%s)-$$"
agent-browser --session "$SESSION" --session-name antithesis --profile antithesis --args "--no-sandbox"使用及共享的Antithesis身份验证:
agent-browserSESSION="logs-explorer-$(date +%s)-$$"
agent-browser --session "$SESSION" --session-name antithesis --profile antithesis --args "--no-sandbox"Launching the Logs Explorer
启动Logs Explorer
There are three ways to reach the Logs Explorer with the correct run selected:
有三种方式可以打开Logs Explorer并选择正确的测试运行:
Method 1: From a triage report (preferred)
方法1:从分类排查报告进入(推荐)
Navigate to the triage report first, then extract the "Explore logs" link.
This is the most reliable method because the link contains the correct session
ID already encoded in the URL.
bash
agent-browser --session "$SESSION" eval \
"document.querySelector('a.an-button[href*=\"/search\"]').href"Navigate to the returned URL. This automatically sets the correct session/run.
The URL will have the form:
https://{tenant}.antithesis.com/search?search=v5v{base64_encoded_query}The prefix is a version marker. The base64 payload contains the query
JSON including the session ID ( field). See
for the full query JSON format.
v5vsreferences/query-builder.md先导航到分类排查报告,然后提取“Explore logs”链接。这是最可靠的方法,因为链接中已包含编码好的正确会话ID。
bash
agent-browser --session "$SESSION" eval \
"document.querySelector('a.an-button[href*=\"/search\"]').href"导航到返回的URL,系统会自动设置正确的会话/测试运行。
URL格式如下:
https://{tenant}.antithesis.com/search?search=v5v{base64_encoded_query}v5vsreferences/query-builder.mdMethod 2: From the Logs Explorer directly
方法2:直接从Logs Explorer进入
The Logs Explorer page has a "Show me logs from" dropdown at the top
(). Click it to see a list
of recent runs with their name, status (In progress / Completed / Incomplete),
and timestamp. Select the run you want.
div.select_container.event_search_run_selectorIf a run you expect to see is missing, refresh the page.
Logs Explorer页面顶部有一个“Show me logs from”下拉菜单()。点击它可以查看最近的测试运行列表,包含运行名称、状态(进行中/已完成/未完成)和时间戳。选择你需要的运行。
div.select_container.event_search_run_selector如果预期的运行未显示,请刷新页面。
Method 3: From the sidebar
方法3:从侧边栏进入
Click "Logs explorer" in the left sidebar navigation. This goes directly to
with no run pre-selected. Then use
the "Show me logs from" dropdown to choose a run.
https://{tenant}.antithesis.com/searchbash
agent-browser --session "$SESSION" open "https://{tenant}.antithesis.com/search"Important: Always ensure the correct run is selected before searching.
Each run has its own session ID — queries against the wrong session return
no results. The selected run is shown in the dropdown at the top of the page.
点击左侧导航栏中的“Logs explorer”,直接进入,此时未预先选择测试运行。然后使用“Show me logs from”下拉菜单选择运行。
https://{tenant}.antithesis.com/searchbash
agent-browser --session "$SESSION" open "https://{tenant}.antithesis.com/search"重要提示:搜索前务必确保选择了正确的测试运行。每个运行都有自己的会话ID——针对错误会话的查询将返回空结果。页面顶部的下拉菜单会显示当前选中的运行。
Reference Files
参考文件
| Reference | When to read |
|---|---|
| Building and executing search queries |
| Using preceded-by / not-preceded-by filters |
| Reading search results and clicking into details |
| Using the multiverse map for cluster analysis |
| 参考文件 | 阅读场景 |
|---|---|
| 构建并执行搜索查询 |
| 使用先于/不先于过滤器 |
| 读取搜索结果并查看详情 |
| 使用多元宇宙图谱进行集群分析 |
Runtime Injection
运行时注入
Inject into the Logs Explorer page:
assets/antithesis-query-logs.jsbash
cat assets/antithesis-query-logs.js \
| agent-browser --session "$SESSION" eval --stdinThe runtime registers two objects:
- — standalone URL construction helpers. Available on any page after injection. Use this when building a search URL before navigating to the Logs Explorer.
window.__antithesisQueryBuilder - — full runtime with URL builders, UI interaction methods, and result-reading methods.
window.__antithesisQueryLogs
URL construction is the preferred approach for executing queries
programmatically, because UI interaction (clicking dropdowns, targeting rows)
is fragile with the query builder's dynamic DOM.
Important: You must inject the runtime before calling any
or method.
If you get , inject first.
window.__antithesisQueryBuilderwindow.__antithesisQueryLogsTypeError: Cannot read properties of undefined将注入到Logs Explorer页面:
assets/antithesis-query-logs.jsbash
cat assets/antithesis-query-logs.js \
| agent-browser --session "$SESSION" eval --stdin注入后会注册两个对象:
- — 独立的URL构建工具,注入后在任何页面都可用。适用于在导航到Logs Explorer之前构建搜索URL。
window.__antithesisQueryBuilder - — 完整的运行时工具,包含URL构建器、UI交互方法和结果读取方法。
window.__antithesisQueryLogs
推荐使用URL构建方式以程序化执行查询,因为UI交互(点击下拉菜单、定位行)在查询构建器的动态DOM环境中容易出错。
重要提示:调用任何或方法之前,必须先注入运行时。如果出现错误,请先执行注入操作。
window.__antithesisQueryBuilderwindow.__antithesisQueryLogsTypeError: Cannot read properties of undefinedRecommended Workflows
推荐工作流
Cascade elimination
排除连锁故障
- Navigate to the triage report for the run
- Inject (required before using any builder methods)
assets/antithesis-query-logs.js - Extract the session ID from the "Explore logs" link (see query-builder.md)
- Build a simple query URL using
window.__antithesisQueryBuilder.buildFailureQueryUrl(sessionId, "my-failing-property") - Navigate to the URL and note the result count
- Build a temporal query URL using
window.__antithesisQueryBuilder.buildNotPrecededByUrl(sessionId, "my-failing-property", "assertion.message", "suspected-upstream-failure") - Navigate to the temporal URL and note the new count
- If the count drops, the difference is cascade failures
- If the count stays the same, the failures are independent
- 导航到该测试运行的分类排查报告
- 注入(使用任何构建方法前必须执行此步骤)
assets/antithesis-query-logs.js - 从“Explore logs”链接中提取会话ID(参考query-builder.md)
- 使用构建简单查询URL
window.__antithesisQueryBuilder.buildFailureQueryUrl(sessionId, "my-failing-property") - 导航到该URL并记录结果数量
- 使用构建时序查询URL
window.__antithesisQueryBuilder.buildNotPrecededByUrl(sessionId, "my-failing-property", "assertion.message", "suspected-upstream-failure") - 导航到时序查询URL并记录新的结果数量
- 如果数量减少,差值即为连锁故障的数量
- 如果数量不变,则说明故障是独立的
Failure correlation with event details
故障与事件详情关联
- Search for a property failure
- Expand the details on several results
{} - Identify detail fields that vary across results (e.g., configuration modes, feature flags, container names, protocol versions)
- Note whether failures cluster on a specific detail value — if all failures share a common detail that other passing events do not, that detail is likely part of the root cause
- 搜索某一属性的故障
- 展开多个结果中的详情
{} - 识别结果间存在差异的详情字段(例如:配置模式、功能标志、容器名称、协议版本)
- 查看故障是否集中在某个特定详情值上——如果所有故障都共享一个其他成功事件没有的详情值,该详情值很可能是根因的一部分
Independent cluster analysis
独立集群分析
- Search for a property failure
- Switch to the Map tab
- Count the number of distinct timeline branches with failure dots
- Failures on the same branch are likely the same root cause
- Pick one representative from each cluster for investigation
- 搜索某一属性的故障
- 切换到“Map”标签页
- 统计带有故障圆点的不同时间线分支数量
- 同一分支上的故障很可能有相同的根因
- 从每个集群中选择一个代表性案例进行调查
Output
输出内容
- Event counts (total matches, matches after temporal filtering)
- Event details (timestamp, timeline, assertion details and custom key-value pairs)
- Cluster count from the multiverse map
- Log context around each failure (fault events, preceding operations)
- 事件计数(总匹配数、时序过滤后的匹配数)
- 事件详情(时间戳、时间线、断言详情和自定义键值对)
- 多元宇宙图谱中的集群数量
- 每个故障的日志上下文(故障事件、前置操作)