Help us shape the future of Go! Take the 2026 Go Developer Survey

trace

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 7 Imported by: 3

Documentation

Overview

Package trace provides the two observers an operator wants while a run executes: aligned lines for a terminal and JSON Lines for a collector. Both are safe for concurrent use, because the runtime delivers events from whichever goroutine committed them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONL

func JSONL(w io.Writer) agentrt.Observer

JSONL returns an observer writing one JSON object per event. The payload is passed through as recorded: the encoder's HTML escaping is off, so a payload containing <, >, or & is not rewritten on its way out.

func Writer

func Writer(w io.Writer) agentrt.Observer

Writer returns an observer printing one line per event: the local time, two spaces, the event type padded to 22 columns, and the payload. This is the format both consumers print to stderr with -trace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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