LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::TraceViewerPanel Class Reference

Correlation / trace viewer panel. More...

#include <TraceViewerPanel.hpp>

Inheritance diagram for ui::qt::TraceViewerPanel:
Inheritance graph
Collaboration diagram for ui::qt::TraceViewerPanel:
Collaboration graph

Public Slots

void Refresh ()
 Rebuild the correlation table from the current visible row set.
 

Public Member Functions

 TraceViewerPanel (db::EventsContainer &events, EventsTableView *eventsView, QWidget *parent=nullptr)
 

Private Member Functions

void BuildLayout ()
 
void PopulateFieldCombo ()
 Populate the field combo from the first N events' field names.
 
void RebuildTree (const QString &field)
 Rebuild the tree for the given correlation field.
 
void FilterTree (const QString &text)
 Show/hide tree items that do (not) contain text.
 

Private Attributes

db::EventsContainer & m_events
 
EventsTableView * m_eventsView
 
QLineEdit * m_searchEdit {nullptr}
 
QComboBox * m_fieldCombo {nullptr}
 
QTreeWidget * m_tree {nullptr}
 
QPushButton * m_clearBtn {nullptr}
 
QLabel * m_statusLabel {nullptr}
 
std::map< std::string, std::vector< unsigned long > > m_traceEvents
 Maps trace-ID key → event indices (top-level items).
 
DrillDownFilter m_traceFilter
 The trace filter set by a double-click, and the filter it replaced.
 
std::vector< unsigned long > m_shownIndices
 The events the tree was last built from.
 

Detailed Description

Correlation / trace viewer panel.

Groups visible events by the value of a user-selected field (e.g. requestId, sessionId, traceId). Each unique value becomes a top-level row showing aggregate statistics: event count, error count, duration, and first/last timestamps.

Child rows show per-actor and per-message-type breakdowns. When span fields (spanId / parentSpanId or parentId) are present the top-level rows are further nested into a call-tree hierarchy.

A search bar at the top filters the tree to matching trace IDs. Double-clicking any row filters the events view to the associated events.

Constructor & Destructor Documentation

◆ TraceViewerPanel()

ui::qt::TraceViewerPanel::TraceViewerPanel ( db::EventsContainer &  events,
EventsTableView *  eventsView,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ BuildLayout()

void ui::qt::TraceViewerPanel::BuildLayout ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FilterTree()

void ui::qt::TraceViewerPanel::FilterTree ( const QString &  text)
private

Show/hide tree items that do (not) contain text.

Here is the caller graph for this function:

◆ PopulateFieldCombo()

void ui::qt::TraceViewerPanel::PopulateFieldCombo ( )
private

Populate the field combo from the first N events' field names.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RebuildTree()

void ui::qt::TraceViewerPanel::RebuildTree ( const QString &  field)
private

Rebuild the tree for the given correlation field.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Refresh

void ui::qt::TraceViewerPanel::Refresh ( )
slot

Rebuild the correlation table from the current visible row set.

Here is the call graph for this function:

Member Data Documentation

◆ m_clearBtn

QPushButton* ui::qt::TraceViewerPanel::m_clearBtn {nullptr}
private

◆ m_events

db::EventsContainer& ui::qt::TraceViewerPanel::m_events
private

◆ m_eventsView

EventsTableView* ui::qt::TraceViewerPanel::m_eventsView
private

◆ m_fieldCombo

QComboBox* ui::qt::TraceViewerPanel::m_fieldCombo {nullptr}
private

◆ m_searchEdit

QLineEdit* ui::qt::TraceViewerPanel::m_searchEdit {nullptr}
private

◆ m_shownIndices

std::vector<unsigned long> ui::qt::TraceViewerPanel::m_shownIndices
private

The events the tree was last built from.

◆ m_statusLabel

QLabel* ui::qt::TraceViewerPanel::m_statusLabel {nullptr}
private

◆ m_traceEvents

std::map<std::string, std::vector<unsigned long> > ui::qt::TraceViewerPanel::m_traceEvents
private

Maps trace-ID key → event indices (top-level items).

◆ m_traceFilter

DrillDownFilter ui::qt::TraceViewerPanel::m_traceFilter
private

The trace filter set by a double-click, and the filter it replaced.

◆ m_tree

QTreeWidget* ui::qt::TraceViewerPanel::m_tree {nullptr}
private

The documentation for this class was generated from the following files: