← Back to Technical blog

Technical article

Where Does a Data Question Slow Down? End-to-End Tracing and Observability for HENGSHI Agentic BI

Connect execution logs, queries, and chart delivery around analytics tasks to review latency, metric definitions, and permissions in Agentic BI.

Nov 9, 2026Technical blogHENGSHI11 min read
Agentic BIObservabilityTracing

Article body

Full article

Agentic BI turns business questions into analytics tasks that can be executed and reviewed. In HENGSHI’s analytics architecture, HENGSHI SENSE provides data models, metrics, HQL, and visualization assets. Data Agent handles intent understanding, resource selection, and analytics tool calls, ultimately producing charts and interpretations. End-to-end tracing and observability need to cover this complete task chain: what each step used, how far execution progressed, how long it took, and whether the result met the business requirement.

Observation path: business goals and definitions → resource selection and authorization → model and tool collaboration → query execution → charts and analytical delivery → status feedback and review. This is an observational view of an analytics task. Actual steps may branch, repeat, or depend on one another, varying with the operating mode, data sources, and integration method.

1. Observe the Complete Analytics Task

An analysis may involve several rounds of resource retrieval, model reasoning, and tool execution. Observability should record latency, failures, and retries while helping teams verify the metrics, data scope, and execution identity used. The start of an answer, the return of data, chart availability, and completion of analytical delivery should be separate observation points. One total duration cannot explain their differences.

StageWhat to establishEvidence to collect first
Resource and semantic retrievalWhether relevant datasets, metrics, and business knowledge were found, and whether the same resources were repeatedly sought.Resource selection and tool-call information in execution logs.
Intent and conditionsWhether time, organization, dimensions, and calculation definitions were clear, and whether ambiguity caused repeated clarification or retries.The original question, current page, follow-up conditions, and model configuration.
Identity and authorizationWhich identity the request used, and which resources and data it could access.The actual account, application data-permission mode, and rejection information.
Query generationWhether suitable HQL or metric queries were generated, with invalid calls or repeated corrections.Query and error information available in execution records.
Query executionWhether data sources, acceleration engines, or complex calculations took time, and whether filters were effective.Available SQL, execution plans, and data-source records.
Results and presentationWhether results had returned, interpretation was still being generated, or charts and pages were too heavy.Network-request completion, result size, and browser behavior.

Stages can repeat, overlap, or depend on one another. Tracing should show the relationship between tasks and calls, separate waiting from execution and retry overhead, and then identify the critical path. Parallel execution must follow actual dependencies. Data should not be fetched early merely to reduce waiting when permissions and query conditions are still unresolved.

2. Connect Tasks, Stages, and Execution Evidence

Task Correlation Is the Foundation

An integration should agree on task or request identifiers and associate the available stage records, tool calls, and query information. Preserve parent-child relationships and time boundaries for cross-service calls under your control, then correlate them with the execution logs actually available from HENGSHI. The correlation scope depends on the interfaces and deployment capabilities in use.

  • Task level: record the business goal, entry point, execution identity, and explicit completion criteria, making the expected delivery clear.
  • Stage level: record start and end times, success or failure, retries, and reasons, distinguishing waiting from execution.
  • Object and dependency level: associate relevant metrics, datasets, tools, and outputs, and explain dependencies so that calculation definitions and the critical path can be reviewed.

Collect Q&A Execution Records First

For failed or abnormal data Q&A, HENGSHI’s public manuals describe three troubleshooting materials: execution logs in conversation cards, abnormal responses in the browser’s Fetch/XHR requests, and logs exported after an administrator temporarily enables system debugging. These help inspect the Q&A process, interface responses, and server operation respectively. Include the time, entry point, and reproduction steps when collecting them.

The same question can run under different conditions at different entry points. First hold the account, page, and session constant and obtain a repeatable reproduction. Then change the model, data scope, or prompt. This makes it possible to attribute differences without combining several changes into one tuning attempt.

Then Inspect the Queries Actually Executed

For analyses that produce charts, HENGSHI provides entry points for viewing SQL and explain execution plans. Analysts can inspect time conditions, joins, and aggregate expressions, then use data-source execution evidence to assess changes to models, indexes, or computation paths. This capability applies to the relevant chart and query entry points; it does not establish that every Agent step already has a unified distributed tracing view.

HENGSHI’s metrics and HQL capabilities also help narrow the investigation. Teams can first verify results against confirmed analytics objects, then inspect how the Agent understood the question and filters. Inconsistent metric definitions, slow data queries, and model-answer deviations require different owners.

3. Validate the Critical Path with Stage Timings

The following illustrative timings explain measurement. They are not HENGSHI benchmark results, a complete internal execution sequence, or a response-time commitment.

Example observationExample durationWhat it shows
Resource retrieval200 msThe duration of this retrieval operation.
Intent processing150 msThe duration of this intent-processing operation.
Query generation300 msThe duration of this query-generation operation.
Result assembly100 msThe duration of this result-assembly operation.

These four values add up to 750 ms, but exclude data querying, authorization, network transfer, and possible retries. Therefore, 750 ms is not the full data-Q&A duration. If some work overlaps, actual waiting must be calculated from start and end times and dependencies. The longest stage alone cannot simply be treated as the total duration after parallelization.

Business acceptance can separately measure the time from question submission to first useful feedback, data return, chart availability, and completed interpretation. For streaming answers, the first text and the completion of analysis should also be observed separately. Teams need to define which completion point matters to the business.

4. Validate Observability with an Agentic BI Task

The following is a fictional scenario, not a real customer case. A sales manager asks the system to analyze an operating dashboard and reports an eight-second wait for one data question. The project team fixes the account, question, time range, and data batch, then checks stage records, analytics objects, and outputs along the task chain to determine whether the observability design explains that wait.

EvidenceNext action
Execution records show repeated data searches or condition rewritesCheck metric names, dataset knowledge, and question ambiguity; narrow the available resource scope and retest.
The model has produced a query, but data has not returnedInspect the query and execution plan, join depth, filter scope, and data-source load.
The query has returned, but the page keeps waitingCheck result size, chart count, browser rendering, and subsequent interpretation steps.
Only some roles or entry points encounter problemsVerify actual identity, data-permission mode, embedding configuration, and interface responses while preserving authorization boundaries.

After making adjustments, repeat tests under the same conditions and verify values, filters, and access scope together. One faster run establishes improvement in that scenario only. Additional validation is needed for more users and more complex questions.

5. From Individual Traces to Ongoing Operations

An individual trace explains one analysis; aggregated observations reveal recurring issues. Teams can group latency by question type, data source, and time window, observe tail measures such as P95 and P99, and count failures, retries, and deliveries against a consistent definition of task completion. Correct results and permissions still require business samples and role-based validation. A successful call alone is insufficient.

Log access and retention also need management. Original questions, query conditions, and results may contain sensitive business information. Collect and share troubleshooting materials according to permissions, and disable temporary detailed logging when debugging ends. Tracing and auditing have different responsibilities; their retention periods should follow the enterprise’s respective troubleshooting and compliance requirements.

HENGSHI’s Agentic BI capabilities connect metric and HQL analysis, data authorization, Agent tool calls, and visual delivery with real business tasks. Execution logs and query troubleshooting entry points provide a practical foundation for observability. Business, data, and operations teams need to review definitions, status, latency, and results along the same task chain to keep improving analytical service availability and delivery quality.

HENGSHI SENSE

Resources, ecosystem, and implementation stories

Explore how teams design and ship analytics with HENGSHI.

Request a trial

Enterprise deployment, embedded delivery, and trial requests can all be handled quickly.