collector

package
v1.9.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QuerySampleName = "query_sample"
	OP_QUERY_SAMPLE = "query_sample"
	OP_WAIT_EVENT   = "wait_event"
)
View Source
const (
	OP_QUERY_PARSED_TABLE_NAME = "query_parsed_table_name"
	QueryTablesName            = "query_tables"
)
View Source
const (
	OP_SCHEMA_DETECTION = "schema_detection"
	OP_TABLE_DETECTION  = "table_detection"
	OP_CREATE_STATEMENT = "create_statement"
	SchemaTableName     = "schema_table"
)
View Source
const ConnectionInfoName = "connection_info"
View Source
const (
	SetupConsumersName = "setup_consumers"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionInfo

type ConnectionInfo struct {
	DSN        string
	Registry   *prometheus.Registry
	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) Start

func (c *ConnectionInfo) Start(ctx context.Context) error

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
}

type QuerySample

type QuerySample struct {
	// contains filtered or unexported fields
}

func NewQuerySample

func NewQuerySample(args QuerySampleArguments) (*QuerySample, error)

func (*QuerySample) Name

func (c *QuerySample) Name() string

func (*QuerySample) Start

func (c *QuerySample) Start(ctx context.Context) error

func (*QuerySample) Stop

func (c *QuerySample) Stop()

Stop should be kept idempotent

func (*QuerySample) Stopped

func (c *QuerySample) Stopped() bool

type QuerySampleArguments

type QuerySampleArguments struct {
	DB                    *sql.DB
	InstanceKey           string
	CollectInterval       time.Duration
	EntryHandler          loki.EntryHandler
	DisableQueryRedaction bool

	Logger log.Logger
}

type QueryTables added in v1.8.0

type QueryTables struct {
	// contains filtered or unexported fields
}

func NewQueryTables added in v1.8.0

func NewQueryTables(args QueryTablesArguments) (*QueryTables, error)

func (*QueryTables) Name added in v1.8.0

func (c *QueryTables) Name() string

func (*QueryTables) Start added in v1.8.0

func (c *QueryTables) Start(ctx context.Context) error

func (*QueryTables) Stop added in v1.8.0

func (c *QueryTables) Stop()

Stop should be kept idempotent

func (*QueryTables) Stopped added in v1.8.0

func (c *QueryTables) Stopped() bool

type QueryTablesArguments added in v1.8.0

type QueryTablesArguments struct {
	DB              *sql.DB
	InstanceKey     string
	CollectInterval time.Duration
	EntryHandler    loki.EntryHandler

	Logger log.Logger
}

type SchemaTable

type SchemaTable struct {
	// contains filtered or unexported fields
}

func NewSchemaTable

func NewSchemaTable(args SchemaTableArguments) (*SchemaTable, error)

func (*SchemaTable) Name

func (c *SchemaTable) Name() string

func (*SchemaTable) Start

func (c *SchemaTable) Start(ctx context.Context) error

func (*SchemaTable) Stop

func (c *SchemaTable) Stop()

Stop should be kept idempotent

func (*SchemaTable) Stopped

func (c *SchemaTable) Stopped() bool

type SchemaTableArguments

type SchemaTableArguments struct {
	DB              *sql.DB
	InstanceKey     string
	CollectInterval time.Duration
	EntryHandler    loki.EntryHandler

	CacheEnabled bool
	CacheSize    int
	CacheTTL     time.Duration

	Logger log.Logger
}

type SetupConsumerArguments added in v1.9.0

type SetupConsumerArguments struct {
	DB       *sql.DB
	Registry *prometheus.Registry

	Logger          log.Logger
	CollectInterval time.Duration
}

type SetupConsumers added in v1.9.0

type SetupConsumers struct {
	// contains filtered or unexported fields
}

func NewSetupConsumer added in v1.9.0

func NewSetupConsumer(args SetupConsumerArguments) (*SetupConsumers, error)

func (*SetupConsumers) Name added in v1.9.0

func (c *SetupConsumers) Name() string

func (*SetupConsumers) Start added in v1.9.0

func (c *SetupConsumers) Start(ctx context.Context) error

func (*SetupConsumers) Stop added in v1.9.0

func (c *SetupConsumers) Stop()

func (*SetupConsumers) Stopped added in v1.9.0

func (c *SetupConsumers) Stopped() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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