Documentation
¶
Overview ¶
Package xevent is the sql_xevent trace kind: a SQL Server Extended Events capture whose events are stored as xesession event rows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKindFor ¶
NewKindFor is the sql_xevent kind over capture for a host's own params type: events masked, but never the session ids and users that only look sensitive.
Types ¶
type Capturable ¶
Capturable is a params type that maps itself onto the capture it opens. It is asked once as the capture starts, so options it takes from the clock, such as a drain's StartedAt, are the start's.
type Capture ¶
type Capture struct {
Open func(ctx dbcontext.Context, connection string) (*sql.DB, func(), error)
NewSession xesession.XEFactory
CurrentDatabase func(context.Context, *sql.DB) (string, error)
}
Capture is how the kind reaches SQL Server: Open leases a connection's client, NewSession creates the XE session on it, and CurrentDatabase names the database a capture naming none is scoped to.
type Options ¶
type Options struct {
Connection string
Create xetrace.CreateOptions
Drain xetrace.DrainOptions
}
Options are what a capture opens: the connection it captures on, the XE session it creates there, and how that session is drained.
type Params ¶
type Params struct {
Connection string `json:"connection" clicky:"required,title=Connection"`
xeprovider.XEventCaptureOptions
}
Params are the SQL Server connection to capture on and the capture's options, as the sqlserver-xevent provider takes them.