Jaeger Tool

目標

設計

// Log的每一行為一個dict
struct Row
{
	map<string, string> attrs;
}

typedef vector<Row>	Logs;

// 每一個Trace為一棵樹,樹的子節點為child span,value為row
struct Span
{
	int openTagIndex;
    int closeTagIndex;
    vector<int> eventIndexes;
    vector<Span> children;
    
    const Span* parent() const;
    const Span* root() const;    
    void setParent(Span const& span)    // 修改parent
    {
        // 刪除原先的parent的指針
        // 移動到新的parent下面
    }
};
typedef Span Trace;
typedef vector<Trace> Traces;

// 每一個row的Span
Span* GetSpanByRow(rowIndex);

// +> 對應
struct Match
{
    int fromIndex;
    int toIndex;
}
typedef vecotor<Match> Matches;

Powered by Jekyll and Theme by solid

本站总访问量