opentelemetry_span_log
在 ClickHouse Cloud 中查询
此系统表中的数据本地保存在 ClickHouse Cloud 的每个节点上。因此,要获得所有数据的完整视图,需要使用 clusterAllReplicas
函数。有关更多详细信息,请点击此处。
包含有关已执行查询的 trace spans 的信息。
列
trace_id
(UUID) — 已执行查询的跟踪 ID。span_id
(UInt64) —trace span
的 ID。parent_span_id
(UInt64) — 父trace span
的 ID。operation_name
(String) — 操作的名称。kind
(Enum8) — span 的 SpanKind。INTERNAL
— 表示 span 代表应用程序内部的操作。SERVER
— 表示 span 涵盖同步 RPC 或其他远程请求的服务器端处理。CLIENT
— 表示 span 描述对某些远程服务的请求。PRODUCER
— 表示 span 描述异步请求的发起者。此父 span 通常会在相应的子 CONSUMER span 结束之前结束,甚至可能在子 span 启动之前。CONSUMER
- 表示 span 描述异步 PRODUCER 请求的子级。
start_time_us
(UInt64) —trace span
的开始时间(以微秒为单位)。finish_time_us
(UInt64) —trace span
的完成时间(以微秒为单位)。finish_date
(Date) —trace span
的完成日期。attribute.names
(Array(String)) — 取决于trace span
的 Attribute 名称。它们根据 OpenTelemetry 标准中的建议填写。attribute.values
(Array(String)) — 取决于trace span
的属性值。它们根据OpenTelemetry
标准中的建议填写。
示例
查询
SELECT * FROM system.opentelemetry_span_log LIMIT 1 FORMAT Vertical;
结果
Row 1:
──────
trace_id: cdab0847-0d62-61d5-4d38-dd65b19a1914
span_id: 701487461015578150
parent_span_id: 2991972114672045096
operation_name: DB::Block DB::InterpreterSelectQuery::getSampleBlockImpl()
kind: INTERNAL
start_time_us: 1612374594529090
finish_time_us: 1612374594529108
finish_date: 2021-02-03
attribute.names: []
attribute.values: []
另请参阅