Versions in this module Expand all Collapse all v0 v0.1.46 Oct 5, 2026 v0.1.45 Oct 2, 2026 Changes in this version + const RowKind + func CreateXESession(ctx context.Context, db *sql.DB, opts xetrace.CreateOptions) (XESession, Opened, error) + func CurrentDatabase(ctx context.Context, db *sql.DB) (string, error) + type ActiveTrace struct + Database string + Error string + ID string + Options xetrace.CreateOptions + SessionName string + StartedAt time.Time + Statements []string + StopAt time.Time + StoppedAt time.Time + func (t *ActiveTrace) Checkpoint(ctx context.Context) (query.EventsRef, error) + func (t *ActiveTrace) Done() <-chan struct{} + func (t *ActiveTrace) Err() error + func (t *ActiveTrace) EventsRef() query.EventsRef + func (t *ActiveTrace) Preview(from, to int64) []xetrace.Event + func (t *ActiveTrace) Result() xetrace.TraceResult + func (t *ActiveTrace) Running() bool + func (t *ActiveTrace) Summary() xetrace.Summary + type EventRow struct + ActivityID string + ActivitySeq int + AdditionalFields map[string]any + CPUMs float64 + Children []EventRow + ClientApp string + ClientHost string + Database string + Deadlock *deadlocks.Graph + DurationMs float64 + ErrorMessage string + ErrorNumber int + LogicalReads int64 + Name string + ObjectName string + ObjectType string + ParamsUnavailable bool + PhysicalReads int64 + RawStatement string + RowCount int64 + SQL string + SessionID int + StatementType string + Tables []string + Timestamp time.Time + Username string + Writes int64 + func FromEvent(event xetrace.Event) EventRow + func (EventRow) Columns() []api.ColumnDef + func (r EventRow) Row() map[string]any + type Opened struct + FinalDelay time.Duration + Name string + Statements []string + type RecordStore interface + Append func(ctx context.Context, stream, kind string, rows []recordstore.Row) (recordstore.AppendResult, error) + EventsRef func(ctx context.Context, stream string, from, to int64) (query.EventsRef, error) + Seal func(ctx context.Context, stream string) error + type Registry struct + func NewRegistry(opts RegistryOptions) (*Registry, error) + func (r *Registry) Start(ctx context.Context, opts StartOptions) (*ActiveTrace, error) + func (r *Registry) Stop(id string) (*ActiveTrace, error) + func (r *Registry) StopAll() + type RegistryOptions struct + CurrentDatabase func(context.Context, *sql.DB) (string, error) + DB func(context.Context) (*sql.DB, func(), error) + NewSession XEFactory + Store RecordStore + type StartOptions struct + Duration time.Duration + Poll time.Duration + type XEFactory func(ctx context.Context, db *sql.DB, opts xetrace.CreateOptions) (XESession, Opened, error) + type XESession interface + Drop func(ctx context.Context) error + Poll func(ctx context.Context) (xetrace.TargetSnapshot, error) Other modules containing this package github.com/flanksource/commons-db