Documentation
¶
Index ¶
- Constants
- func WalkSteps(spans []*Span, f func(*TraceRow))
- type DB
- func (db *DB) AllTraces() []*Trace
- func (*DB) Close() error
- func (db *DB) ExportLogs(ctx context.Context, logs []*sdklog.LogData) error
- func (db *DB) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error
- func (db *DB) HighLevelSpan(call *callpbv1.Call) *Span
- func (db *DB) MostInterestingSpan(dig string) *Span
- func (db *DB) MustCall(dig string) *callpbv1.Call
- func (db *DB) PrimarySpanForTrace(traceID trace.TraceID) *Span
- func (db *DB) SetPrimarySpan(span trace.SpanID)
- func (db *DB) SetWidth(width int)
- func (db *DB) Shutdown(ctx context.Context) error
- func (db *DB) Simplify(call *callpbv1.Call) (smallest *callpbv1.Call)
- type Frontend
- func (fe *Frontend) Background(cmd tea.ExecCommand) error
- func (fe *Frontend) Close() error
- func (fe *Frontend) ConnectedToCloud(cloudURL string)
- func (fe *Frontend) ConnectedToEngine(name string)
- func (fe *Frontend) DumpID(out *termenv.Output, id *call.ID) error
- func (fe *Frontend) ExportLogs(ctx context.Context, logs []*sdklog.LogData) error
- func (fe *Frontend) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error
- func (fe *Frontend) Init() tea.Cmd
- func (fe *Frontend) Render(out *termenv.Output) error
- func (fe *Frontend) Run(ctx context.Context, run func(context.Context) error) error
- func (fe *Frontend) SetPrimary(spanID trace.SpanID)
- func (fe *Frontend) SetWindowSize(msg tea.WindowSizeMsg)
- func (fe *Frontend) ShouldShow(row *TraceRow) bool
- func (fe *Frontend) Shutdown(ctx context.Context) error
- func (fe *Frontend) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (fe *Frontend) View() string
- type LogsView
- type Pipeline
- type Span
- func (span *Span) Bar() SpanBar
- func (span *Span) Base() (*callpbv1.Call, bool)
- func (span *Span) Children() []*Span
- func (span *Span) Classes() string
- func (span *Span) Duration() time.Duration
- func (span *Span) EndTime() time.Time
- func (span *Span) Err() error
- func (span *Span) IsBefore(other *Span) bool
- func (span *Span) IsInternal() bool
- func (span *Span) IsRunning() bool
- func (span *Span) Logs() *Vterm
- func (span *Span) Name() string
- type SpanBar
- type Task
- type Trace
- type TraceRow
- type Vterm
- func (term *Vterm) Init() tea.Cmd
- func (term *Vterm) LastLine() string
- func (term *Vterm) Print(w io.Writer) error
- func (term *Vterm) Render(w io.Writer, offset, height int)
- func (term *Vterm) ScrollPercent() float64
- func (term *Vterm) SetHeight(height int)
- func (term *Vterm) SetPrefix(prefix string)
- func (term *Vterm) SetWidth(width int)
- func (term *Vterm) Term() *midterm.Terminal
- func (term *Vterm) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (term *Vterm) UsedHeight() int
- func (term *Vterm) View() string
- func (term *Vterm) Write(p []byte) (int, error)
Constants ¶
const ( TooFastThreshold = 100 * time.Millisecond GCThreshold = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶ added in v0.9.9
type DB struct {
Traces map[trace.TraceID]*Trace
Spans map[trace.SpanID]*Span
Children map[trace.SpanID]map[trace.SpanID]struct{}
Logs map[trace.SpanID]*Vterm
LogWidth int
PrimarySpan trace.SpanID
PrimaryLogs map[trace.SpanID][]*sdklog.LogData
Calls map[string]*callpbv1.Call
Outputs map[string]map[string]struct{}
OutputOf map[string]map[string]struct{}
Intervals map[string]map[time.Time]*Span
}
func (*DB) ExportLogs ¶ added in v0.11.0
func (*DB) ExportSpans ¶ added in v0.11.0
func (*DB) MostInterestingSpan ¶ added in v0.11.0
func (*DB) PrimarySpanForTrace ¶ added in v0.11.0
func (*DB) SetPrimarySpan ¶ added in v0.11.0
SetPrimarySpan allows the primary span to be explicitly set to a particular span. normally we assume the root span is the primary span, but in a nested scenario we never actually see the root span, so the CLI explicitly sets it to the span it created.
type Frontend ¶
type Frontend struct {
// Debug tells the frontend to show everything and do one big final render.
Debug bool
// Plain tells the frontend to render plain console output instead of using a
// TUI. This will be automatically set to true if a TTY is not found.
Plain bool
// Silent tells the frontend to not display progress at all.
Silent bool
// Verbosity is the level of detail to show in the TUI.
Verbosity int
// contains filtered or unexported fields
}
func (*Frontend) Background ¶ added in v0.11.0
func (fe *Frontend) Background(cmd tea.ExecCommand) error
func (*Frontend) ConnectedToCloud ¶ added in v0.9.9
ConnectedToCloud is called when the CLI has started emitting events to The Cloud.
func (*Frontend) ConnectedToEngine ¶ added in v0.9.9
ConnectedToEngine is called when the CLI connects to an engine.
func (*Frontend) ExportLogs ¶ added in v0.11.0
func (*Frontend) ExportSpans ¶ added in v0.11.0
func (*Frontend) Run ¶ added in v0.9.9
Run starts the TUI, calls the run function, stops the TUI, and finally prints the primary output to the appropriate stdout/stderr streams.
func (*Frontend) SetPrimary ¶ added in v0.11.0
SetPrimary tells the frontend which span should be treated like the focal point of the command. Its output will be displayed at the end, and its children will be promoted to the "top-level" of the TUI.
func (*Frontend) SetWindowSize ¶ added in v0.11.0
func (fe *Frontend) SetWindowSize(msg tea.WindowSizeMsg)
func (*Frontend) ShouldShow ¶ added in v0.11.0
type LogsView ¶ added in v0.10.0
func CollectLogsView ¶ added in v0.10.0
type Span ¶ added in v0.9.9
type Span struct {
sdktrace.ReadOnlySpan
Digest string
Call *callpbv1.Call
Internal bool
Cached bool
Canceled bool
Inputs []string
Primary bool
Encapsulate bool
Mask bool
Passthrough bool
Ignore bool
// contains filtered or unexported fields
}
func (*Span) IsInternal ¶ added in v0.11.0
type SpanBar ¶ added in v0.11.0
type Trace ¶ added in v0.11.0
type Trace struct {
ID trace.TraceID
Epoch, End time.Time
IsRunning bool
// contains filtered or unexported fields
}
func (*Trace) PrimarySpan ¶ added in v0.11.0
type TraceRow ¶ added in v0.9.9
type TraceRow struct {
Span *Span
Parent *TraceRow
IsRunning bool
Chained bool
Children []*TraceRow
Collapsed bool
}
func CollectRows ¶ added in v0.9.9
type Vterm ¶ added in v0.9.9
type Vterm struct {
Offset int
Height int
Width int
Prefix string
// contains filtered or unexported fields
}
func (*Vterm) LastLine ¶ added in v0.9.9
LastLine returns the last line of visible text, with ANSI formatting, but without any trailing whitespace.
func (*Vterm) Render ¶ added in v0.9.9
Bytes returns the output for the given region of the terminal, with ANSI formatting.