diff --git a/receiver/hostmetricsreceiver/config_test.go b/receiver/hostmetricsreceiver/config_test.go index 4b30d09a9622..26e609600522 100644 --- a/receiver/hostmetricsreceiver/config_test.go +++ b/receiver/hostmetricsreceiver/config_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/otelcol/otelcoltest" + "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/receiver/scraperhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset" @@ -31,127 +31,133 @@ import ( ) func TestLoadConfig(t *testing.T) { - factories, err := otelcoltest.NopFactories() - require.NoError(t, err) - - factory := NewFactory() - factories.Receivers[metadata.Type] = factory - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594 - // nolint:staticcheck - cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) + t.Parallel() + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) require.NoError(t, err) - require.NotNil(t, cfg) - - assert.Len(t, cfg.Receivers, 2) - - r0 := cfg.Receivers[component.NewID(metadata.Type)] - defaultConfigCPUScraper := factory.CreateDefaultConfig() - defaultConfigCPUScraper.(*Config).Scrapers = map[string]internal.Config{ - cpuscraper.TypeStr: func() internal.Config { - cfg := (&cpuscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) - return cfg - }(), - } - assert.Equal(t, defaultConfigCPUScraper, r0) - - r1 := cfg.Receivers[component.NewIDWithName(metadata.Type, "customname")].(*Config) - expectedConfig := &Config{ - MetadataCollectionInterval: 5 * time.Minute, - ControllerConfig: scraperhelper.ControllerConfig{ - CollectionInterval: 30 * time.Second, - InitialDelay: time.Second, - }, - Scrapers: map[string]internal.Config{ - cpuscraper.TypeStr: func() internal.Config { - cfg := (&cpuscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) - return cfg - }(), - diskscraper.TypeStr: func() internal.Config { - cfg := (&diskscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) - return cfg - }(), - loadscraper.TypeStr: (func() internal.Config { - cfg := (&loadscraper.Factory{}).CreateDefaultConfig() - cfg.(*loadscraper.Config).CPUAverage = true - cfg.SetEnvMap(common.EnvMap{}) - return cfg - })(), - filesystemscraper.TypeStr: func() internal.Config { - cfg := (&filesystemscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) - return cfg - }(), - memoryscraper.TypeStr: func() internal.Config { - cfg := (&memoryscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) - return cfg - }(), - networkscraper.TypeStr: (func() internal.Config { - cfg := (&networkscraper.Factory{}).CreateDefaultConfig() - cfg.(*networkscraper.Config).Include = networkscraper.MatchConfig{ - Interfaces: []string{"test1"}, - Config: filterset.Config{MatchType: "strict"}, - } - cfg.SetEnvMap(common.EnvMap{}) - return cfg - })(), - processesscraper.TypeStr: func() internal.Config { - cfg := (&processesscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) + tests := []struct { + id component.ID + expected component.Config + }{ + { + id: component.NewID(metadata.Type), + expected: func() component.Config { + cfg := createDefaultConfig().(*Config) + cfg.Scrapers = map[string]internal.Config{ + cpuscraper.TypeStr: func() internal.Config { + cfg := (&cpuscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + }()} return cfg }(), - pagingscraper.TypeStr: func() internal.Config { - cfg := (&pagingscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) - return cfg - }(), - processscraper.TypeStr: (func() internal.Config { - cfg := (&processscraper.Factory{}).CreateDefaultConfig() - cfg.(*processscraper.Config).Include = processscraper.MatchConfig{ - Names: []string{"test2", "test3"}, - Config: filterset.Config{MatchType: "regexp"}, - } - cfg.SetEnvMap(common.EnvMap{}) - return cfg - })(), - systemscraper.TypeStr: (func() internal.Config { - cfg := (&systemscraper.Factory{}).CreateDefaultConfig() - cfg.SetEnvMap(common.EnvMap{}) - return cfg - })(), + }, + { + id: component.NewIDWithName(metadata.Type, "customname"), + expected: &Config{ + MetadataCollectionInterval: 5 * time.Minute, + ControllerConfig: scraperhelper.ControllerConfig{ + CollectionInterval: 30 * time.Second, + InitialDelay: time.Second, + }, + Scrapers: map[string]internal.Config{ + cpuscraper.TypeStr: func() internal.Config { + cfg := (&cpuscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + }(), + diskscraper.TypeStr: func() internal.Config { + cfg := (&diskscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + }(), + loadscraper.TypeStr: (func() internal.Config { + cfg := (&loadscraper.Factory{}).CreateDefaultConfig() + cfg.(*loadscraper.Config).CPUAverage = true + cfg.SetEnvMap(common.EnvMap{}) + return cfg + })(), + filesystemscraper.TypeStr: func() internal.Config { + cfg := (&filesystemscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + }(), + memoryscraper.TypeStr: func() internal.Config { + cfg := (&memoryscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + }(), + networkscraper.TypeStr: (func() internal.Config { + cfg := (&networkscraper.Factory{}).CreateDefaultConfig() + cfg.(*networkscraper.Config).Include = networkscraper.MatchConfig{ + Interfaces: []string{"test1"}, + Config: filterset.Config{MatchType: "strict"}, + } + cfg.SetEnvMap(common.EnvMap{}) + return cfg + })(), + processesscraper.TypeStr: func() internal.Config { + cfg := (&processesscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + }(), + pagingscraper.TypeStr: func() internal.Config { + cfg := (&pagingscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + }(), + processscraper.TypeStr: (func() internal.Config { + cfg := (&processscraper.Factory{}).CreateDefaultConfig() + cfg.(*processscraper.Config).Include = processscraper.MatchConfig{ + Names: []string{"test2", "test3"}, + Config: filterset.Config{MatchType: "regexp"}, + } + cfg.SetEnvMap(common.EnvMap{}) + return cfg + })(), + systemscraper.TypeStr: (func() internal.Config { + cfg := (&systemscraper.Factory{}).CreateDefaultConfig() + cfg.SetEnvMap(common.EnvMap{}) + return cfg + })(), + }, + }, }, } - assert.Equal(t, expectedConfig, r1) + for _, tt := range tests { + t.Run(tt.id.String(), func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(tt.id.String()) + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(cfg)) + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg) + }) + } } func TestLoadInvalidConfig_NoScrapers(t *testing.T) { - factories, err := otelcoltest.NopFactories() - require.NoError(t, err) - factory := NewFactory() - factories.Receivers[metadata.Type] = factory - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594 - // nolint:staticcheck - _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-noscrapers.yaml"), factories) + cfg := factory.CreateDefaultConfig() + + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config-noscrapers.yaml")) + require.NoError(t, err) - require.ErrorContains(t, err, "must specify at least one scraper when using hostmetrics receiver") + require.NoError(t, cm.Unmarshal(cfg)) + require.ErrorContains(t, component.ValidateConfig(cfg), "must specify at least one scraper when using hostmetrics receiver") } func TestLoadInvalidConfig_InvalidScraperKey(t *testing.T) { - factories, err := otelcoltest.NopFactories() - require.NoError(t, err) - factory := NewFactory() - factories.Receivers[metadata.Type] = factory - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594 - // nolint:staticcheck - _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-invalidscraperkey.yaml"), factories) + cfg := factory.CreateDefaultConfig() + + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config-invalidscraperkey.yaml")) + require.NoError(t, err) - require.ErrorContains(t, err, "error reading configuration for \"hostmetrics\": invalid scraper key: invalidscraperkey") + require.ErrorContains(t, cm.Unmarshal(cfg), "invalid scraper key: invalidscraperkey") } diff --git a/receiver/hostmetricsreceiver/go.mod b/receiver/hostmetricsreceiver/go.mod index 8045074fce28..98212cc4abf7 100644 --- a/receiver/hostmetricsreceiver/go.mod +++ b/receiver/hostmetricsreceiver/go.mod @@ -20,7 +20,6 @@ require ( go.opentelemetry.io/collector/consumer/consumertest v0.116.0 go.opentelemetry.io/collector/featuregate v1.22.0 go.opentelemetry.io/collector/filter v0.116.0 - go.opentelemetry.io/collector/otelcol/otelcoltest v0.116.0 go.opentelemetry.io/collector/pdata v1.22.0 go.opentelemetry.io/collector/pipeline v0.116.0 go.opentelemetry.io/collector/receiver v0.116.0 @@ -37,7 +36,6 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/log v0.1.0 // indirect @@ -61,7 +59,6 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.11 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect @@ -80,7 +77,6 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.116.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.116.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -88,72 +84,29 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.20.5 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.61.0 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/spf13/cobra v1.8.1 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/testcontainers/testcontainers-go v0.34.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.116.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.116.0 // indirect - go.opentelemetry.io/collector/confmap/provider/envprovider v1.22.0 // indirect - go.opentelemetry.io/collector/confmap/provider/fileprovider v1.22.0 // indirect - go.opentelemetry.io/collector/confmap/provider/httpprovider v1.22.0 // indirect - go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.22.0 // indirect - go.opentelemetry.io/collector/connector v0.116.0 // indirect - go.opentelemetry.io/collector/connector/connectortest v0.116.0 // indirect - go.opentelemetry.io/collector/connector/xconnector v0.116.0 // indirect go.opentelemetry.io/collector/consumer/consumererror v0.116.0 // indirect go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 // indirect - go.opentelemetry.io/collector/exporter v0.116.0 // indirect - go.opentelemetry.io/collector/exporter/exportertest v0.116.0 // indirect - go.opentelemetry.io/collector/exporter/xexporter v0.116.0 // indirect - go.opentelemetry.io/collector/extension v0.116.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.116.0 // indirect - go.opentelemetry.io/collector/extension/extensiontest v0.116.0 // indirect - go.opentelemetry.io/collector/internal/fanoutconsumer v0.116.0 // indirect - go.opentelemetry.io/collector/otelcol v0.116.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.116.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.116.0 // indirect - go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0 // indirect - go.opentelemetry.io/collector/processor v0.116.0 // indirect - go.opentelemetry.io/collector/processor/processortest v0.116.0 // indirect - go.opentelemetry.io/collector/processor/xprocessor v0.116.0 // indirect go.opentelemetry.io/collector/receiver/xreceiver v0.116.0 // indirect - go.opentelemetry.io/collector/service v0.116.0 // indirect - go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 // indirect - go.opentelemetry.io/contrib/config v0.10.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.31.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.54.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect - go.opentelemetry.io/otel/log v0.8.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect - go.opentelemetry.io/otel/sdk/log v0.7.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect golang.org/x/crypto v0.31.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/net v0.32.0 // indirect golang.org/x/text v0.21.0 // indirect - gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect google.golang.org/grpc v1.69.0 // indirect diff --git a/receiver/hostmetricsreceiver/go.sum b/receiver/hostmetricsreceiver/go.sum index 43551f7fa751..0e11b996f023 100644 --- a/receiver/hostmetricsreceiver/go.sum +++ b/receiver/hostmetricsreceiver/go.sum @@ -6,8 +6,6 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -18,7 +16,6 @@ github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpS github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -36,8 +33,6 @@ github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/ github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= @@ -56,8 +51,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -70,8 +63,6 @@ github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKe github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 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= @@ -88,8 +79,6 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -117,14 +106,10 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= -github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -133,19 +118,10 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus-community/windows_exporter v0.27.2 h1:/tdRTouPMVsC4qt8+s9NOPEm7L/9qdDxmasiETlx+Wk= github.com/prometheus-community/windows_exporter v0.27.2/go.mod h1:8+T6hfv71nvgVIzguouXkIGoa15ni+uXHHULBOA2bZo= -github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= -github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= -github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= -github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= github.com/shirou/gopsutil/v4 v4.24.11 h1:WaU9xqGFKvFfsUv94SXcUPD7rCkU0vr/asVdQOBZNj8= @@ -156,10 +132,6 @@ github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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= @@ -177,48 +149,14 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector v0.116.0 h1:Dscd6Nsnc7hjFQosO0SofcPQsXRfcj5N5PjQAslnmj4= -go.opentelemetry.io/collector v0.116.0/go.mod h1:Ug2hpW0SINPmJAGVEALRlux78NTZc3YXSuh5/Q/hFrA= -go.opentelemetry.io/collector/client v1.22.0 h1:AAUzHuqYQqxoNqacw1WXgGF/MxtBTwNZuhBvJIorgA0= -go.opentelemetry.io/collector/client v1.22.0/go.mod h1:wcCSdTwbDVNTycoqs7BiDNVj3e1Ta7EnWH2sAofKnEk= go.opentelemetry.io/collector/component v0.116.0 h1:SQE1YeVfYCN7bw1n4hknUwJE5U/1qJL552sDhAdSlaA= go.opentelemetry.io/collector/component v0.116.0/go.mod h1:MYgXFZWDTq0uPgF1mkLSFibtpNqksRVAOrmihckOQEs= -go.opentelemetry.io/collector/component/componentstatus v0.116.0 h1:wpgY0H2K9IPBzaNAvavKziK86VZ7TuNFQbS9OC4Z6Cs= -go.opentelemetry.io/collector/component/componentstatus v0.116.0/go.mod h1:ZRlVwHFMGNfcsAywEJqivOn5JzDZkpe3KZVSwMWu4tw= go.opentelemetry.io/collector/component/componenttest v0.116.0 h1:UIcnx4Rrs/oDRYSAZNHRMUiYs2FBlwgV5Nc0oMYfR6A= go.opentelemetry.io/collector/component/componenttest v0.116.0/go.mod h1:W40HaKPHdBFMVI7zzHE7dhdWC+CgAnAC9SmWetFBATY= -go.opentelemetry.io/collector/config/configauth v0.116.0 h1:8Y5y18fxilLobjDqNHO5FvGhC5HKYupWhT1DB3KrFaw= -go.opentelemetry.io/collector/config/configauth v0.116.0/go.mod h1:2JZ5PRvNZcrBvPz1SjPWCwFQx7qXGVginb7AkFQu0iU= -go.opentelemetry.io/collector/config/configcompression v1.22.0 h1:B4UCZjW2IVootcEL3iZFnCp8BOhLKEnWkHXHSo23ewk= -go.opentelemetry.io/collector/config/configcompression v1.22.0/go.mod h1:LvYG00tbPTv0NOLoZN0wXq1F5thcxvukO8INq7xyfWU= -go.opentelemetry.io/collector/config/confighttp v0.116.0 h1:MLI88LmGzlN5D4pH6nFMg5hU3UCeTZb72iVx1lWb0c8= -go.opentelemetry.io/collector/config/confighttp v0.116.0/go.mod h1:iJzNYVOiE1V3lpOIZIkR3JJk3aX/RGp9+SEssJMJ/bY= -go.opentelemetry.io/collector/config/configopaque v1.22.0 h1:CJgsm/Ynr2JE5Y66hYJBdybjHs20ywHtBHiV1jlI4yE= -go.opentelemetry.io/collector/config/configopaque v1.22.0/go.mod h1:sW0t0iI/VfRL9VYX7Ik6XzVgPcR+Y5kejTLsYcMyDWs= -go.opentelemetry.io/collector/config/configretry v1.22.0 h1:gKZeYPvCho1+pO6ePRXkloA2nKUUFnA+yBUSHfOzJPU= -go.opentelemetry.io/collector/config/configretry v1.22.0/go.mod h1:cleBc9I0DIWpTiiHfu9v83FUaCTqcPXmebpLxjEIqro= go.opentelemetry.io/collector/config/configtelemetry v0.116.0 h1:Vl49VCHQwBOeMswDpFwcl2HD8e9y94xlrfII3SR2VeQ= go.opentelemetry.io/collector/config/configtelemetry v0.116.0/go.mod h1:SlBEwQg0qly75rXZ6W1Ig8jN25KBVBkFIIAUI1GiAAE= -go.opentelemetry.io/collector/config/configtls v1.22.0 h1:Bu+GZMBYCufYDF72Wup+3jIGNsHuQUvZpMEPjllmYus= -go.opentelemetry.io/collector/config/configtls v1.22.0/go.mod h1:CYFyMvbf10EoWhoFG8EYyxzFy4jcIPGIRMc8/HWLNQM= -go.opentelemetry.io/collector/config/internal v0.116.0 h1:RG4tvK6Ozzk/SBUPyTnGD+miya0U7Z7GSpCY92qIEUY= -go.opentelemetry.io/collector/config/internal v0.116.0/go.mod h1:OVkadRWlKAoWjHslqjWtBLAne8ceQm8WYT71ZcBWLFc= go.opentelemetry.io/collector/confmap v1.22.0 h1:ZKQzRuj5lKu+seKArAAZ1yPRroDPricaIVIREm/jr3w= go.opentelemetry.io/collector/confmap v1.22.0/go.mod h1:Rrhs+MWoaP6AswZp+ReQ2VO9dfOfcUjdjiSHBsG+nec= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.22.0 h1:AdHaQo/GSSRLJvEFLCMHo02r+u6Ed8j0/MNz7u3noug= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.22.0/go.mod h1:InKYEGFdkwz3H2q648kT6rMCFBhPvevIW9ZbWIY5QR4= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.22.0 h1:upFhnU8EyPp0WMR53mJIdx+UR2EGFOr+ppYKzUCY/Vg= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.22.0/go.mod h1:FhjMWU5nf3IctX27lVZomM5SKMyRywShRsA4/rHoBe8= -go.opentelemetry.io/collector/confmap/provider/httpprovider v1.22.0 h1:jKLicfZRiA+G/sgso26aM6Dmmva4Dx9Txk2R58+R3e8= -go.opentelemetry.io/collector/confmap/provider/httpprovider v1.22.0/go.mod h1:nZhEGDufHuZAaeVyFVz15IluXwrnQRCp+U/w7j8Lx9Y= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.22.0 h1:dkiNwLxBqeNDN5fIwtvr2GoA0I2xZB2SEdQ9ceBbJVs= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.22.0/go.mod h1:P9SxKZvim1C3K1R2j3gI+Qb4/l9MffX2sY5f9ajsk7Y= -go.opentelemetry.io/collector/connector v0.116.0 h1:0Pz8RAXH1swLeA1fiyGGQWdv0Kemz4mbq+jnmd1TACE= -go.opentelemetry.io/collector/connector v0.116.0/go.mod h1:VQiZ2yW9KhZuF0yjDbvlgrAxm7+o8KQoxHxurQWLjKU= -go.opentelemetry.io/collector/connector/connectortest v0.116.0 h1:MdttvjqdZmp0ewW5IPCEtzzYmCqxrQxsjJ5m6gMVjzA= -go.opentelemetry.io/collector/connector/connectortest v0.116.0/go.mod h1:ko7aPyvAVf6SvRhWGZdPXSyk+7zPmsSCcMq0gYPMMIQ= -go.opentelemetry.io/collector/connector/xconnector v0.116.0 h1:fFJzrRco0g7HMkhnQ+ehlvicFf58vzsCLXnfuHyQM8w= -go.opentelemetry.io/collector/connector/xconnector v0.116.0/go.mod h1:m9oCk32zX6wDciYBpy+qMQkWKtOxb0gAkEUm8+trflY= go.opentelemetry.io/collector/consumer v1.22.0 h1:QmfnNizyNZFt0uK3GG/EoT5h6PvZJ0dgVTc5hFEc1l0= go.opentelemetry.io/collector/consumer v1.22.0/go.mod h1:tiz2khNceFAPokxxfzAuFfIpShBasMT2AL2Sbc7+m0I= go.opentelemetry.io/collector/consumer/consumererror v0.116.0 h1:GRPnuvwxUeHKVTRzy35di8OFlxypY4YWrK+1nWMsExM= @@ -227,34 +165,10 @@ go.opentelemetry.io/collector/consumer/consumertest v0.116.0 h1:pIVR7FtQMNAzfxBU go.opentelemetry.io/collector/consumer/consumertest v0.116.0/go.mod h1:cV3cNDiPnls5JdhnOJJFVlclrClg9kPs04cXgYP9Gmk= go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 h1:ZrWvq7HumB0jRYmS2ztZ3hhXRNpUVBWPKMbPhsVGmZM= go.opentelemetry.io/collector/consumer/xconsumer v0.116.0/go.mod h1:C+VFMk8vLzPun6XK8aMts6h4RaDjmzXHCPaiOxzRQzQ= -go.opentelemetry.io/collector/exporter v0.116.0 h1:Ps8sLPiGqJ4XGfmAVR6sxrtNBQOqAaWJvgqEOGxTvUU= -go.opentelemetry.io/collector/exporter v0.116.0/go.mod h1:9alTWZILqY8Y3L/YLdJHFA0sx/LJDgZZjng0PHsIJkU= -go.opentelemetry.io/collector/exporter/exportertest v0.116.0 h1:2XEiNkBtvOq2+KzjM3OA92vlDATAi1Nn+xT9GT74QQc= -go.opentelemetry.io/collector/exporter/exportertest v0.116.0/go.mod h1:t3CYc//OqP5pxpIN/5tYJhVP/mmtyoc5vHkBCau2IkM= -go.opentelemetry.io/collector/exporter/xexporter v0.116.0 h1:z97GOTSJu4qMkp21yeUWAo6gskMEJi2j8vdnakLcKgI= -go.opentelemetry.io/collector/exporter/xexporter v0.116.0/go.mod h1:9wWrMBpX6/s3dSx4mLf+QeEA8ZpYts4GdQkv4BOXEEg= -go.opentelemetry.io/collector/extension v0.116.0 h1:/PYrsAqb87XlC1Cra7I3mU6CDs+TAjqj7LO/9tXX9qk= -go.opentelemetry.io/collector/extension v0.116.0/go.mod h1:OF8pL6ioyT+f2V0CsEaM1EAmqaEMNCIgw7DS4agcOcc= -go.opentelemetry.io/collector/extension/auth v0.116.0 h1:oolKkFBIS4vhJ4ZWTD4Bp+35ATBf7dBsln63RKWAJm0= -go.opentelemetry.io/collector/extension/auth v0.116.0/go.mod h1:3WeZgIiiP7wcB+tID4G3ml6J/R2oJ359PxQh/pUFnSk= -go.opentelemetry.io/collector/extension/experimental/storage v0.116.0 h1:Pb0ljtJMtsdiJoLOWbtVIYAViLkcZUF3V9MUNHyzn1c= -go.opentelemetry.io/collector/extension/experimental/storage v0.116.0/go.mod h1:AQgDz5IJB4d9PExwV6RTlYkiVGp05/+/TAR9gCJpPJA= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.116.0 h1:bXDgoiDiwFfrO5S6q1Wpe0su303CW4Qxthoy4CxG6eg= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.116.0/go.mod h1:uFZlAPxk2+s6zk1W+u22DgxxSDugWy0QaY5kQzjNy7Q= -go.opentelemetry.io/collector/extension/extensiontest v0.116.0 h1:NEPis256V4pFVocdZH6gOdsGDueyOe9vvx/BE9QxMf0= -go.opentelemetry.io/collector/extension/extensiontest v0.116.0/go.mod h1:rpb4W2OimGXY5Oalk/NCemoPhgM03JZxBjXvlIveH5I= -go.opentelemetry.io/collector/extension/zpagesextension v0.116.0 h1:D0VY/ESPwkREfMaqJleGVTiCYoCs3MDipU93ywaIn68= -go.opentelemetry.io/collector/extension/zpagesextension v0.116.0/go.mod h1:MqkQSYKarMrjVSyGrAes1FBcsW6HDDPj/ouvcDvSjfk= go.opentelemetry.io/collector/featuregate v1.22.0 h1:1TUcdqA5VpEsX1Lrr6GG15CptZxDXxiu5AXgwpeNSR4= go.opentelemetry.io/collector/featuregate v1.22.0/go.mod h1:3GaXqflNDVwWndNGBJ1+XJFy3Fv/XrFgjMN60N3z7yg= go.opentelemetry.io/collector/filter v0.116.0 h1:pvN3W2JIEHxWbCLlUS1HxrRo3ZQrN4BiWyLvPFyKfvQ= go.opentelemetry.io/collector/filter v0.116.0/go.mod h1:GoLxnSI6uE6QzmGOaiz0mkgirbQpj2A2Nb18bTKv5gI= -go.opentelemetry.io/collector/internal/fanoutconsumer v0.116.0 h1:KKFb3u8iLk4V5GYz7eVpw8QgEdob5koX6GNEbaoDQJY= -go.opentelemetry.io/collector/internal/fanoutconsumer v0.116.0/go.mod h1:YyWHUWeSnRmy2CF7kPHpwJ6qkVjufbLZ8PYuY0Ph0o8= -go.opentelemetry.io/collector/otelcol v0.116.0 h1:8NoPEY2uAemwNzUcMxiZuuI8w/Ff+0p1DXXk6NVEGlk= -go.opentelemetry.io/collector/otelcol v0.116.0/go.mod h1:c/EhsBdHmC44SxhWMi7pTlYB+I6GBSJNBsj9NCwXMxM= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.116.0 h1:ZNg2kFLKnreaGSMfbr74k1yEbHLxG4ZbVvSIr+XleXo= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.116.0/go.mod h1:TruQJSWWiDRlSYZTcLSE0GeECJZALDw8X8dvoYXUJ+A= go.opentelemetry.io/collector/pdata v1.22.0 h1:3yhjL46NLdTMoP8rkkcE9B0pzjf2973crn0KKhX5UrI= go.opentelemetry.io/collector/pdata v1.22.0/go.mod h1:nLLf6uDg8Kn5g3WNZwGyu8+kf77SwOqQvMTb5AXEbEY= go.opentelemetry.io/collector/pdata/pprofile v0.116.0 h1:iE6lqkO7Hi6lTIIml1RI7yQ55CKqW12R2qHinwF5Zuk= @@ -263,14 +177,6 @@ go.opentelemetry.io/collector/pdata/testdata v0.116.0 h1:zmn1zpeX2BvzL6vt2dBF4Ou go.opentelemetry.io/collector/pdata/testdata v0.116.0/go.mod h1:ytWzICFN4XTDP6o65B4+Ed52JGdqgk9B8CpLHCeCpMo= go.opentelemetry.io/collector/pipeline v0.116.0 h1:o8eKEuWEszmRpfShy7ElBoQ3Jo6kCi9ucm3yRgdNb9s= go.opentelemetry.io/collector/pipeline v0.116.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= -go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0 h1:PFNy+Il/kqPdPL9rhG+1kG63Aauya+FhBKGXoB6ivxU= -go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0/go.mod h1:bVn9V4TGyeXi58/JDkeXCuKtc+V+qcOoTl8hNpV0qa8= -go.opentelemetry.io/collector/processor v0.116.0 h1:Kyu4tPzTdWNHtZjcxvI/bGNAgyv8L8Kem2r/Mk4IDAw= -go.opentelemetry.io/collector/processor v0.116.0/go.mod h1:+/Ugy48RAxlZEXmN2cw51W8t5wdHS9No+GAoP+moskk= -go.opentelemetry.io/collector/processor/processortest v0.116.0 h1:+IqNEVEE0E2MsO2g7+Y/9dz35sDuvAXRXrLts9NdXrA= -go.opentelemetry.io/collector/processor/processortest v0.116.0/go.mod h1:DLaQDBxzgeeaUO0ULMn/efos9PmHZkmYCHuxwCsiVHI= -go.opentelemetry.io/collector/processor/xprocessor v0.116.0 h1:iin/UwuWvSLB7ZNfINFUYbZ5lxIi1NjZ2brkyyFdiRA= -go.opentelemetry.io/collector/processor/xprocessor v0.116.0/go.mod h1:cnA43/XpKDbaOmd8buqKp/LGJ2l/OoCqbR//u5DMfn8= go.opentelemetry.io/collector/receiver v0.116.0 h1:voiBluWLwe4lbyLVwxloK6CudqqszWF+bgYKHuxnETU= go.opentelemetry.io/collector/receiver v0.116.0/go.mod h1:zb6m8l+knUuN62ASCDqQPIm9punK8PEX1mFrF/yzMI8= go.opentelemetry.io/collector/receiver/receivertest v0.116.0 h1:ZF4QVcots0OUiutblkyPR02pc+g7v1QaJSFW8tOzHoQ= @@ -281,48 +187,18 @@ go.opentelemetry.io/collector/scraper v0.116.0 h1:Gdg3v/QUZobHcAAewOlwlaE4XlkRQl go.opentelemetry.io/collector/scraper v0.116.0/go.mod h1:G4SmTIPG8RbxVhTF3zj4EFJx+1tceZbZxhS6mtXOeg0= go.opentelemetry.io/collector/semconv v0.116.0 h1:63xCZomsKJAWmKGWD3lnORiE3WKW6AO4LjnzcHzGx3Y= go.opentelemetry.io/collector/semconv v0.116.0/go.mod h1:N6XE8Q0JKgBN2fAhkUQtqK9LT7rEGR6+Wu/Rtbal1iI= -go.opentelemetry.io/collector/service v0.116.0 h1:1rFmax3ILOlQq4bW//0VKRcG/HmN2rxrgfTybn6bisU= -go.opentelemetry.io/collector/service v0.116.0/go.mod h1:CzQzj72mWr5arag+q8uUWGRuUkenNo5Gw9oA97SFZ78= -go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 h1:j8icMXyyqNf6HGuwlYhniPnVsbJIq7n+WirDu3VAJdQ= -go.opentelemetry.io/contrib/bridges/otelzap v0.6.0/go.mod h1:evIOZpl+kAlU5IsaYX2Siw+IbpacAZvXemVsgt70uvw= -go.opentelemetry.io/contrib/config v0.10.0 h1:2JknAzMaYjxrHkTnZh3eOme/Y2P5eHE2SWfhfV6Xd6c= -go.opentelemetry.io/contrib/config v0.10.0/go.mod h1:aND2M6/KfNkntI5cyvHriR/zvZgPf8j9yETdSmvpfmc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= -go.opentelemetry.io/contrib/propagators/b3 v1.31.0 h1:PQPXYscmwbCp76QDvO4hMngF2j8Bx/OTV86laEl8uqo= -go.opentelemetry.io/contrib/propagators/b3 v1.31.0/go.mod h1:jbqfV8wDdqSDrAYxVpXQnpM0XFMq2FtDesblJ7blOwQ= -go.opentelemetry.io/contrib/zpages v0.56.0 h1:W7vP6s3juzL5KiHpr41zLNmsJ0QAZudYu8ay0zGAoko= -go.opentelemetry.io/contrib/zpages v0.56.0/go.mod h1:IxPRP4TYHw9jLeaEOSDIiA9zmyJNZNO6sbW55iMvSXs= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 h1:mMOmtYie9Fx6TSVzw4W+NTpvoaS1JWWga37oI1a/4qQ= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0/go.mod h1:yy7nDsMMBUkD+jeekJ36ur5f3jJIrmCwUrY67VFhNpA= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 h1:j7ZSD+5yn+lo3sGV69nW04rRR0jhYnBwjuX3r0HvnK0= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0/go.mod h1:WXbYJTUaZXAbYd8lbgGuvih0yuCfOFC5RJoYnoLcGz8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4= -go.opentelemetry.io/otel/exporters/prometheus v0.54.0 h1:rFwzp68QMgtzu9PgP3jm9XaMICI6TsofWWPcBDKwlsU= -go.opentelemetry.io/otel/exporters/prometheus v0.54.0/go.mod h1:QyjcV9qDP6VeK5qPyKETvNjmaaEc7+gqjh4SS0ZYzDU= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 h1:TwmL3O3fRR80m8EshBrd8YydEZMcUCsZXzOUlnFohwM= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0/go.mod h1:tH98dDv5KPmPThswbXA0fr0Lwfs+OhK8HgaCo7PjRrk= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 h1:SZmDnHcgp3zwlPBS2JX2urGYe/jBKEIT6ZedHRUyCz8= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0/go.mod h1:fdWW0HtZJ7+jNpTKUR0GpMEDP69nR8YBJQxNiVCE3jk= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= -go.opentelemetry.io/otel/log v0.8.0 h1:egZ8vV5atrUWUbnSsHn6vB8R21G2wrKqNiDt3iWertk= -go.opentelemetry.io/otel/log v0.8.0/go.mod h1:M9qvDdUTRCopJcGRKg57+JSQ9LgLBrwwfC32epk5NX8= go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/sdk/log v0.7.0 h1:dXkeI2S0MLc5g0/AwxTZv6EUEjctiH8aG14Am56NTmQ= -go.opentelemetry.io/otel/sdk/log v0.7.0/go.mod h1:oIRXpW+WD6M8BuGj5rtS0aRu/86cbDV/dAfNaZBIjYM= go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= @@ -340,8 +216,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= 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/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -381,8 +255,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= -gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= -gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= diff --git a/receiver/hostmetricsreceiver/hostmetrics_linux_test.go b/receiver/hostmetricsreceiver/hostmetrics_linux_test.go index 3876c4444cda..bd4936f14492 100644 --- a/receiver/hostmetricsreceiver/hostmetrics_linux_test.go +++ b/receiver/hostmetricsreceiver/hostmetrics_linux_test.go @@ -13,7 +13,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/otelcol/otelcoltest" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/metadata" @@ -35,13 +34,13 @@ func TestInconsistentRootPaths(t *testing.T) { func TestLoadConfigRootPath(t *testing.T) { t.Setenv("HOST_PROC", "testdata") - factories, _ := otelcoltest.NopFactories() factory := NewFactory() factories.Receivers[metadata.Type] = factory - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594 - // nolint:staticcheck - cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-root-path.yaml"), factories) + cfg := factory.CreateDefaultConfig() + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config-root-path.yaml")) require.NoError(t, err) + require.NoError(t, cm.Unmarshal(cfg)) + globalRootPath = "" r := cfg.Receivers[component.NewID(metadata.Type)].(*Config) @@ -62,13 +61,13 @@ func TestLoadConfigRootPath(t *testing.T) { } func TestLoadInvalidConfig_RootPathNotExist(t *testing.T) { - factories, _ := otelcoltest.NopFactories() factory := NewFactory() factories.Receivers[metadata.Type] = factory - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594 - // nolint:staticcheck - _, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-bad-root-path.yaml"), factories) - assert.ErrorContains(t, err, "invalid root_path:") + cfg := factory.CreateDefaultConfig() + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config-bad-root-path.yaml")) + require.NoError(t, err) + require.NoError(t, cm.Unmarshal(cfg)) + assert.ErrorContains(t, component.ValidateConfig(cfg), "invalid root_path:") globalRootPath = "" } diff --git a/receiver/hostmetricsreceiver/testdata/config-bad-root-path.yaml b/receiver/hostmetricsreceiver/testdata/config-bad-root-path.yaml index cfe0107d5b4f..b819cf4a0189 100644 --- a/receiver/hostmetricsreceiver/testdata/config-bad-root-path.yaml +++ b/receiver/hostmetricsreceiver/testdata/config-bad-root-path.yaml @@ -1,18 +1,3 @@ -receivers: - hostmetrics: - root_path: "does/not/exist" - scrapers: - cpu: - -processors: - nop: - -exporters: - nop: - -service: - pipelines: - metrics: - receivers: [hostmetrics] - processors: [nop] - exporters: [nop] +root_path: "does/not/exist" +scrapers: + cpu: diff --git a/receiver/hostmetricsreceiver/testdata/config-invalidscraperkey.yaml b/receiver/hostmetricsreceiver/testdata/config-invalidscraperkey.yaml index 6d7a55ba5c38..26eb84d7b5df 100644 --- a/receiver/hostmetricsreceiver/testdata/config-invalidscraperkey.yaml +++ b/receiver/hostmetricsreceiver/testdata/config-invalidscraperkey.yaml @@ -1,18 +1,2 @@ -receivers: - hostmetrics: - scrapers: - invalidscraperkey: - - -processors: - nop: - -exporters: - nop: - -service: - pipelines: - metrics: - receivers: [hostmetrics] - processors: [nop] - exporters: [nop] +scrapers: + invalidscraperkey: diff --git a/receiver/hostmetricsreceiver/testdata/config-noscrapers.yaml b/receiver/hostmetricsreceiver/testdata/config-noscrapers.yaml index 1c1ac6f961a6..49327467d659 100644 --- a/receiver/hostmetricsreceiver/testdata/config-noscrapers.yaml +++ b/receiver/hostmetricsreceiver/testdata/config-noscrapers.yaml @@ -1,15 +1 @@ -receivers: - hostmetrics: - -processors: - nop: - -exporters: - nop: - -service: - pipelines: - metrics: - receivers: [hostmetrics] - processors: [nop] - exporters: [nop] +root_path: "testdata" diff --git a/receiver/hostmetricsreceiver/testdata/config-root-path.yaml b/receiver/hostmetricsreceiver/testdata/config-root-path.yaml index e2f1e58f53f0..2685a96247d5 100644 --- a/receiver/hostmetricsreceiver/testdata/config-root-path.yaml +++ b/receiver/hostmetricsreceiver/testdata/config-root-path.yaml @@ -1,18 +1,3 @@ -receivers: - hostmetrics: - root_path: "testdata" - scrapers: - cpu: - -processors: - nop: - -exporters: - nop: - -service: - pipelines: - metrics: - receivers: [hostmetrics] - processors: [nop] - exporters: [nop] +root_path: "testdata" +scrapers: + cpu: diff --git a/receiver/hostmetricsreceiver/testdata/config.yaml b/receiver/hostmetricsreceiver/testdata/config.yaml index fd882c9e6465..aad7fc1f4b03 100644 --- a/receiver/hostmetricsreceiver/testdata/config.yaml +++ b/receiver/hostmetricsreceiver/testdata/config.yaml @@ -1,37 +1,24 @@ -receivers: - hostmetrics: - scrapers: - cpu: - hostmetrics/customname: - collection_interval: 30s - scrapers: - cpu: - disk: - load: - cpu_average: true - filesystem: - memory: - network: - include: - interfaces: ["test1"] - match_type: "strict" - paging: - processes: - process: - include: - names: ["test2", "test3"] - match_type: "regexp" - system: +hostmetrics: + scrapers: + cpu: -processors: - nop: - -exporters: - nop: - -service: - pipelines: - metrics: - receivers: [hostmetrics] - processors: [nop] - exporters: [nop] +hostmetrics/customname: + collection_interval: 30s + scrapers: + cpu: + disk: + load: + cpu_average: true + filesystem: + memory: + network: + include: + interfaces: ["test1"] + match_type: "strict" + paging: + processes: + process: + include: + names: ["test2", "test3"] + match_type: "regexp" + system: