collectnode

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package collectnode 放置 trace collector 节点之间共享的导出辅助逻辑。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Schedule

func Schedule(fc *core.FlowContext, target string, exporter tracing.Exporter) interface{}

Schedule 把“本次运行结束后导出 trace”的动作注册到运行级 Collector。 exporter 应只捕获本次节点配置,不能捕获可变的 NodeDefine。

func ValidateIdentifier

func ValidateIdentifier(kind string, value string) error

ValidateIdentifier 校验外部存储的库名或表名,避免标识符拼接造成注入。

Types

type Record

type Record struct {
	Type         event.Type `json:"type"`
	Env          string     `json:"env"`
	Workspace    string     `json:"workspace"`
	TraceID      string     `json:"trace_id"`
	RunID        string     `json:"run_id"`
	ParentRunID  string     `json:"parent_run_id"`
	WorkflowID   string     `json:"workflow_id"`
	WorkflowVer  string     `json:"workflow_ver"`
	NodeID       string     `json:"node_id"`
	NodeName     string     `json:"node_name"`
	ParentNodeID string     `json:"parent_node_id"`
	NodePath     string     `json:"node_path"`
	NodeDepth    *int       `json:"node_depth"`
	NodeIndex    *int       `json:"node_index"`
	NodeType     string     `json:"node_type"`
	Status       string     `json:"status"`
	NodeStatus   string     `json:"node_status"`
	Error        string     `json:"error"`
	LogLevel     string     `json:"log_level"`
	Message      string     `json:"message"`
	StartedAt    *time.Time `json:"started_at"`
	EndedAt      *time.Time `json:"ended_at"`
	DurationMs   int64      `json:"duration_ms"`
	Attrs        string     `json:"attrs"`
	Fields       string     `json:"fields"`
}

Record 是 MySQL 和 ClickHouse Collector 共用的事件存储形态。

func Records

func Records(events []*event.Event) ([]Record, error)

Records 清洗敏感字段并转换一次运行的事件快照。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL