chore(deps): update dependency golangci/golangci-lint to v2.2.1 (#2110)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
renovate[bot]
2025-07-05 00:08:07 +02:00
committed by GitHub
parent 7a4e92a473
commit 9320e992cc
58 changed files with 516 additions and 46 deletions

View File

@@ -78,18 +78,6 @@ var ConfigDefaults = Config{
// A Collector is a Prometheus Collector for various WMI Win32_PerfRawData_MSSQLSERVER_* metrics.
type Collector struct {
config Config
logger *slog.Logger
mssqlInstances []mssqlInstance
collectorFns []func(ch chan<- prometheus.Metric) error
closeFns []func()
// meta
mssqlScrapeDurationDesc *prometheus.Desc
mssqlScrapeSuccessDesc *prometheus.Desc
collectorAccessMethods
collectorAvailabilityReplica
collectorBufferManager
@@ -103,6 +91,18 @@ type Collector struct {
collectorSQLStats
collectorTransactions
collectorWaitStats
config Config
logger *slog.Logger
mssqlInstances []mssqlInstance
collectorFns []func(ch chan<- prometheus.Metric) error
closeFns []func()
// meta
mssqlScrapeDurationDesc *prometheus.Desc
mssqlScrapeSuccessDesc *prometheus.Desc
}
func New(config *Config) *Collector {
@@ -405,6 +405,7 @@ func (c *Collector) collect(
duration.Seconds(),
collector, sqlInstance.name,
)
ch <- prometheus.MustNewConstMetric(
c.mssqlScrapeSuccessDesc,
prometheus.GaugeValue,