diff --git a/receiver/sqlserverreceiver/factory.go b/receiver/sqlserverreceiver/factory.go index af47305529c5..4b3203326c79 100644 --- a/receiver/sqlserverreceiver/factory.go +++ b/receiver/sqlserverreceiver/factory.go @@ -4,15 +4,21 @@ package sqlserverreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver" import ( + "database/sql" + "errors" + "fmt" "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scraperhelper" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver/internal/metadata" ) +var errConfigNotSQLServer = errors.New("config was not a sqlserver receiver config") + // NewFactory creates a factory for SQL Server receiver. func NewFactory() receiver.Factory { return receiver.NewFactory( @@ -30,8 +36,81 @@ func createDefaultConfig() component.Config { } } +func setupQueries(cfg *Config) []string { + var queries []string + // TODO: Only add query if metrics are enabled + queries = append(queries, getSQLServerDatabaseIOQuery(cfg.InstanceName)) + return queries +} + func directDBConnectionEnabled(config *Config) bool { return config.Server != "" && config.Username != "" && string(config.Password) != "" } + +// Assumes config has all information necessary to directly connect to the database +func getDBConnectionString(config *Config) string { + return fmt.Sprintf("server=%s;user id=%s;password=%s;port=%d", config.Server, config.Username, string(config.Password), config.Port) +} + +// SQL Server scraper creation is split out into a separate method for the sake of testing. +func setupSQLServerScrapers(params receiver.CreateSettings, cfg *Config) []*sqlServerScraperHelper { + if !directDBConnectionEnabled(cfg) { + params.Logger.Info("No direct connection will be made to the SQL Server: Configuration doesn't include some options.") + return nil + } + + queries := setupQueries(cfg) + if len(queries) == 0 { + params.Logger.Info("No direct connection will be made to the SQL Server: No metrics are enabled requiring it.") + return nil + } + + // TODO: Test if this needs to be re-defined for each scraper + // This should be tested when there is more than one query being made. + dbProviderFunc := func() (*sql.DB, error) { + return sql.Open("sqlserver", getDBConnectionString(cfg)) + } + + var scrapers []*sqlServerScraperHelper + for i, query := range queries { + id := component.NewIDWithName(metadata.Type, fmt.Sprintf("query-%d: %s", i, query)) + + sqlServerScraper := newSQLServerScraper(id, query, + cfg.InstanceName, + cfg.ControllerConfig, + params.Logger, + sqlquery.TelemetryConfig{}, + dbProviderFunc, + sqlquery.NewDbClient, + metadata.NewMetricsBuilder(cfg.MetricsBuilderConfig, params)) + + scrapers = append(scrapers, sqlServerScraper) + } + + return scrapers +} + +// Note: This method will fail silently if there is no work to do. This is an acceptable use case +// as this receiver can still get information on Windows from performance counters without a direct +// connection. Messages will be logged at the INFO level in such cases. +func setupScrapers(params receiver.CreateSettings, cfg *Config) ([]scraperhelper.ScraperControllerOption, error) { + sqlServerScrapers := setupSQLServerScrapers(params, cfg) + + var opts []scraperhelper.ScraperControllerOption + for _, sqlScraper := range sqlServerScrapers { + scraper, err := scraperhelper.NewScraper(metadata.Type.String(), sqlScraper.Scrape, + scraperhelper.WithStart(sqlScraper.Start), + scraperhelper.WithShutdown(sqlScraper.Shutdown)) + + if err != nil { + return nil, err + } + + opt := scraperhelper.AddScraper(scraper) + opts = append(opts, opt) + } + + return opts, nil +} diff --git a/receiver/sqlserverreceiver/factory_others.go b/receiver/sqlserverreceiver/factory_others.go index afd11f0322cf..d838811f3c81 100644 --- a/receiver/sqlserverreceiver/factory_others.go +++ b/receiver/sqlserverreceiver/factory_others.go @@ -7,19 +7,34 @@ package sqlserverreceiver // import "github.com/open-telemetry/opentelemetry-col import ( "context" - "errors" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/scraperhelper" ) // createMetricsReceiver creates a metrics receiver based on provided config. func createMetricsReceiver( _ context.Context, - _ receiver.CreateSettings, - _ component.Config, - _ consumer.Metrics, + params receiver.CreateSettings, + receiverCfg component.Config, + metricsConsumer consumer.Metrics, ) (receiver.Metrics, error) { - return nil, errors.New("the sqlserver receiver is only supported on Windows") + cfg, ok := receiverCfg.(*Config) + if !ok { + return nil, errConfigNotSQLServer + } + + opts, err := setupScrapers(params, cfg) + if err != nil { + return nil, err + } + + return scraperhelper.NewScraperControllerReceiver( + &cfg.ControllerConfig, + params, + metricsConsumer, + opts..., + ) } diff --git a/receiver/sqlserverreceiver/factory_others_test.go b/receiver/sqlserverreceiver/factory_others_test.go index 7371625b070e..b52499bcf1ab 100644 --- a/receiver/sqlserverreceiver/factory_others_test.go +++ b/receiver/sqlserverreceiver/factory_others_test.go @@ -9,16 +9,64 @@ import ( "context" "testing" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/receiver/receivertest" ) -func TestCreateMetricsReceiver(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - mReceiver, err := factory.CreateMetricsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, consumertest.NewNop()) +func TestCreateMetricsReceiverOtherOS(t *testing.T) { + testCases := []struct { + desc string + testFunc func(*testing.T) + }{ + { + desc: "Test direct connection with instance name", + testFunc: func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.Username = "sa" + cfg.Password = "password" + cfg.Server = "0.0.0.0" + cfg.Port = 1433 + cfg.InstanceName = "instanceName" + require.NoError(t, cfg.Validate()) - assert.EqualError(t, err, "the sqlserver receiver is only supported on Windows") - assert.Nil(t, mReceiver) + require.True(t, directDBConnectionEnabled(cfg)) + require.Equal(t, "server=0.0.0.0;user id=sa;password=password;port=1433", getDBConnectionString(cfg)) + + params := receivertest.NewNopCreateSettings() + scrapers, err := setupScrapers(params, cfg) + require.NoError(t, err) + require.NotEmpty(t, scrapers) + + sqlScrapers := setupSQLServerScrapers(params, cfg) + require.NotEmpty(t, sqlScrapers) + + databaseIOScraperFound := false + for _, scraper := range sqlScrapers { + if scraper.sqlQuery == getSQLServerDatabaseIOQuery(cfg.InstanceName) { + databaseIOScraperFound = true + break + } + } + + require.True(t, databaseIOScraperFound) + + r, err := factory.CreateMetricsReceiver( + context.Background(), + receivertest.NewNopCreateSettings(), + cfg, + consumertest.NewNop(), + ) + require.NoError(t, err) + require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, r.Shutdown(context.Background())) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, tc.testFunc) + } } diff --git a/receiver/sqlserverreceiver/factory_test.go b/receiver/sqlserverreceiver/factory_test.go index ab13808f0899..d35c3de42209 100644 --- a/receiver/sqlserverreceiver/factory_test.go +++ b/receiver/sqlserverreceiver/factory_test.go @@ -4,17 +4,21 @@ package sqlserverreceiver import ( + "context" "testing" "time" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" "go.opentelemetry.io/collector/receiver/scraperhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver/internal/metadata" ) -func TestNewFactory(t *testing.T) { +func TestCreateMetricsReceiver(t *testing.T) { testCases := []struct { desc string testFunc func(*testing.T) @@ -42,6 +46,93 @@ func TestNewFactory(t *testing.T) { require.Equal(t, expectedCfg, factory.CreateDefaultConfig()) }, }, + { + desc: "creates a new factory and CreateMetricsReceiver returns error with incorrect config", + testFunc: func(t *testing.T) { + factory := NewFactory() + _, err := factory.CreateMetricsReceiver( + context.Background(), + receivertest.NewNopCreateSettings(), + nil, + consumertest.NewNop(), + ) + require.ErrorIs(t, err, errConfigNotSQLServer) + }, + }, + { + desc: "creates a new factory and CreateMetricsReceiver returns no error", + testFunc: func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + r, err := factory.CreateMetricsReceiver( + context.Background(), + receivertest.NewNopCreateSettings(), + cfg, + consumertest.NewNop(), + ) + require.NoError(t, err) + scrapers := setupSQLServerScrapers(receivertest.NewNopCreateSettings(), cfg.(*Config)) + require.Empty(t, scrapers) + require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, r.Shutdown(context.Background())) + }, + }, + { + desc: "Test direct connection", + testFunc: func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.Username = "sa" + cfg.Password = "password" + cfg.Server = "0.0.0.0" + cfg.Port = 1433 + require.NoError(t, cfg.Validate()) + + require.True(t, directDBConnectionEnabled(cfg)) + require.Equal(t, "server=0.0.0.0;user id=sa;password=password;port=1433", getDBConnectionString(cfg)) + + params := receivertest.NewNopCreateSettings() + scrapers, err := setupScrapers(params, cfg) + require.NoError(t, err) + require.NotEmpty(t, scrapers) + + sqlScrapers := setupSQLServerScrapers(params, cfg) + require.NotEmpty(t, sqlScrapers) + + databaseIOScraperFound := false + for _, scraper := range sqlScrapers { + if scraper.sqlQuery == getSQLServerDatabaseIOQuery(cfg.InstanceName) { + databaseIOScraperFound = true + break + } + } + + require.True(t, databaseIOScraperFound) + cfg.InstanceName = "instanceName" + sqlScrapers = setupSQLServerScrapers(params, cfg) + require.NotEmpty(t, sqlScrapers) + + databaseIOScraperFound = false + for _, scraper := range sqlScrapers { + if scraper.sqlQuery == getSQLServerDatabaseIOQuery(cfg.InstanceName) { + databaseIOScraperFound = true + break + } + } + + require.True(t, databaseIOScraperFound) + + r, err := factory.CreateMetricsReceiver( + context.Background(), + receivertest.NewNopCreateSettings(), + cfg, + consumertest.NewNop(), + ) + require.NoError(t, err) + require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, r.Shutdown(context.Background())) + }, + }, } for _, tc := range testCases { diff --git a/receiver/sqlserverreceiver/factory_windows.go b/receiver/sqlserverreceiver/factory_windows.go index 9ce9734ab86f..f84cc96267a5 100644 --- a/receiver/sqlserverreceiver/factory_windows.go +++ b/receiver/sqlserverreceiver/factory_windows.go @@ -7,7 +7,6 @@ package sqlserverreceiver // import "github.com/open-telemetry/opentelemetry-col import ( "context" - "errors" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" @@ -17,8 +16,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver/internal/metadata" ) -var errConfigNotSQLServer = errors.New("config was not a sqlserver receiver config") - // createMetricsReceiver creates a metrics receiver based on provided config. func createMetricsReceiver( _ context.Context, @@ -39,7 +36,17 @@ func createMetricsReceiver( return nil, err } + var opts []scraperhelper.ScraperControllerOption + opts, err = setupScrapers(params, cfg) + if err != nil { + return nil, err + } + opts = append(opts, scraperhelper.AddScraper(scraper)) + return scraperhelper.NewScraperControllerReceiver( - &cfg.ControllerConfig, params, metricsConsumer, scraperhelper.AddScraper(scraper), + &cfg.ControllerConfig, + params, + metricsConsumer, + opts..., ) } diff --git a/receiver/sqlserverreceiver/factory_windows_test.go b/receiver/sqlserverreceiver/factory_windows_test.go deleted file mode 100644 index cc86b112d838..000000000000 --- a/receiver/sqlserverreceiver/factory_windows_test.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build windows - -package sqlserverreceiver - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/receiver/receivertest" -) - -func TestCreateMetricsReceiver(t *testing.T) { - testCases := []struct { - desc string - testFunc func(*testing.T) - }{ - { - desc: "creates a new factory and CreateMetricsReceiver returns no error", - testFunc: func(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - r, err := factory.CreateMetricsReceiver( - context.Background(), - receivertest.NewNopCreateSettings(), - cfg, - consumertest.NewNop(), - ) - require.NoError(t, err) - require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, r.Shutdown(context.Background())) - }, - }, - { - desc: "creates a new factory and CreateMetricsReceiver returns error with incorrect config", - testFunc: func(t *testing.T) { - factory := NewFactory() - _, err := factory.CreateMetricsReceiver( - context.Background(), - receivertest.NewNopCreateSettings(), - nil, - consumertest.NewNop(), - ) - require.ErrorIs(t, err, errConfigNotSQLServer) - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.desc, tc.testFunc) - } -} diff --git a/receiver/sqlserverreceiver/go.mod b/receiver/sqlserverreceiver/go.mod index 4444adfbd8a4..72dd46006038 100644 --- a/receiver/sqlserverreceiver/go.mod +++ b/receiver/sqlserverreceiver/go.mod @@ -4,6 +4,7 @@ go 1.21 require ( github.com/google/go-cmp v0.6.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.98.0 @@ -23,38 +24,97 @@ require ( ) require ( + filippo.io/edwards25519 v1.1.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 // indirect + github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect + github.com/SAP/go-hdb v1.8.15 // indirect + github.com/apache/arrow/go/v15 v15.0.0 // indirect + github.com/aws/aws-sdk-go-v2 v1.17.7 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.18 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 // indirect + github.com/aws/smithy-go v1.13.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect + github.com/golang-sql/sqlexp v0.1.0 // indirect + github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/uuid v1.6.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/goidentity/v6 v6.0.1 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/lib/pq v1.10.9 // indirect + github.com/microsoft/go-mssqldb v1.7.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mtibben/percent v0.2.1 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.52.3 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.13.0 // indirect + github.com/sijms/go-ora/v2 v2.8.11 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/snowflakedb/gosnowflake v1.9.0 // indirect github.com/stretchr/objx v0.5.2 // indirect + github.com/zeebo/xxh3 v1.0.2 // indirect go.opentelemetry.io/collector v0.98.1-0.20240416174005-d0f15e2463f8 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.98.1-0.20240416174005-d0f15e2463f8 // indirect go.opentelemetry.io/otel v1.25.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect go.opentelemetry.io/otel/sdk v1.25.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.23.0 // indirect + golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.17.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect google.golang.org/grpc v1.63.2 // indirect google.golang.org/protobuf v1.33.0 // indirect @@ -74,3 +134,5 @@ retract ( ) replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery => ../../internal/sqlquery diff --git a/receiver/sqlserverreceiver/go.sum b/receiver/sqlserverreceiver/go.sum index abd859453919..32f43dbe828e 100644 --- a/receiver/sqlserverreceiver/go.sum +++ b/receiver/sqlserverreceiver/go.sum @@ -1,28 +1,147 @@ +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 h1:u/LLAOFgsMv7HmNL4Qufg58y+qElGOt5qv0z1mURkRY= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0/go.mod h1:2e8rMJtl2+2j+HXbTBwnyGpm5Nou7KhvSfxOq8JpTag= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= +github.com/SAP/go-hdb v1.8.15 h1:arDBPYiImc9N1lmgnl87eW2UbMMgU8T0NhC4VKzUGRU= +github.com/SAP/go-hdb v1.8.15/go.mod h1:nYmw5xY+kuZmJJTSCm9FZrLwfPuUfLl+9kDmOAtNtpk= +github.com/apache/arrow/go/v15 v15.0.0 h1:1zZACWf85oEZY5/kd9dsQS7i+2G5zVQcbKTHgslqHNA= +github.com/apache/arrow/go/v15 v15.0.0/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA= +github.com/aws/aws-sdk-go-v2 v1.17.7 h1:CLSjnhJSTSogvqUGhIC6LqFKATMRexcxLZ0i/Nzk9Eg= +github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= +github.com/aws/aws-sdk-go-v2/config v1.18.19 h1:AqFK6zFNtq4i1EYu+eC7lcKHYnZagMn6SW171la0bGw= +github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= +github.com/aws/aws-sdk-go-v2/credentials v1.13.18 h1:EQMdtHwz0ILTW1hoP+EwuWhwCG1hD6l3+RWFQABET4c= +github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1 h1:gt57MN3liKiyGopcqgNzJb2+d9MJaKT/q1OksHNXVE4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1/go.mod h1:lfUx8puBRdM5lVVMQlwt2v+ofiG/X6Ms+dy0UkG/kXw= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 h1:E3Y+OfzOK1+rmRo/K2G0ml8Vs+Xqk0kOnf4nS0kUtBc= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59/go.mod h1:1M4PLSBUVfBI0aP+C9XI7SM6kZPCGYyI6izWz0TGprE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 h1:sJLYcS+eZn5EeNINGHSCRAwUJMFVqklwkH36Vbyai7M= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 h1:1mnRASEKnkqsntcxHaysxwgVoUUp5dkiB+l3llKnqyg= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25/go.mod h1:zBHOPwhBc3FlQjQJE/D3IfPWiWaQmT06Vq9aNukDo0k= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32 h1:p5luUImdIqywn6JpQsW3tq5GNOxKmOnEpybzPx+d1lk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32/go.mod h1:XGhIBZDEgfqmFIugclZ6FU7v75nHhBDtzuB4xB/tEi4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 h1:DWYZIsyqagnWL00f8M/SOr9fN063OEQWn9LLTbdYXsk= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23/go.mod h1:uIiFgURZbACBEQJfqTZPb/jxO7R+9LeoHUFudtIdeQI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 h1:CeuSeq/8FnYpPtnuIeLQEEvDv9zUjneuYi8EghMBdwQ= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26/go.mod h1:2UqAAwMUXKeRkAHIlDJqvMVgOWkUi/AUXPk/YIe+Dg4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25 h1:5LHn8JQ0qvjD9L9JhMtylnkcw7j05GDZqM9Oin6hpr0= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25/go.mod h1:/95IA+0lMnzW6XzqYJRpjjsAbKEORVeO0anQqjd2CNU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 h1:e2ooMhpYGhDnBfSvIyusvAwX7KexuZaHbQY2Dyei7VU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0/go.mod h1:bh2E0CXKZsQN+faiKVqC40vfNMAWheoULBCnEgO9K+8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 h1:B1G2pSPvbAtQjilPq+Y7jLIzCOwKzuVEl+aBBaNG0AQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0/go.mod h1:ncltU6n4Nof5uJttDtcNQ537uNuwYqsZZQcpkd2/GUQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.6 h1:5V7DWLBd7wTELVz5bPpwzYy/sikk0gsgZfj40X+l5OI= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.6/go.mod h1:Y1VOmit/Fn6Tz1uFAeCO6Q7M2fmfXSCLeL5INVYsLuY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6 h1:B8cauxOH1W1v7rd8RdI/MWnoR4Ze0wIHWrb90qczxj4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6/go.mod h1:Lh/bc9XUf8CfOY6Jp5aIkQtN+j1mc+nExc+KXj9jx2s= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.7 h1:bWNgNdRko2x6gqa0blfATqAZKZokPIeM1vfmQt2pnvM= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= +github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= +github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg= +github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= @@ -31,8 +150,16 @@ github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/microsoft/go-mssqldb v1.7.0 h1:sgMPW0HA6Ihd37Yx0MzHyKD726C2kY/8KJsQtXHNaAs= +github.com/microsoft/go-mssqldb v1.7.0/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= @@ -42,6 +169,13 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= @@ -50,18 +184,36 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.52.3 h1:5f8uj6ZwHSscOGNdIQg6OiZv/ybiK2CO2q2drVZAQSA= github.com/prometheus/common v0.52.3/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/sijms/go-ora/v2 v2.8.11 h1:oQtSX145kCYSjnrmWdtqp2LON9wOQW09wPJ5pIEn5Tg= +github.com/sijms/go-ora/v2 v2.8.11/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/snowflakedb/gosnowflake v1.9.0 h1:s2ZdwFxFfpqwa5CqlhnzRESnLmwU3fED6zyNOJHFBQA= +github.com/snowflakedb/gosnowflake v1.9.0/go.mod h1:4ZgHxVf2OKwecx07WjfyAMr0gn8Qj4yvwAo68Og8wsU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.opentelemetry.io/collector v0.98.1-0.20240416174005-d0f15e2463f8 h1:yb2vz4uw9P5ZmF04yY1p7sHI+J3IPcbpslu8TlIpyRs= go.opentelemetry.io/collector v0.98.1-0.20240416174005-d0f15e2463f8/go.mod h1:1C8p9Ut+hr/W6VWq9340TaLm2QAzwJ78X36ZfiEM69c= go.opentelemetry.io/collector/component v0.98.1-0.20240416174005-d0f15e2463f8 h1:i2zDUQdn0OGXyN2OozGK4VbX3c3zjA+dCPhykln69No= @@ -103,34 +255,73 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= +gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= @@ -138,7 +329,13 @@ google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDom google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/receiver/sqlserverreceiver/package_test.go b/receiver/sqlserverreceiver/package_test.go index 2aed75e4608d..0ac71ef964af 100644 --- a/receiver/sqlserverreceiver/package_test.go +++ b/receiver/sqlserverreceiver/package_test.go @@ -9,6 +9,7 @@ import ( "go.uber.org/goleak" ) +// Regarding the godbus/dbus ignore: see https://github.com/99designs/keyring/issues/103 func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/godbus/dbus.(*Conn).inWorker")) } diff --git a/receiver/sqlserverreceiver/scraper.go b/receiver/sqlserverreceiver/scraper.go new file mode 100644 index 000000000000..3da7cf452693 --- /dev/null +++ b/receiver/sqlserverreceiver/scraper.go @@ -0,0 +1,138 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlserverreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver" + +import ( + "context" + "database/sql" + "errors" + "fmt" + "strconv" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/scraperhelper" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver/internal/metadata" +) + +type sqlServerScraperHelper struct { + id component.ID + sqlQuery string + instanceName string + scrapeCfg scraperhelper.ControllerConfig + clientProviderFunc sqlquery.ClientProviderFunc + dbProviderFunc sqlquery.DbProviderFunc + logger *zap.Logger + telemetry sqlquery.TelemetryConfig + client sqlquery.DbClient + db *sql.DB + mb *metadata.MetricsBuilder +} + +var _ scraperhelper.Scraper = (*sqlServerScraperHelper)(nil) + +func newSQLServerScraper(id component.ID, + query string, + instanceName string, + scrapeCfg scraperhelper.ControllerConfig, + logger *zap.Logger, + telemetry sqlquery.TelemetryConfig, + dbProviderFunc sqlquery.DbProviderFunc, + clientProviderFunc sqlquery.ClientProviderFunc, + mb *metadata.MetricsBuilder) *sqlServerScraperHelper { + + return &sqlServerScraperHelper{ + id: id, + sqlQuery: query, + instanceName: instanceName, + scrapeCfg: scrapeCfg, + logger: logger, + telemetry: telemetry, + dbProviderFunc: dbProviderFunc, + clientProviderFunc: clientProviderFunc, + mb: mb, + } +} + +func (s *sqlServerScraperHelper) ID() component.ID { + return s.id +} + +func (s *sqlServerScraperHelper) Start(context.Context, component.Host) error { + var err error + s.db, err = s.dbProviderFunc() + if err != nil { + return fmt.Errorf("failed to open Db connection: %w", err) + } + s.client = s.clientProviderFunc(sqlquery.DbWrapper{Db: s.db}, s.sqlQuery, s.logger, s.telemetry) + + return nil +} + +func (s *sqlServerScraperHelper) Scrape(ctx context.Context) (pmetric.Metrics, error) { + var err error + + rb := s.mb.NewResourceBuilder() + switch s.sqlQuery { + case getSQLServerDatabaseIOQuery(s.instanceName): + err = s.recordDatabaseIOMetrics(ctx, rb) + default: + return pmetric.Metrics{}, fmt.Errorf("Attempted to get metrics from unsupported query: %s", s.sqlQuery) + } + + if err != nil { + return pmetric.Metrics{}, err + } + + return s.mb.Emit(metadata.WithResource(rb.Emit())), nil +} + +func (s *sqlServerScraperHelper) Shutdown(_ context.Context) error { + if s.db != nil { + return s.db.Close() + } + return nil +} + +func (s *sqlServerScraperHelper) recordDatabaseIOMetrics(ctx context.Context, rb *metadata.ResourceBuilder) error { + // TODO: Move constants out to the package level when other queries are added. + const computerNameKey = "computer_name" + const databaseNameKey = "database_name" + const instanceNameKey = "sql_instance" + const readLatencyMsKey = "read_latency_ms" + + rows, err := s.client.QueryRows(ctx) + if err != nil { + if errors.Is(err, sqlquery.ErrNullValueWarning) { + s.logger.Warn("problems encountered getting metric rows", zap.Error(err)) + } else { + return fmt.Errorf("sqlServerScraperHelper: %w", err) + } + } + + var errs []error + for i, row := range rows { + if i == 0 { + rb.SetSqlserverComputerName(row[computerNameKey]) + rb.SetSqlserverDatabaseName(row[databaseNameKey]) + rb.SetSqlserverInstanceName(row[instanceNameKey]) + } + + _, err = strconv.ParseFloat(row[readLatencyMsKey], 64) + if err != nil { + err = fmt.Errorf("row %d: %w", i, err) + errs = append(errs, err) + } + // TODO: Set metrics here if no parsing error occurred. + } + + if len(rows) == 0 { + s.logger.Info("SQLServerScraperHelper: No rows found by query") + } + + return errors.Join(errs...) +} diff --git a/receiver/sqlserverreceiver/scraper_test.go b/receiver/sqlserverreceiver/scraper_test.go new file mode 100644 index 000000000000..00c63af6dfc9 --- /dev/null +++ b/receiver/sqlserverreceiver/scraper_test.go @@ -0,0 +1,130 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlserverreceiver + +import ( + "context" + "encoding/json" + "fmt" + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/receiver/receivertest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest" +) + +func TestSuccessfulScrape(t *testing.T) { + cfg := createDefaultConfig().(*Config) + cfg.Username = "sa" + cfg.Password = "password" + cfg.Port = 1433 + cfg.Server = "0.0.0.0" + cfg.MetricsBuilderConfig.ResourceAttributes.SqlserverInstanceName.Enabled = true + + assert.NoError(t, cfg.Validate()) + + // Ensure there aren't any scrapers when all metrics are disabled. + scrapers := setupSQLServerScrapers(receivertest.NewNopCreateSettings(), cfg) + assert.NotEmpty(t, scrapers) + + // Ensure all metrics are received when all are enabled. + scrapers = setupSQLServerScrapers(receivertest.NewNopCreateSettings(), cfg) + assert.NotNil(t, scrapers) + + for _, scraper := range scrapers { + err := scraper.Start(context.Background(), componenttest.NewNopHost()) + assert.NoError(t, err) + defer func() { assert.NoError(t, scraper.Shutdown(context.Background())) }() + + scraper.client = mockClient{ + instanceName: scraper.instanceName, + SQL: scraper.sqlQuery, + } + + actualMetrics, err := scraper.Scrape(context.Background()) + assert.NoError(t, err) + + expectedFile := filepath.Join("testdata", "expected_database_io.yaml") + // Uncomment line below to re-generate expected metrics. + // golden.WriteMetrics(t, expectedFile, actualMetrics) + expectedMetrics, err := golden.ReadMetrics(expectedFile) + assert.NoError(t, err) + + assert.NoError(t, pmetrictest.CompareMetrics(actualMetrics, expectedMetrics, + pmetrictest.IgnoreMetricDataPointsOrder(), + pmetrictest.IgnoreStartTimestamp(), + pmetrictest.IgnoreTimestamp())) + } +} + +func TestScrapeInvalidQuery(t *testing.T) { + cfg := createDefaultConfig().(*Config) + cfg.Username = "sa" + cfg.Password = "password" + cfg.Port = 1433 + cfg.Server = "0.0.0.0" + cfg.MetricsBuilderConfig.ResourceAttributes.SqlserverInstanceName.Enabled = true + + assert.NoError(t, cfg.Validate()) + + // Ensure all metrics are received when all are enabled. + scrapers := setupSQLServerScrapers(receivertest.NewNopCreateSettings(), cfg) + assert.NotNil(t, scrapers) + + for _, scraper := range scrapers { + err := scraper.Start(context.Background(), componenttest.NewNopHost()) + assert.NoError(t, err) + defer func() { assert.NoError(t, scraper.Shutdown(context.Background())) }() + + scraper.client = mockClient{ + instanceName: scraper.instanceName, + SQL: "Invalid SQL query", + } + + actualMetrics, err := scraper.Scrape(context.Background()) + assert.Error(t, err) + assert.Empty(t, actualMetrics) + } +} + +var _ sqlquery.DbClient = (*mockClient)(nil) + +type mockClient struct { + SQL string + instanceName string +} + +func readFile(fname string) ([]sqlquery.StringMap, error) { + file, err := os.ReadFile(filepath.Join("testdata", fname)) + if err != nil { + return nil, err + } + + var metrics []sqlquery.StringMap + err = json.Unmarshal(file, &metrics) + if err != nil { + return nil, err + } + + return metrics, nil + +} + +func (mc mockClient) QueryRows(context.Context, ...any) ([]sqlquery.StringMap, error) { + if mc.SQL == getSQLServerDatabaseIOQuery(mc.instanceName) { + queryResults, err := readFile("database_io_scraped_data.txt") + if err != nil { + return nil, err + } + return queryResults, nil + } + + return nil, fmt.Errorf("No valid query found") +} diff --git a/receiver/sqlserverreceiver/testdata/database_io_scraped_data.txt b/receiver/sqlserverreceiver/testdata/database_io_scraped_data.txt new file mode 100644 index 000000000000..5253553676b7 --- /dev/null +++ b/receiver/sqlserverreceiver/testdata/database_io_scraped_data.txt @@ -0,0 +1,242 @@ +[ + { + "database_name": "master", + "file_type": "ROWS", + "logical_filename": "master", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/master.mdf", + "read_bytes": "4022272", + "read_latency_ms": "62", + "reads": "73", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "4096000", + "write_latency_ms": "130", + "writes": "329" + }, + { + "database_name": "master", + "file_type": "LOG", + "logical_filename": "mastlog", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/mastlog.ldf", + "read_bytes": "916480", + "read_latency_ms": "8", + "reads": "17", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "8061952", + "write_latency_ms": "3302", + "writes": "608" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb.mdf", + "read_bytes": "2113536", + "read_latency_ms": "9", + "reads": "35", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "32768", + "write_latency_ms": "0", + "writes": "4" + }, + { + "database_name": "tempdb", + "file_type": "LOG", + "logical_filename": "templog", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/templog.ldf", + "read_bytes": "1007616", + "read_latency_ms": "2", + "reads": "7", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "180224", + "write_latency_ms": "4", + "writes": "17" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev2", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb2.ndf", + "read_bytes": "131072", + "read_latency_ms": "1", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "90112", + "write_latency_ms": "1", + "writes": "11" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev3", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb3.ndf", + "read_bytes": "131072", + "read_latency_ms": "2", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "90112", + "write_latency_ms": "2", + "writes": "11" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev4", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb4.ndf", + "read_bytes": "131072", + "read_latency_ms": "1", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "90112", + "write_latency_ms": "2", + "writes": "11" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev5", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb5.ndf", + "read_bytes": "131072", + "read_latency_ms": "2", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "90112", + "write_latency_ms": "2", + "writes": "11" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev6", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb6.ndf", + "read_bytes": "131072", + "read_latency_ms": "2", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "90112", + "write_latency_ms": "2", + "writes": "11" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev7", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb7.ndf", + "read_bytes": "131072", + "read_latency_ms": "1", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "90112", + "write_latency_ms": "2", + "writes": "11" + }, + { + "database_name": "tempdb", + "file_type": "ROWS", + "logical_filename": "tempdev8", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/tempdb8.ndf", + "read_bytes": "131072", + "read_latency_ms": "1", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "90112", + "write_latency_ms": "1", + "writes": "11" + }, + { + "database_name": "model", + "file_type": "ROWS", + "logical_filename": "modeldev", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/model.mdf", + "read_bytes": "10575872", + "read_latency_ms": "21", + "reads": "53", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "860160", + "write_latency_ms": "16", + "writes": "80" + }, + { + "database_name": "model", + "file_type": "LOG", + "logical_filename": "modellog", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/modellog.ldf", + "read_bytes": "1150464", + "read_latency_ms": "7", + "reads": "11", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "968704", + "write_latency_ms": "31", + "writes": "111" + }, + { + "database_name": "msdb", + "file_type": "ROWS", + "logical_filename": "MSDBData", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/MSDBData.mdf", + "read_bytes": "6840320", + "read_latency_ms": "51", + "reads": "108", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "991232", + "write_latency_ms": "26", + "writes": "102" + }, + { + "database_name": "msdb", + "file_type": "LOG", + "logical_filename": "MSDBLog", + "measurement": "sqlserver_database_io", + "physical_filename": "/var/opt/mssql/data/MSDBLog.ldf", + "read_bytes": "660992", + "read_latency_ms": "5", + "reads": "9", + "rg_read_stall_ms": "0", + "rg_write_stall_ms": "0", + "sql_instance": "8cac97ac9b8f", + "write_bytes": "1019904", + "write_latency_ms": "27", + "writes": "117" + } +] diff --git a/receiver/sqlserverreceiver/testdata/expected_database_io.yaml b/receiver/sqlserverreceiver/testdata/expected_database_io.yaml new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/receiver/sqlserverreceiver/testdata/expected_database_io.yaml @@ -0,0 +1 @@ +{}