viewTraceInfo

Syntax

viewTraceInfo(traceId, [isTreeView=true])

Arguments

traceId is a STRING indicating the ID of a trace. Get the trace ID of a script with getTraces.

isTreeView is a Boolean indicating whether to display the tracing information in tree view. The default value is true. Otherwise, the information is displayed in plain list.

Details

Display the tracing information of a trace. Return a table with the following columns:

  • [when isTreeView = true] tree: the execution process of the script in tree structure where each tree node is a span (the primary building block of a distributed trace, representing an individual unit of work done in a distributed system).

  • [when isTreeView = false] name: the name of the spans of the trace.

  • startTime: the timestamp (in nanoseconds) at which the span execution started.

  • timeElapsed: the duration of the span execution in miliseconds

  • reference: the relationship between the current span and its parent span. There are three types of references:

    • Root: the root node of the trace. It indicates that the server received the client request. Rood node does not have a parent.

    • ChildOf: indicates that the parent span depends on the result of the current span. This reference type indicates that the current span is executed synchronously.

    • FollowsFrom: indicates that the current span merely follows from its parent span in a causal sense and the parent span does not depend on the result of its child. This reference type indicates that the child span is executed asynchronously (e.g., added to a queue for execution, network requests, etc.).

    • node: the alias of the node on which the span is executed.

Span operation reference:

Operation Description
Worker::run Upon receiving a request, the server adds it to the queue for a worker thread to process it.
Tokenizer::tokenize Perform lexical analysis on the script contained in the request to get a stream of lexical tokens for subsequent syntactic parsing.
Parser::parse Perform syntactic parsing on the script in the request to get executable statements.
Statement::execute A line of executable statement in the script.
SQLQueryImp::getReference Execute SQL query.
SQLQueryImp::partitionedCall Query a partitioned table. The system will break down the query into tasks and send them to the corresponding data nodes for execution. Usually seen in distributed queries.
SQLQueryImp::simpleCall Perform a simple query that doesn't contain operations such as "group by", "context by", and "croup by". Usually seen in queries on an in-memory table.
SQLQueryImp::basicCall Read data from the storage engine.
StaticStageExecutor::execute[probing] The probing process before the execution of a distributed query. A query submitted by the client will be broken down into multiple tasks. Some of the tasks are executed on the local node while others are sent to other nodes based on where the associated data is stored. When there are a large number of tasks to be sent to a remote node, the system will send them in groups.During the probing phase, the system sends one task to a remote node to detect the memory usage of the task result, thus estimating the total memory usage of the query result. If the total memory usage exceeds memLimitOfQueryResult, an exception is thrown; otherwise, the system determines the number of tasks per group to send to each remote node based on the memory usage of the single task result and the specified memLimiteOfTaskGroupResult.
StaticStageExecutor::execute[remote] The process of executing tasks on a remote node, including network calls and remote executions.
StaticStageExecutor::execute[local] The process of local execution by the worker thread.
StaticStageExecutor::execute[localExecutor] The process of local execution by local executors on the local node, including the enqueue and dequeue of tasks and the execution of them.
GOContainer::addRemoteTask Send a task to a remote node. Note that this operation only involves the sending process and does not include the execution on the remote node or the node response.
LocalExecutor::run The process of local execution by a single local executor on the local node.
TableJoiner::getReference Perform a table join operation
GroupByEngine::getReference Perform a "group by" operation
ContextByEngine::getReference Perform a "context by" operation
PivotByEngine::getReference Perform a "pivot by" operation

Examples

viewTraceInfo("c87ffe02-0c93-1db0-8e4f-b5416cce0207", true);
tree startTime timeElapsed reference node
receiving request 2022.09.16T07:32:52.623285503 41 Root server11352
└── Worker::run 2022.09.16T07:32:52.623691618 24398 FollowsFrom server11352
├── Tokenizer::tokenize 2022.09.16T07:32:52.623849180 209 ChildOf server11352
├── Parser::parse 2022.09.16T07:32:52.624090363 478 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.624599228 1387 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.625718380 6 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.625756761 114 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.625781752 87 ChildOf server11352
│ └── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.625808326 104 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.626015033 9461 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.626538703 4 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.626567940 115 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.626596674 85 ChildOf server11352
│ ├── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.626621946 4089 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.630774139 7 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.630801046 96 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.630823932 67 ChildOf server11352
│ ├── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.630847597 690 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.635124144 9 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.635152711 251 ChildOf server11352
│ │ └── LocalExecutor::run 2022.09.16T07:32:52.635328967 48 FollowsFrom server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.635172504 223 ChildOf server11352
│ └── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.635192260 228 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.635503439 17 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.635541133 188 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.635761687 96 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.635883399 54 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.635962473 53 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.636041994 245 ChildOf server11352
│ └── SQLQueryImp::getReference 2022.09.16T07:32:52.636074115 188 ChildOf server11352
│ └── SQLQueryImp::simpleCall 2022.09.16T07:32:52.636161408 83 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.636312743 2974 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.636707659 7 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.636766689 112 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.636799962 73 ChildOf server11352
│ └── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.636824683 987 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.639320281 2922 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.639642957 7 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.639669763 102 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.639694611 71 ChildOf server11352
│ ├── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.639718803 588 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.642044718 5 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.642059997 47 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.642069963 33 ChildOf server11352
│ └── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.642079697 42 ChildOf server11352
├── Statement::execute 2022.09.16T07:32:52.642256736 5650 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.642795248 4 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.642810900 55 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.642820428 42 ChildOf server11352
│ └── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.642838446 2682 ChildOf server11352
│ ├── StaticStageExecutor::execute[probing] 2022.09.16T07:32:52.643259902 4 ChildOf server11352
│ ├── StaticStageExecutor::execute[localExecutor] 2022.09.16T07:32:52.643273979 54 ChildOf server11352
│ ├── StaticStageExecutor::execute[remote] 2022.09.16T07:32:52.643283993 39 ChildOf server11352
│ └── StaticStageExecutor::execute[local] 2022.09.16T07:32:52.643294465 107 ChildOf server11352
└── Statement::execute 2022.09.16T07:32:52.647935505 105 ChildOf server11352