Documentation
¶
Index ¶
- Constants
- func ParseURL(url string) (map[string]string, error)
- type ConnectionInfo
- type ConnectionInfoArguments
- type PgSQLExplainplan
- type PlanNode
- type QueryDetails
- type QueryDetailsArguments
- type QuerySamples
- type QuerySamplesArguments
- type QuerySamplesInfo
- type SchemaDetails
- type SchemaDetailsArguments
Constants ¶
View Source
const ( QueryDetailsCollector = "query_details" OP_QUERY_ASSOCIATION = "query_association" OP_QUERY_PARSED_TABLE_NAME = "query_parsed_table_name" )
View Source
const ( QuerySamplesCollector = "query_samples" OP_QUERY_SAMPLE = "query_sample" OP_WAIT_EVENT = "wait_event" )
View Source
const ( SchemaDetailsCollector = "schema_details" OP_SCHEMA_DETECTION = "schema_detection" OP_TABLE_DETECTION = "table_detection" OP_CREATE_STATEMENT = "create_statement" )
View Source
const ConnectionInfoName = "connection_info"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct { DSN string Registry *prometheus.Registry EngineVersion string InfoMetric *prometheus.GaugeVec // contains filtered or unexported fields }
func NewConnectionInfo ¶
func NewConnectionInfo(args ConnectionInfoArguments) (*ConnectionInfo, error)
func (*ConnectionInfo) Name ¶
func (c *ConnectionInfo) Name() string
func (*ConnectionInfo) Stop ¶
func (c *ConnectionInfo) Stop()
func (*ConnectionInfo) Stopped ¶
func (c *ConnectionInfo) Stopped() bool
type ConnectionInfoArguments ¶
type ConnectionInfoArguments struct { DSN string Registry *prometheus.Registry EngineVersion string }
type PgSQLExplainplan ¶ added in v1.11.0
type PgSQLExplainplan struct {
Plan PlanNode `json:"Plan"`
}
type PlanNode ¶ added in v1.11.0
type PlanNode struct { NodeType string `json:"Node Type"` Alias string `json:"Alias"` RelationName string `json:"Relation Name"` ParentRelationship string `json:"Parent Relationship"` PartialMode string `json:"Partial Mode"` Strategy string `json:"Strategy"` ParallelAware bool `json:"Parallel Aware"` AsyncCapable bool `json:"Async Capable"` JoinType string `json:"Join Type"` InnerUnique bool `json:"Inner Unique"` HashCond string `json:"Hash Cond"` Filter string `json:"Filter"` StartupCost float64 `json:"Startup Cost"` TotalCost float64 `json:"Total Cost"` PlanRows int64 `json:"Plan Rows"` PlanWidth int64 `json:"Plan Width"` GroupKey []string `json:"Group Key"` SortKey []string `json:"Sort Key"` WorkersPlanned int64 `json:"Workers Planned"` PlannedPartitions int64 `json:"Planned Partitions"` Plans []PlanNode `json:"Plans"` IndexName string `json:"Index Name"` }
func (*PlanNode) ToExplainPlanOutputNode ¶ added in v1.11.0
func (p *PlanNode) ToExplainPlanOutputNode() (database_observability.ExplainPlanNode, error)
type QueryDetails ¶ added in v1.11.0
type QueryDetails struct {
// contains filtered or unexported fields
}
func NewQueryDetails ¶ added in v1.11.0
func NewQueryDetails(args QueryDetailsArguments) (*QueryDetails, error)
func (*QueryDetails) Name ¶ added in v1.11.0
func (c *QueryDetails) Name() string
func (*QueryDetails) Start ¶ added in v1.11.0
func (c *QueryDetails) Start(ctx context.Context) error
func (*QueryDetails) Stop ¶ added in v1.11.0
func (c *QueryDetails) Stop()
Stop should be kept idempotent
func (*QueryDetails) Stopped ¶ added in v1.11.0
func (c *QueryDetails) Stopped() bool
type QueryDetailsArguments ¶ added in v1.11.0
type QuerySamples ¶ added in v1.11.0
type QuerySamples struct {
// contains filtered or unexported fields
}
func NewQuerySamples ¶ added in v1.11.0
func NewQuerySamples(args QuerySamplesArguments) (*QuerySamples, error)
func (*QuerySamples) Name ¶ added in v1.11.0
func (c *QuerySamples) Name() string
func (*QuerySamples) Start ¶ added in v1.11.0
func (c *QuerySamples) Start(ctx context.Context) error
func (*QuerySamples) Stop ¶ added in v1.11.0
func (c *QuerySamples) Stop()
Stop should be kept idempotent
func (*QuerySamples) Stopped ¶ added in v1.11.0
func (c *QuerySamples) Stopped() bool
type QuerySamplesArguments ¶ added in v1.11.0
type QuerySamplesInfo ¶ added in v1.11.0
type QuerySamplesInfo struct { DatabaseName sql.NullString DatabaseID int PID int LeaderPID sql.NullInt64 UserSysID int Username sql.NullString ApplicationName sql.NullString ClientAddr sql.NullString ClientPort sql.NullInt32 StateChange sql.NullTime Now time.Time BackendStart sql.NullTime XactStart sql.NullTime QueryStart sql.NullTime WaitEventType sql.NullString WaitEvent sql.NullString State sql.NullString BackendType sql.NullString BackendXID sql.NullInt32 BackendXmin sql.NullInt32 QueryID sql.NullInt64 Query sql.NullString BlockedByPIDs pq.Int64Array }
type SchemaDetails ¶ added in v1.11.0
type SchemaDetails struct {
// contains filtered or unexported fields
}
func NewSchemaDetails ¶ added in v1.11.0
func NewSchemaDetails(args SchemaDetailsArguments) (*SchemaDetails, error)
func (*SchemaDetails) Name ¶ added in v1.11.0
func (c *SchemaDetails) Name() string
func (*SchemaDetails) Start ¶ added in v1.11.0
func (c *SchemaDetails) Start(ctx context.Context) error
func (*SchemaDetails) Stop ¶ added in v1.11.0
func (c *SchemaDetails) Stop()
Stop should be kept idempotent
func (*SchemaDetails) Stopped ¶ added in v1.11.0
func (c *SchemaDetails) Stopped() bool
type SchemaDetailsArguments ¶ added in v1.11.0
Click to show internal directories.
Click to hide internal directories.