Skip to content

The _trace_id_ts table is not being used correctly in the explore view #1758

@Defman

Description

@Defman

The hasTraceTimestampTable is not being set correctly.

What happened:
When you click on a TraceId in explore view, it splits the view and makes searches for the trace using the query builder. However some reactivity is not being handled correctly, as the hasTraceTimestampTable is set to false. However if you make any change to force the variable to the table is detected correctly.

What you expected to happen:
The query to use the _trace_id_ts table.

How to reproduce it (as minimally and precisely as possible):
Go to explore

SELECT
  TraceId
FROM
  otel.otel_traces
WHERE
  $__timeFilter(TImestamp)

Click the TraceId and then in the new panel, click show "Show full query". Observe how the query does not contain any references to the _trace_id_ts table.

To force the update, change the table from otel_traces to otel_traces and reneable use latest otel under columns.

Observe how the query now contains references to the table _trace_id_ts.

Opening a new explore window and creating a query builder to find a single trace, do use the _trace_id_ts table.

Screenshots

Anything else we need to know?:

Environment:

  • Grafana version: 13.0.0-23501141054
  • Plugin version: 4.14.1
  • OS Grafana is installed on: cloud
  • User OS & Browser: osx firefox
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions