Documentation
¶
Index ¶
- func Agent(event string, data any)
- func AgentDetailed(event string, data any)
- func AgentHigh(event string, data any)
- func Close()
- func Editor(event string, data any)
- func EditorDetailed(event string, data any)
- func EditorHigh(event string, data any)
- func Emit(subsystem, event string, level Level, data any)
- func Enabled(subsystem string) bool
- func Init() error
- func Parser(event string, data any)
- func ParserDetailed(event string, data any)
- func ParserHigh(event string, data any)
- func Shell(event string, data any)
- func ShellDetailed(event string, data any)
- func ShellHigh(event string, data any)
- type Entry
- type Level
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentDetailed ¶
AgentDetailed emits an agent subsystem trace event (detailed level).
func EditorDetailed ¶
EditorDetailed emits an editor subsystem trace event (detailed level).
func EditorHigh ¶
EditorHigh emits an editor subsystem trace event (high level).
func Init ¶
func Init() error
Init initializes the global tracer from environment variables. HASH_TRACE: comma-separated subsystems (e.g., "editor,agent,all") HASH_TRACE_PATH: output file path (default: hash-trace.jsonl) HASH_TRACE_LEVEL: verbose, detailed, high (default: verbose)
func ParserDetailed ¶
ParserDetailed emits a parser subsystem trace event (detailed level).
func ParserHigh ¶
ParserHigh emits a parser subsystem trace event (high level).
func ShellDetailed ¶
ShellDetailed emits a shell subsystem trace event (detailed level).
Types ¶
type Entry ¶
type Entry struct {
Timestamp string `json:"ts"`
DeltaMs float64 `json:"delta_ms"`
Goroutine int `json:"goroutine"`
Subsystem string `json:"sub"`
Level Level `json:"level"`
Event string `json:"event"`
Data any `json:"data,omitempty"`
}
Entry is a single trace event.
func StartEntry ¶
StartEntry creates the trace_start entry.
func (Entry) MarshalJSON ¶
MarshalJSON implements json.Marshaler.