From e4b511579cad10c70dcf19142ff80be6e7e7ca55 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Sun, 14 Jul 2024 11:43:15 -0500 Subject: [PATCH 01/31] netflowreceiver - factory and config According to CONTRIBUTING.md, adding the scaffolding of the netflow receiver for the first PR --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + .github/ISSUE_TEMPLATE/feature_request.yaml | 1 + .github/ISSUE_TEMPLATE/other.yaml | 1 + .github/ISSUE_TEMPLATE/unmaintained.yaml | 1 + receiver/netflowreceiver/Makefile | 1 + receiver/netflowreceiver/README.md | 3 + receiver/netflowreceiver/config.go | 70 +++++++++++++++++++++ receiver/netflowreceiver/doc.go | 6 ++ receiver/netflowreceiver/factory.go | 60 ++++++++++++++++++ receiver/netflowreceiver/go.mod | 29 +++++++++ 10 files changed, 173 insertions(+) create mode 100644 receiver/netflowreceiver/Makefile create mode 100644 receiver/netflowreceiver/README.md create mode 100644 receiver/netflowreceiver/config.go create mode 100644 receiver/netflowreceiver/doc.go create mode 100644 receiver/netflowreceiver/factory.go create mode 100644 receiver/netflowreceiver/go.mod diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index d06e0b1368a0..faf7cae5b913 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -244,6 +244,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/opencensus diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 319ccdc936cc..57c66ca1dc3a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -238,6 +238,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/opencensus diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 4a9858cb6ca8..a718ec31e598 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -238,6 +238,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/opencensus diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index 06327ae2633e..595a6b4d44a9 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -243,6 +243,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/opencensus diff --git a/receiver/netflowreceiver/Makefile b/receiver/netflowreceiver/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/receiver/netflowreceiver/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md new file mode 100644 index 000000000000..396bf538f329 --- /dev/null +++ b/receiver/netflowreceiver/README.md @@ -0,0 +1,3 @@ +# Netflow receiver + + \ No newline at end of file diff --git a/receiver/netflowreceiver/config.go b/receiver/netflowreceiver/config.go new file mode 100644 index 000000000000..bbd0c2dffc38 --- /dev/null +++ b/receiver/netflowreceiver/config.go @@ -0,0 +1,70 @@ +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" + +import "fmt" + +// Config represents the receiver config settings within the collector's config.yaml +type Config struct { + Listeners []ListenerConfig `mapstructure:"listeners"` +} + +type ListenerConfig struct { + + // The scheme defines the type of flow data that the listener will receive + // The scheme must be one of sflow, netflow, or flow + Scheme string `mapstructure:"scheme"` + + // The hostname or IP address that the listener will bind to + Hostname string `mapstructure:"hostname"` + + // The port that the listener will bind to + Port int `mapstructure:"port"` + + // The number of sockets that the listener will use + Sockets int `mapstructure:"sockets"` + + // The number of workers that the listener will use to decode incoming flow messages + // By default it will be two times the number of sockets + // Ideally set this to the number of CPU cores + Workers int `mapstructure:"workers"` + + // The size of the queue that the listener will use + // This is a buffer that will hold flow messages before they are processed by a worker + QueueSize int `mapstructure:"queueSize"` +} + +// Validate checks if the receiver configuration is valid +func (cfg *Config) Validate() error { + validSchemes := [3]string{"sflow", "netflow", "flow"} + + for _, listener := range cfg.Listeners { + + validScheme := false + for _, scheme := range validSchemes { + if listener.Scheme == scheme { + validScheme = true + break + } + } + if !validScheme { + return fmt.Errorf("scheme must be one of sflow, netflow, or flow") + } + + if listener.Sockets <= 0 { + return fmt.Errorf("sockets must be greater than 0") + } + + if listener.Workers <= 0 { + return fmt.Errorf("workers must be greater than 0") + } + + if listener.QueueSize <= 0 { + listener.QueueSize = defaultQueueSize + } + + if listener.Port <= 0 { + return fmt.Errorf("port must be greater than 0") + } + } + + return nil +} diff --git a/receiver/netflowreceiver/doc.go b/receiver/netflowreceiver/doc.go new file mode 100644 index 000000000000..51ac969c3e90 --- /dev/null +++ b/receiver/netflowreceiver/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go new file mode 100644 index 000000000000..19e9d887d263 --- /dev/null +++ b/receiver/netflowreceiver/factory.go @@ -0,0 +1,60 @@ +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" + +import ( + "context" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver" +) + +var ( + typeStr = component.MustNewType("netflow") +) + +const ( + defaultSockets = 1 + defaultWorkers = 2 + defaultQueueSize = 1_000_000 +) + +// NewFactory creates a factory for netflow receiver. +func NewFactory() receiver.Factory { + return receiver.NewFactory( + typeStr, + createDefaultConfig, + receiver.WithLogs(createLogsReceiver, component.StabilityLevelAlpha)) +} + +func createDefaultConfig() component.Config { + return &Config{ + Listeners: []ListenerConfig{ + { + Scheme: "sflow", + Port: 6343, + Sockets: defaultSockets, + Workers: defaultWorkers, + QueueSize: defaultQueueSize, + }, + { + Scheme: "netflow", + Port: 2055, + Sockets: defaultSockets, + Workers: defaultWorkers, + QueueSize: defaultQueueSize, + }, + }, + } +} + +func createLogsReceiver(_ context.Context, params receiver.CreateSettings, cfg component.Config, consumer consumer.Logs) (receiver.Logs, error) { + logger := params.Logger + conf := cfg.(*Config) + + nr := &netflowReceiver{ + logger: logger, + logConsumer: consumer, + config: conf, + } + + return nr, nil +} diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod new file mode 100644 index 000000000000..a1d441f46ce3 --- /dev/null +++ b/receiver/netflowreceiver/go.mod @@ -0,0 +1,29 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver + +go 1.21.0 + +require ( + go.opentelemetry.io/collector/component v0.104.0 + go.opentelemetry.io/collector/consumer v0.104.0 + go.opentelemetry.io/collector/receiver v0.104.0 +) + +require ( + github.com/gogo/protobuf v1.3.2 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect + go.opentelemetry.io/collector/pdata v1.11.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect +) From be502c2c0e482964d39365e59c2f3d98cd608987 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Wed, 17 Jul 2024 20:10:39 -0500 Subject: [PATCH 02/31] netflowreceiver - add minimum files --- receiver/netflowreceiver/factory.go | 2 +- .../generated_component_test.go | 69 +++++++++++++++++++ .../netflowreceiver/generated_package_test.go | 13 ++++ receiver/netflowreceiver/go.mod | 31 ++++++++- receiver/netflowreceiver/listener.go | 14 ++++ receiver/netflowreceiver/metadata.yaml | 11 +++ receiver/netflowreceiver/receiver.go | 26 +++++++ 7 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 receiver/netflowreceiver/generated_component_test.go create mode 100644 receiver/netflowreceiver/generated_package_test.go create mode 100644 receiver/netflowreceiver/listener.go create mode 100644 receiver/netflowreceiver/metadata.yaml create mode 100644 receiver/netflowreceiver/receiver.go diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index 19e9d887d263..4c5680af137c 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -1,4 +1,4 @@ -package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" +package netflowreceiver import ( "context" diff --git a/receiver/netflowreceiver/generated_component_test.go b/receiver/netflowreceiver/generated_component_test.go new file mode 100644 index 000000000000..21e1f8f187e9 --- /dev/null +++ b/receiver/netflowreceiver/generated_component_test.go @@ -0,0 +1,69 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package netflowreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "netflow", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set receiver.Settings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set receiver.Settings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(&cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) + } +} diff --git a/receiver/netflowreceiver/generated_package_test.go b/receiver/netflowreceiver/generated_package_test.go new file mode 100644 index 000000000000..533c7f68ea70 --- /dev/null +++ b/receiver/netflowreceiver/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package netflowreceiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index a1d441f46ce3..116e7eafb02d 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -3,27 +3,56 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflo go 1.21.0 require ( + github.com/netsampler/goflow2/v2 v2.1.3 + github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.104.0 + go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/consumer v0.104.0 go.opentelemetry.io/collector/receiver v0.104.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // 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/libp2p/go-reuseport v0.4.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/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.54.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect + go.opentelemetry.io/collector/featuregate v1.12.0 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.0 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/netflowreceiver/listener.go b/receiver/netflowreceiver/listener.go new file mode 100644 index 000000000000..9fd416ce369b --- /dev/null +++ b/receiver/netflowreceiver/listener.go @@ -0,0 +1,14 @@ +package netflowreceiver + +import ( + "github.com/netsampler/goflow2/v2/utils" + "go.opentelemetry.io/collector/consumer" + "go.uber.org/zap" +) + +type Listener struct { + config ListenerConfig + logger *zap.Logger + recv *utils.UDPReceiver + logConsumer consumer.Logs +} diff --git a/receiver/netflowreceiver/metadata.yaml b/receiver/netflowreceiver/metadata.yaml new file mode 100644 index 000000000000..5abb5db11e85 --- /dev/null +++ b/receiver/netflowreceiver/metadata.yaml @@ -0,0 +1,11 @@ +type: netflow +scope_name: otelcol/netflowreceiver + +status: + class: receiver + stability: + development: [logs] + distributions: + - contrib + codeowners: + active: [evan-bradley, dlopes7] diff --git a/receiver/netflowreceiver/receiver.go b/receiver/netflowreceiver/receiver.go new file mode 100644 index 000000000000..4b333fb259d5 --- /dev/null +++ b/receiver/netflowreceiver/receiver.go @@ -0,0 +1,26 @@ +package netflowreceiver + +import ( + "context" + "fmt" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.uber.org/zap" +) + +type netflowReceiver struct { + host component.Host + cancel context.CancelFunc + config *Config + logConsumer consumer.Logs + logger *zap.Logger + listeners []*Listener +} + +func (nr *netflowReceiver) Start(ctx context.Context, host component.Host) error { + return fmt.Errorf("not implemented") +} + +func (nr *netflowReceiver) Shutdown(ctx context.Context) error { + return fmt.Errorf("not implemented") +} From 3ae8ad1293f8912af1aee5a597b976a7ffd72406 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Wed, 17 Jul 2024 20:54:52 -0500 Subject: [PATCH 03/31] netflowreceiver - run make commands --- receiver/netflowreceiver/config.go | 3 + receiver/netflowreceiver/factory.go | 5 +- receiver/netflowreceiver/go.sum | 149 +++++++++++++++++++++++++++ receiver/netflowreceiver/listener.go | 5 +- receiver/netflowreceiver/receiver.go | 5 +- 5 files changed, 164 insertions(+), 3 deletions(-) create mode 100644 receiver/netflowreceiver/go.sum diff --git a/receiver/netflowreceiver/config.go b/receiver/netflowreceiver/config.go index bbd0c2dffc38..922a7d53b4f2 100644 --- a/receiver/netflowreceiver/config.go +++ b/receiver/netflowreceiver/config.go @@ -1,3 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" import "fmt" diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index 4c5680af137c..15b8f3d8c094 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -1,4 +1,7 @@ -package netflowreceiver +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" import ( "context" diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum new file mode 100644 index 000000000000..120ac932c155 --- /dev/null +++ b/receiver/netflowreceiver/go.sum @@ -0,0 +1,149 @@ +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/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/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-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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +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/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +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/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= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +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/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= +github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU= +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= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +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/netsampler/goflow2/v2 v2.1.3 h1:glfeG2hIzFlAmEz236nZIAWi848AB+p1pJnuQqiyLkI= +github.com/netsampler/goflow2/v2 v2.1.3/go.mod h1:94ZaxfHuUwG6KviCxMWuZIvz0UGu657StE/g83hlS8A= +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.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +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.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= +github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +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= +go.opentelemetry.io/collector v0.104.0 h1:R3zjM4O3K3+ttzsjPV75P80xalxRbwYTURlK0ys7uyo= +go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= +go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/confmap v0.105.0 h1:3NP2BbUju42rjeQvRbmpCJGJGvbiV3WnGyXsVmocimo= +go.opentelemetry.io/collector/confmap v0.105.0/go.mod h1:Oj1xUBRvAuL8OWWMj9sSYf1uQpB+AErpj+FKGUQLBI0= +go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= +go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= +go.opentelemetry.io/collector/featuregate v1.12.0 h1:l5WbV2vMQd2bL8ubfGrbKNtZaeJRckE12CTHvRe47Tw= +go.opentelemetry.io/collector/featuregate v1.12.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= +go.opentelemetry.io/collector/internal/globalgates v0.105.0 h1:U/CwnTUXtrblD1sZ6ri7KWfYoTNjQd7GjJKrX/phRik= +go.opentelemetry.io/collector/internal/globalgates v0.105.0/go.mod h1:Z5US6O2xkZAtxVSSBnHAPFZwPhFoxlyKLUvS67Vx4gc= +go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= +go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= +go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= +go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= +go.opentelemetry.io/collector/receiver v0.104.0 h1:URL1ExkYYd+qbndm7CdGvI2mxzsv/pNfmwJ+1QSQ9/o= +go.opentelemetry.io/collector/receiver v0.104.0/go.mod h1:+enTCZQLf6dRRANWvykXEzrlRw2JDppXJtoYWd/Dd54= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +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/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= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +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/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.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.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/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= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/receiver/netflowreceiver/listener.go b/receiver/netflowreceiver/listener.go index 9fd416ce369b..53f20a8111b0 100644 --- a/receiver/netflowreceiver/listener.go +++ b/receiver/netflowreceiver/listener.go @@ -1,4 +1,7 @@ -package netflowreceiver +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" import ( "github.com/netsampler/goflow2/v2/utils" diff --git a/receiver/netflowreceiver/receiver.go b/receiver/netflowreceiver/receiver.go index 4b333fb259d5..676647849506 100644 --- a/receiver/netflowreceiver/receiver.go +++ b/receiver/netflowreceiver/receiver.go @@ -1,4 +1,7 @@ -package netflowreceiver +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" import ( "context" From 9aa77b6f70e10fdabcc150a3713c8313072da21b Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Wed, 17 Jul 2024 20:57:50 -0500 Subject: [PATCH 04/31] netflowreceiver - adjust config and tests --- receiver/netflowreceiver/config.go | 2 +- receiver/netflowreceiver/receiver.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/receiver/netflowreceiver/config.go b/receiver/netflowreceiver/config.go index 922a7d53b4f2..ed2b80b59702 100644 --- a/receiver/netflowreceiver/config.go +++ b/receiver/netflowreceiver/config.go @@ -32,7 +32,7 @@ type ListenerConfig struct { // The size of the queue that the listener will use // This is a buffer that will hold flow messages before they are processed by a worker - QueueSize int `mapstructure:"queueSize"` + QueueSize int `mapstructure:"queue_size"` } // Validate checks if the receiver configuration is valid diff --git a/receiver/netflowreceiver/receiver.go b/receiver/netflowreceiver/receiver.go index 676647849506..3e79cbe67c66 100644 --- a/receiver/netflowreceiver/receiver.go +++ b/receiver/netflowreceiver/receiver.go @@ -5,7 +5,7 @@ package netflowreceiver // import "github.com/open-telemetry/opentelemetry-colle import ( "context" - "fmt" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.uber.org/zap" @@ -21,9 +21,9 @@ type netflowReceiver struct { } func (nr *netflowReceiver) Start(ctx context.Context, host component.Host) error { - return fmt.Errorf("not implemented") + return nil } func (nr *netflowReceiver) Shutdown(ctx context.Context) error { - return fmt.Errorf("not implemented") + return nil } From b619e40a7f2864fd8cbd83b6634efca87c0991f3 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Wed, 17 Jul 2024 21:24:13 -0500 Subject: [PATCH 05/31] netflowreceiver - run make generate and config_test --- receiver/netflowreceiver/README.md | 9 ++++ receiver/netflowreceiver/config_test.go | 46 +++++++++++++++++++ receiver/netflowreceiver/factory.go | 1 + receiver/netflowreceiver/go.mod | 4 +- receiver/netflowreceiver/go.sum | 2 + .../internal/metadata/generated_status.go | 15 ++++++ receiver/netflowreceiver/testdata/config.yaml | 12 +++++ 7 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 receiver/netflowreceiver/config_test.go create mode 100644 receiver/netflowreceiver/internal/metadata/generated_status.go create mode 100644 receiver/netflowreceiver/testdata/config.yaml diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index 396bf538f329..30335da18a63 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -1,3 +1,12 @@ # Netflow receiver +| Status | | +| ------------- |-----------| +| Stability | [development]: logs | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fnetflow%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fnetflow) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fnetflow%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fnetflow) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@evan-bradley](https://www.github.com/evan-bradley), [@dlopes7](https://www.github.com/dlopes7) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/receiver/netflowreceiver/config_test.go b/receiver/netflowreceiver/config_test.go new file mode 100644 index 000000000000..433fe21ca482 --- /dev/null +++ b/receiver/netflowreceiver/config_test.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver + +import ( + "path/filepath" + "testing" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver/internal/metadata" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +func TestLoadConfig(t *testing.T) { + t.Parallel() + + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + + tests := []struct { + id component.ID + expected component.Config + }{ + { + id: component.NewIDWithName(metadata.Type, "defaults"), + expected: createDefaultConfig(), + }, + } + + 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) + }) + } +} diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index 15b8f3d8c094..d16b8bcae5d8 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -5,6 +5,7 @@ package netflowreceiver // import "github.com/open-telemetry/opentelemetry-colle import ( "context" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 116e7eafb02d..00553b733eca 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -3,6 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflo go 1.21.0 require ( + github.com/google/go-cmp v0.6.0 github.com/netsampler/goflow2/v2 v2.1.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.104.0 @@ -11,6 +12,8 @@ require ( go.opentelemetry.io/collector/receiver v0.104.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.64.0 + gotest.tools/v3 v3.5.1 ) require ( @@ -52,7 +55,6 @@ require ( golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum index 120ac932c155..ebdf3a9ec93b 100644 --- a/receiver/netflowreceiver/go.sum +++ b/receiver/netflowreceiver/go.sum @@ -147,3 +147,5 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/receiver/netflowreceiver/internal/metadata/generated_status.go b/receiver/netflowreceiver/internal/metadata/generated_status.go new file mode 100644 index 000000000000..93f9d2a8b6cc --- /dev/null +++ b/receiver/netflowreceiver/internal/metadata/generated_status.go @@ -0,0 +1,15 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("netflow") +) + +const ( + LogsStability = component.StabilityLevelDevelopment +) diff --git a/receiver/netflowreceiver/testdata/config.yaml b/receiver/netflowreceiver/testdata/config.yaml new file mode 100644 index 000000000000..eec5332ffdd4 --- /dev/null +++ b/receiver/netflowreceiver/testdata/config.yaml @@ -0,0 +1,12 @@ +netflow: + listeners: + - scheme: netflow + port: 2055 + sockets: 1 + workers: 4 + + - scheme: sflow + port: 6443 + sockets: 1 + workers: 2 + queue_size: 1000 \ No newline at end of file From 5f03ff984b7e83acb5714a6b0f89c3470e579fc0 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Wed, 17 Jul 2024 21:43:17 -0500 Subject: [PATCH 06/31] netflowreceiver - add config tests --- receiver/netflowreceiver/config_test.go | 73 +++++++++++++++++++ receiver/netflowreceiver/testdata/config.yaml | 25 ++++++- 2 files changed, 96 insertions(+), 2 deletions(-) diff --git a/receiver/netflowreceiver/config_test.go b/receiver/netflowreceiver/config_test.go index 433fe21ca482..cf6d4553e3dd 100644 --- a/receiver/netflowreceiver/config_test.go +++ b/receiver/netflowreceiver/config_test.go @@ -28,6 +28,41 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "defaults"), expected: createDefaultConfig(), }, + { + id: component.NewIDWithName(metadata.Type, "two_listeners"), + expected: &Config{ + Listeners: []ListenerConfig{ + { + Scheme: "netflow", + Port: 2055, + Sockets: 1, + Workers: 4, + QueueSize: 0, + }, + { + Scheme: "sflow", + Port: 6443, + Sockets: 1, + Workers: 2, + QueueSize: 1000, + }, + }, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "one_listener"), + expected: &Config{ + Listeners: []ListenerConfig{ + { + Scheme: "netflow", + Port: 2055, + Sockets: 1, + Workers: 1, + QueueSize: 0, + }, + }, + }, + }, } for _, tt := range tests { @@ -44,3 +79,41 @@ func TestLoadConfig(t *testing.T) { }) } } + + +func TestInvalidConfig(t *testing.T) { + t.Parallel() + + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + + tests := []struct { + id component.ID + err string + }{ + { + id: component.NewIDWithName(metadata.Type, "invalid_schema"), + err: "scheme must be one of sflow, netflow, or flow", + }, + { + id: component.NewIDWithName(metadata.Type, "invalid_port"), + err: "port must be greater than 0", + }, + } + + 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)) + + err = component.ValidateConfig(cfg) + assert.ErrorContains(t, err, tt.err) + }) + } + + +} \ No newline at end of file diff --git a/receiver/netflowreceiver/testdata/config.yaml b/receiver/netflowreceiver/testdata/config.yaml index eec5332ffdd4..41f871e581b7 100644 --- a/receiver/netflowreceiver/testdata/config.yaml +++ b/receiver/netflowreceiver/testdata/config.yaml @@ -1,4 +1,7 @@ -netflow: +netflow/defaults: + listeners: + +netflow/two_listeners: listeners: - scheme: netflow port: 2055 @@ -9,4 +12,22 @@ netflow: port: 6443 sockets: 1 workers: 2 - queue_size: 1000 \ No newline at end of file + queue_size: 1000 + +netflow/one_listener: + listeners: + - scheme: netflow + port: 2055 + sockets: 1 + workers: 1 + +netflow/invalid_schema: + listeners: + - scheme: invalid + +netflow/invalid_port: + listeners: + - scheme: netflow + sockets: 1 + workers: 1 + port: 0 \ No newline at end of file From 040136f02d14d740d63d8ab7746f2f6a8ed213ac Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Wed, 17 Jul 2024 21:56:31 -0500 Subject: [PATCH 07/31] netflowreceiver - add tests, mod tidy --- receiver/netflowreceiver/factory_test.go | 27 +++++++++++++++++++++++ receiver/netflowreceiver/go.mod | 4 +--- receiver/netflowreceiver/go.sum | 2 -- receiver/netflowreceiver/listener_test.go | 26 ++++++++++++++++++++++ receiver/netflowreceiver/receiver_test.go | 23 +++++++++++++++++++ 5 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 receiver/netflowreceiver/factory_test.go create mode 100644 receiver/netflowreceiver/listener_test.go create mode 100644 receiver/netflowreceiver/receiver_test.go diff --git a/receiver/netflowreceiver/factory_test.go b/receiver/netflowreceiver/factory_test.go new file mode 100644 index 000000000000..18d4a5a691a1 --- /dev/null +++ b/receiver/netflowreceiver/factory_test.go @@ -0,0 +1,27 @@ +package netflowreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NotNil(t, cfg, "failed to create default config") + assert.NoError(t, componenttest.CheckConfigStruct(cfg)) +} + +func TestCreateReceiver(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + set := receivertest.NewNopSettings() + receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) + assert.NoError(t, err, "receiver creation failed") + assert.NotNil(t, receiver, "receiver creation failed") +} \ No newline at end of file diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 00553b733eca..116e7eafb02d 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -3,7 +3,6 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflo go 1.21.0 require ( - github.com/google/go-cmp v0.6.0 github.com/netsampler/goflow2/v2 v2.1.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.104.0 @@ -12,8 +11,6 @@ require ( go.opentelemetry.io/collector/receiver v0.104.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.64.0 - gotest.tools/v3 v3.5.1 ) require ( @@ -55,6 +52,7 @@ require ( golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum index ebdf3a9ec93b..120ac932c155 100644 --- a/receiver/netflowreceiver/go.sum +++ b/receiver/netflowreceiver/go.sum @@ -147,5 +147,3 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/receiver/netflowreceiver/listener_test.go b/receiver/netflowreceiver/listener_test.go new file mode 100644 index 000000000000..72c7cda9925c --- /dev/null +++ b/receiver/netflowreceiver/listener_test.go @@ -0,0 +1,26 @@ +package netflowreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" +) + + +func TestCreateValidDefaultListener(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + set := receivertest.NewNopSettings() + receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) + assert.NoError(t, err, "receiver creation failed") + assert.NotNil(t, receiver, "receiver creation failed") + assert.Equal(t, "sflow", receiver.(*netflowReceiver).config.Listeners[0].Scheme) + assert.Equal(t, 6343, receiver.(*netflowReceiver).config.Listeners[0].Port) + assert.Equal(t, 1, receiver.(*netflowReceiver).config.Listeners[0].Sockets) + assert.Equal(t, 2, receiver.(*netflowReceiver).config.Listeners[0].Workers) + assert.Equal(t, 1_000_000, receiver.(*netflowReceiver).config.Listeners[0].QueueSize) + +} \ No newline at end of file diff --git a/receiver/netflowreceiver/receiver_test.go b/receiver/netflowreceiver/receiver_test.go new file mode 100644 index 000000000000..3491d77d9e96 --- /dev/null +++ b/receiver/netflowreceiver/receiver_test.go @@ -0,0 +1,23 @@ +package netflowreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" +) + + +func TestCreateValidDefaultReceiver(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + set := receivertest.NewNopSettings() + receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) + assert.NoError(t, err, "receiver creation failed") + assert.NotNil(t, receiver, "receiver creation failed") + // TODO - Will be added on the following PR + // assert.NotNil(t, "sflow", receiver.(*netflowReceiver).listeners[0].recv) + +} \ No newline at end of file From c4e9bd20d29f4880a3dcbc1c2d61fff165d474ea Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 18 Jul 2024 19:30:38 -0500 Subject: [PATCH 08/31] netflowreceiver - readme --- receiver/netflowreceiver/README.md | 75 +++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index 30335da18a63..c079888ea4aa 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -9,4 +9,77 @@ [development]: https://github.com/open-telemetry/opentelemetry-collector#development [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - \ No newline at end of file + + +The netflow receiver can listen for [netflow](https://en.wikipedia.org/wiki/NetFlow), [sflow](https://en.wikipedia.org/wiki/SFlow), and [ipfix](https://en.wikipedia.org/wiki/IP_Flow_Information_Export) data and convert it to OpenTelemetry logs. The receiver is based on the [goflow2](https://github.com/netsampler/goflow2) project. + +This gives Opentelemetry users the capability of monitoring network traffic, and answer questions like: + +* Which protocols are passing through the network? +* Which servers and clients are producing the highest amount of traffic? +* What ports are involved in these network calls? +* How many bytes and packets are being sent and received? + + +## Getting started + +By default the receiver will listen for ipfix and netflow on port `2055` and sflow on port `6343`. The receiver can be configured to listen on different ports and protocols. + +Example configuration: + +```yaml +receivers: + netflow: + listeners: + - scheme: netflow + port: 2055 + sockets: 16 + workers: 32 + +processors: + batch: + send_batch_size: 2000 + timeout: 30s + +exporters: + debug: + verbosity: detailed + +service: + pipelines: + logs: + receivers: [netflow] + processors: [batch] + exporters: [debug] + telemetry: + logs: + level: debug +``` + +We recommend using the batch processor to reduce the number of log requests being sent to the exporter. The batch processor will batch log records together and send them in a single request to the exporter. + +You would then configure your network devices to send netflow, sflow, or ipfix data to the collector on the specified ports. + +## Data format + +The netflow data is standardized for the different schemas and is converted to OpenTelemetry logs. The output will look like this: + +```json +{ + "type": "SFLOW_5", + "time_received_ns": 1681583295157626000, + "sequence_num": 2999, + "sampling_rate": 100, + "sampler_address": "192.168.0.1", + "time_flow_start_ns": 1681583295157626000, + "time_flow_end_ns": 1681583295157626000, + "bytes": 1500, + "packets": 1, + "src_addr": "fd01::1", + "dst_addr": "fd01::2", + "etype": "IPv6", + "proto": "TCP", + "src_port": 443, + "dst_port": 50001 +} +``` \ No newline at end of file From 8de9251c7773df1f71b1f071bed63f00ecf1d266 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 18 Jul 2024 19:46:18 -0500 Subject: [PATCH 09/31] netflowreceiver - add readme table --- receiver/netflowreceiver/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index c079888ea4aa..8ba6226569a1 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -60,6 +60,17 @@ We recommend using the batch processor to reduce the number of log requests bein You would then configure your network devices to send netflow, sflow, or ipfix data to the collector on the specified ports. +## Configuration + +| Field | Description | Examples | +|-------|-------------|--------| +| scheme | The type of flow data that the listener will receive | `sflow`, `netflow`, `flow` | +| hostname | The hostname or IP address that the listener will bind to | `localhost` | +| port | The port that the listener will bind to | `2055` | +| sockets | The number of sockets that the listener will use | 1 | +| workers | The number of workers that the listener will use to decode incoming flow messages | 2 | +| queue_size | The size of the queue that the listener will use | 1000 | + ## Data format The netflow data is standardized for the different schemas and is converted to OpenTelemetry logs. The output will look like this: @@ -82,4 +93,4 @@ The netflow data is standardized for the different schemas and is converted to O "src_port": 443, "dst_port": 50001 } -``` \ No newline at end of file +``` From cf4720b920984e47902aed0710636430041f9392 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 18 Jul 2024 19:54:06 -0500 Subject: [PATCH 10/31] netflowreceiver - make multimod-verify --- receiver/netflowreceiver/config_test.go | 39 +++++++++++------------ receiver/netflowreceiver/factory_test.go | 2 +- receiver/netflowreceiver/listener_test.go | 3 +- receiver/netflowreceiver/receiver_test.go | 3 +- 4 files changed, 22 insertions(+), 25 deletions(-) diff --git a/receiver/netflowreceiver/config_test.go b/receiver/netflowreceiver/config_test.go index cf6d4553e3dd..e8884cfc4d96 100644 --- a/receiver/netflowreceiver/config_test.go +++ b/receiver/netflowreceiver/config_test.go @@ -7,11 +7,12 @@ import ( "path/filepath" "testing" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver/internal/metadata" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap/confmaptest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver/internal/metadata" ) func TestLoadConfig(t *testing.T) { @@ -29,38 +30,38 @@ func TestLoadConfig(t *testing.T) { expected: createDefaultConfig(), }, { - id: component.NewIDWithName(metadata.Type, "two_listeners"), + id: component.NewIDWithName(metadata.Type, "two_listeners"), expected: &Config{ Listeners: []ListenerConfig{ { - Scheme: "netflow", - Port: 2055, - Sockets: 1, - Workers: 4, + Scheme: "netflow", + Port: 2055, + Sockets: 1, + Workers: 4, QueueSize: 0, }, { - Scheme: "sflow", - Port: 6443, - Sockets: 1, - Workers: 2, + Scheme: "sflow", + Port: 6443, + Sockets: 1, + Workers: 2, QueueSize: 1000, }, - }, + }, }, }, { - id: component.NewIDWithName(metadata.Type, "one_listener"), + id: component.NewIDWithName(metadata.Type, "one_listener"), expected: &Config{ Listeners: []ListenerConfig{ { - Scheme: "netflow", - Port: 2055, - Sockets: 1, - Workers: 1, + Scheme: "netflow", + Port: 2055, + Sockets: 1, + Workers: 1, QueueSize: 0, }, - }, + }, }, }, } @@ -80,7 +81,6 @@ func TestLoadConfig(t *testing.T) { } } - func TestInvalidConfig(t *testing.T) { t.Parallel() @@ -115,5 +115,4 @@ func TestInvalidConfig(t *testing.T) { }) } - -} \ No newline at end of file +} diff --git a/receiver/netflowreceiver/factory_test.go b/receiver/netflowreceiver/factory_test.go index 18d4a5a691a1..b4a199212ea0 100644 --- a/receiver/netflowreceiver/factory_test.go +++ b/receiver/netflowreceiver/factory_test.go @@ -24,4 +24,4 @@ func TestCreateReceiver(t *testing.T) { receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) assert.NoError(t, err, "receiver creation failed") assert.NotNil(t, receiver, "receiver creation failed") -} \ No newline at end of file +} diff --git a/receiver/netflowreceiver/listener_test.go b/receiver/netflowreceiver/listener_test.go index 72c7cda9925c..df6352b05cde 100644 --- a/receiver/netflowreceiver/listener_test.go +++ b/receiver/netflowreceiver/listener_test.go @@ -9,7 +9,6 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" ) - func TestCreateValidDefaultListener(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() @@ -23,4 +22,4 @@ func TestCreateValidDefaultListener(t *testing.T) { assert.Equal(t, 2, receiver.(*netflowReceiver).config.Listeners[0].Workers) assert.Equal(t, 1_000_000, receiver.(*netflowReceiver).config.Listeners[0].QueueSize) -} \ No newline at end of file +} diff --git a/receiver/netflowreceiver/receiver_test.go b/receiver/netflowreceiver/receiver_test.go index 3491d77d9e96..1883be37d390 100644 --- a/receiver/netflowreceiver/receiver_test.go +++ b/receiver/netflowreceiver/receiver_test.go @@ -9,7 +9,6 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" ) - func TestCreateValidDefaultReceiver(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() @@ -20,4 +19,4 @@ func TestCreateValidDefaultReceiver(t *testing.T) { // TODO - Will be added on the following PR // assert.NotNil(t, "sflow", receiver.(*netflowReceiver).listeners[0].recv) -} \ No newline at end of file +} From c5ee961329f3d74bf1a3b1698b8cdd2241d8a76a Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 18 Jul 2024 19:54:27 -0500 Subject: [PATCH 11/31] netflowreceiver - make addlicense --- receiver/netflowreceiver/factory_test.go | 3 +++ receiver/netflowreceiver/listener_test.go | 3 +++ receiver/netflowreceiver/receiver_test.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/receiver/netflowreceiver/factory_test.go b/receiver/netflowreceiver/factory_test.go index b4a199212ea0..0beb374ccee6 100644 --- a/receiver/netflowreceiver/factory_test.go +++ b/receiver/netflowreceiver/factory_test.go @@ -1,3 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + package netflowreceiver import ( diff --git a/receiver/netflowreceiver/listener_test.go b/receiver/netflowreceiver/listener_test.go index df6352b05cde..377fa8cfd230 100644 --- a/receiver/netflowreceiver/listener_test.go +++ b/receiver/netflowreceiver/listener_test.go @@ -1,3 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + package netflowreceiver import ( diff --git a/receiver/netflowreceiver/receiver_test.go b/receiver/netflowreceiver/receiver_test.go index 1883be37d390..3bad430341db 100644 --- a/receiver/netflowreceiver/receiver_test.go +++ b/receiver/netflowreceiver/receiver_test.go @@ -1,3 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + package netflowreceiver import ( From 0996c1c32d63c83a2be6909959394a0642aecd3b Mon Sep 17 00:00:00 2001 From: David Lopes Date: Fri, 9 Aug 2024 18:57:21 -0500 Subject: [PATCH 12/31] Update receiver/netflowreceiver/README.md Co-authored-by: Curtis Robert --- receiver/netflowreceiver/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index 8ba6226569a1..73a1d56fb946 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -58,7 +58,7 @@ service: We recommend using the batch processor to reduce the number of log requests being sent to the exporter. The batch processor will batch log records together and send them in a single request to the exporter. -You would then configure your network devices to send netflow, sflow, or ipfix data to the collector on the specified ports. +You would then configure your network devices to send netflow, sflow, or ipfix data to the Collector on the specified ports. ## Configuration From 97e1bec6f0f0831fdd43ff2ce5651b22d2812537 Mon Sep 17 00:00:00 2001 From: David Lopes Date: Fri, 9 Aug 2024 18:57:36 -0500 Subject: [PATCH 13/31] Update receiver/netflowreceiver/testdata/config.yaml Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> --- receiver/netflowreceiver/testdata/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/netflowreceiver/testdata/config.yaml b/receiver/netflowreceiver/testdata/config.yaml index 41f871e581b7..8b300f9a03ae 100644 --- a/receiver/netflowreceiver/testdata/config.yaml +++ b/receiver/netflowreceiver/testdata/config.yaml @@ -30,4 +30,4 @@ netflow/invalid_port: - scheme: netflow sockets: 1 workers: 1 - port: 0 \ No newline at end of file + port: 0 From 77270e61e9f08af5c5c711b2900ee2e5e98b797f Mon Sep 17 00:00:00 2001 From: David Lopes Date: Fri, 9 Aug 2024 18:57:59 -0500 Subject: [PATCH 14/31] Update receiver/netflowreceiver/factory.go Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> --- receiver/netflowreceiver/factory.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index d16b8bcae5d8..a412353556f7 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -11,9 +11,6 @@ import ( "go.opentelemetry.io/collector/receiver" ) -var ( - typeStr = component.MustNewType("netflow") -) const ( defaultSockets = 1 From 8c7bd249a5eb0a31d512d0e85a727b41783b90e6 Mon Sep 17 00:00:00 2001 From: David Lopes Date: Fri, 9 Aug 2024 18:58:06 -0500 Subject: [PATCH 15/31] Update receiver/netflowreceiver/README.md Co-authored-by: Curtis Robert --- receiver/netflowreceiver/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index 73a1d56fb946..cb5c89c26c50 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -13,7 +13,7 @@ The netflow receiver can listen for [netflow](https://en.wikipedia.org/wiki/NetFlow), [sflow](https://en.wikipedia.org/wiki/SFlow), and [ipfix](https://en.wikipedia.org/wiki/IP_Flow_Information_Export) data and convert it to OpenTelemetry logs. The receiver is based on the [goflow2](https://github.com/netsampler/goflow2) project. -This gives Opentelemetry users the capability of monitoring network traffic, and answer questions like: +This gives OpenTelemetry users the capability of monitoring network traffic, and answer questions like: * Which protocols are passing through the network? * Which servers and clients are producing the highest amount of traffic? From 7561af802a6f1595774ac87d3f1a6ce2c4bf9710 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Fri, 9 Aug 2024 19:23:41 -0500 Subject: [PATCH 16/31] netflow - pr suggestions * Improve readme, showing default values * Allow a single listener per config * Remove the contrib distribution from the metadata * Add the changelog entry --- .chloggen/netflow-receiver.yaml | 27 ++++++++++++++ receiver/netflowreceiver/README.md | 28 +++++++-------- receiver/netflowreceiver/config.go | 21 ++++------- receiver/netflowreceiver/config_test.go | 36 ++++--------------- receiver/netflowreceiver/factory.go | 26 +++++--------- receiver/netflowreceiver/listener.go | 2 +- receiver/netflowreceiver/listener_test.go | 10 +++--- receiver/netflowreceiver/metadata.yaml | 3 +- receiver/netflowreceiver/testdata/config.yaml | 35 +++++------------- 9 files changed, 77 insertions(+), 111 deletions(-) create mode 100644 .chloggen/netflow-receiver.yaml diff --git a/.chloggen/netflow-receiver.yaml b/.chloggen/netflow-receiver.yaml new file mode 100644 index 000000000000..38b65810b3d2 --- /dev/null +++ b/.chloggen/netflow-receiver.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: netflowreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduce the netflow receiver + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [32732] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index cb5c89c26c50..5dd06ae0dedc 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -20,7 +20,6 @@ This gives OpenTelemetry users the capability of monitoring network traffic, and * What ports are involved in these network calls? * How many bytes and packets are being sent and received? - ## Getting started By default the receiver will listen for ipfix and netflow on port `2055` and sflow on port `6343`. The receiver can be configured to listen on different ports and protocols. @@ -30,11 +29,10 @@ Example configuration: ```yaml receivers: netflow: - listeners: - - scheme: netflow - port: 2055 - sockets: 16 - workers: 32 + - scheme: netflow + port: 2055 + sockets: 16 + workers: 32 processors: batch: @@ -62,18 +60,18 @@ You would then configure your network devices to send netflow, sflow, or ipfix d ## Configuration -| Field | Description | Examples | -|-------|-------------|--------| -| scheme | The type of flow data that the listener will receive | `sflow`, `netflow`, `flow` | -| hostname | The hostname or IP address that the listener will bind to | `localhost` | -| port | The port that the listener will bind to | `2055` | -| sockets | The number of sockets that the listener will use | 1 | -| workers | The number of workers that the listener will use to decode incoming flow messages | 2 | -| queue_size | The size of the queue that the listener will use | 1000 | +| Field | Description | Examples | Default | +|-------|-------------|--------| ------- | +| scheme | The type of flow data that to receive | `sflow`, `netflow`, `flow` | `netflow` | +| hostname | The hostname or IP address to bind to | `localhost` | `0.0.0.0` | +| port | The port to bind to | `2055` | `2055` | +| sockets | The number of sockets to use | 1 | 1 | +| workers | The number of workers used to decode incoming flow messages | 2 | 2 | +| queue_size | The size of the incoming netflow packets queue | 1000 | 1000000 | ## Data format -The netflow data is standardized for the different schemas and is converted to OpenTelemetry logs. The output will look like this: +The netflow data is standardized for the different schemas and is converted to OpenTelemetry logs. The output will follow the format: ```json { diff --git a/receiver/netflowreceiver/config.go b/receiver/netflowreceiver/config.go index ed2b80b59702..7464a8f97013 100644 --- a/receiver/netflowreceiver/config.go +++ b/receiver/netflowreceiver/config.go @@ -7,11 +7,6 @@ import "fmt" // Config represents the receiver config settings within the collector's config.yaml type Config struct { - Listeners []ListenerConfig `mapstructure:"listeners"` -} - -type ListenerConfig struct { - // The scheme defines the type of flow data that the listener will receive // The scheme must be one of sflow, netflow, or flow Scheme string `mapstructure:"scheme"` @@ -39,11 +34,9 @@ type ListenerConfig struct { func (cfg *Config) Validate() error { validSchemes := [3]string{"sflow", "netflow", "flow"} - for _, listener := range cfg.Listeners { - validScheme := false for _, scheme := range validSchemes { - if listener.Scheme == scheme { + if cfg.Scheme == scheme { validScheme = true break } @@ -52,22 +45,22 @@ func (cfg *Config) Validate() error { return fmt.Errorf("scheme must be one of sflow, netflow, or flow") } - if listener.Sockets <= 0 { + if cfg.Sockets <= 0 { return fmt.Errorf("sockets must be greater than 0") } - if listener.Workers <= 0 { + if cfg.Workers <= 0 { return fmt.Errorf("workers must be greater than 0") } - if listener.QueueSize <= 0 { - listener.QueueSize = defaultQueueSize + if cfg.QueueSize <= 0 { + cfg.QueueSize = defaultQueueSize } - if listener.Port <= 0 { + if cfg.Port <= 0 { return fmt.Errorf("port must be greater than 0") } - } + return nil } diff --git a/receiver/netflowreceiver/config_test.go b/receiver/netflowreceiver/config_test.go index e8884cfc4d96..f430caf2c6b2 100644 --- a/receiver/netflowreceiver/config_test.go +++ b/receiver/netflowreceiver/config_test.go @@ -29,39 +29,15 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "defaults"), expected: createDefaultConfig(), }, - { - id: component.NewIDWithName(metadata.Type, "two_listeners"), - expected: &Config{ - Listeners: []ListenerConfig{ - { - Scheme: "netflow", - Port: 2055, - Sockets: 1, - Workers: 4, - QueueSize: 0, - }, - { - Scheme: "sflow", - Port: 6443, - Sockets: 1, - Workers: 2, - QueueSize: 1000, - }, - }, - }, - }, { id: component.NewIDWithName(metadata.Type, "one_listener"), expected: &Config{ - Listeners: []ListenerConfig{ - { - Scheme: "netflow", - Port: 2055, - Sockets: 1, - Workers: 1, - QueueSize: 0, - }, - }, + + Scheme: "netflow", + Port: 2055, + Sockets: 1, + Workers: 1, + QueueSize: 1000000, }, }, } diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index a412353556f7..12ded40b6466 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -6,12 +6,12 @@ package netflowreceiver // import "github.com/open-telemetry/opentelemetry-colle import ( "context" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver/internal/metadata" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" ) - const ( defaultSockets = 1 defaultWorkers = 2 @@ -21,30 +21,20 @@ const ( // NewFactory creates a factory for netflow receiver. func NewFactory() receiver.Factory { return receiver.NewFactory( - typeStr, + metadata.Type, createDefaultConfig, receiver.WithLogs(createLogsReceiver, component.StabilityLevelAlpha)) } func createDefaultConfig() component.Config { return &Config{ - Listeners: []ListenerConfig{ - { - Scheme: "sflow", - Port: 6343, - Sockets: defaultSockets, - Workers: defaultWorkers, - QueueSize: defaultQueueSize, - }, - { - Scheme: "netflow", - Port: 2055, - Sockets: defaultSockets, - Workers: defaultWorkers, - QueueSize: defaultQueueSize, - }, - }, + Scheme: "netflow", + Port: 2055, + Sockets: defaultSockets, + Workers: defaultWorkers, + QueueSize: defaultQueueSize, } + } func createLogsReceiver(_ context.Context, params receiver.CreateSettings, cfg component.Config, consumer consumer.Logs) (receiver.Logs, error) { diff --git a/receiver/netflowreceiver/listener.go b/receiver/netflowreceiver/listener.go index 53f20a8111b0..f5d2ee0b3398 100644 --- a/receiver/netflowreceiver/listener.go +++ b/receiver/netflowreceiver/listener.go @@ -10,7 +10,7 @@ import ( ) type Listener struct { - config ListenerConfig + config Config logger *zap.Logger recv *utils.UDPReceiver logConsumer consumer.Logs diff --git a/receiver/netflowreceiver/listener_test.go b/receiver/netflowreceiver/listener_test.go index 377fa8cfd230..ee783970b49d 100644 --- a/receiver/netflowreceiver/listener_test.go +++ b/receiver/netflowreceiver/listener_test.go @@ -19,10 +19,10 @@ func TestCreateValidDefaultListener(t *testing.T) { receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) assert.NoError(t, err, "receiver creation failed") assert.NotNil(t, receiver, "receiver creation failed") - assert.Equal(t, "sflow", receiver.(*netflowReceiver).config.Listeners[0].Scheme) - assert.Equal(t, 6343, receiver.(*netflowReceiver).config.Listeners[0].Port) - assert.Equal(t, 1, receiver.(*netflowReceiver).config.Listeners[0].Sockets) - assert.Equal(t, 2, receiver.(*netflowReceiver).config.Listeners[0].Workers) - assert.Equal(t, 1_000_000, receiver.(*netflowReceiver).config.Listeners[0].QueueSize) + assert.Equal(t, "netflow", receiver.(*netflowReceiver).config.Scheme) + assert.Equal(t, 2055, receiver.(*netflowReceiver).config.Port) + assert.Equal(t, 1, receiver.(*netflowReceiver).config.Sockets) + assert.Equal(t, 2, receiver.(*netflowReceiver).config.Workers) + assert.Equal(t, 1_000_000, receiver.(*netflowReceiver).config.QueueSize) } diff --git a/receiver/netflowreceiver/metadata.yaml b/receiver/netflowreceiver/metadata.yaml index 5abb5db11e85..e79e947a4542 100644 --- a/receiver/netflowreceiver/metadata.yaml +++ b/receiver/netflowreceiver/metadata.yaml @@ -5,7 +5,6 @@ status: class: receiver stability: development: [logs] - distributions: - - contrib + distributions: [] codeowners: active: [evan-bradley, dlopes7] diff --git a/receiver/netflowreceiver/testdata/config.yaml b/receiver/netflowreceiver/testdata/config.yaml index 8b300f9a03ae..cbc5f657b145 100644 --- a/receiver/netflowreceiver/testdata/config.yaml +++ b/receiver/netflowreceiver/testdata/config.yaml @@ -1,33 +1,16 @@ netflow/defaults: - listeners: - -netflow/two_listeners: - listeners: - - scheme: netflow - port: 2055 - sockets: 1 - workers: 4 - - - scheme: sflow - port: 6443 - sockets: 1 - workers: 2 - queue_size: 1000 netflow/one_listener: - listeners: - - scheme: netflow - port: 2055 - sockets: 1 - workers: 1 + scheme: netflow + port: 2055 + sockets: 1 + workers: 1 netflow/invalid_schema: - listeners: - - scheme: invalid + scheme: invalid netflow/invalid_port: - listeners: - - scheme: netflow - sockets: 1 - workers: 1 - port: 0 + scheme: netflow + sockets: 1 + workers: 1 + port: 0 From 871f2ff7251adfd4b37726eb54b864b62d2307e5 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Tue, 20 Aug 2024 08:07:54 -0500 Subject: [PATCH 17/31] netflow - update deps --- receiver/netflowreceiver/go.mod | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 116e7eafb02d..051e03588b81 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -5,10 +5,10 @@ go 1.21.0 require ( github.com/netsampler/goflow2/v2 v2.1.3 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.104.0 - go.opentelemetry.io/collector/confmap v0.105.0 - go.opentelemetry.io/collector/consumer v0.104.0 - go.opentelemetry.io/collector/receiver v0.104.0 + go.opentelemetry.io/collector/component v0.106.2-0.20240809191011-ef07ea073562 + go.opentelemetry.io/collector/confmap v0.106.2-0.20240809191011-ef07ea073562 + go.opentelemetry.io/collector/consumer v0.106.2-0.20240809191011-ef07ea073562 + go.opentelemetry.io/collector/receiver v0.106.2-0.20240809191011-ef07ea073562 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -37,10 +37,10 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.54.0 // indirect github.com/prometheus/procfs v0.15.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect - go.opentelemetry.io/collector/featuregate v1.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240809191011-ef07ea073562 // indirect + go.opentelemetry.io/collector/featuregate v1.12.1-0.20240809191011-ef07ea073562 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect - go.opentelemetry.io/collector/pdata v1.11.0 // indirect + go.opentelemetry.io/collector/pdata v1.12.1-0.20240809191011-ef07ea073562 // indirect go.opentelemetry.io/otel v1.27.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect go.opentelemetry.io/otel/metric v1.27.0 // indirect From f8d4c2c81bf65f244e460ed3a928195da4439566 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Tue, 20 Aug 2024 08:18:10 -0500 Subject: [PATCH 18/31] netflow - add to CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cda2bc45426d..ae5d553713ff 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -256,6 +256,7 @@ receiver/mongodbatlasreceiver/ @open-teleme receiver/mongodbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei receiver/mysqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/namedpipereceiver/ @open-telemetry/collector-contrib-approvers @sinkingpoint @djaglowski +receiver/netflowreceiver/ @open-telemetry/collector-contrib-approvers @evan-bradley @dlopes7 receiver/nginxreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/nsxtreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @schmikei receiver/opencensusreceiver/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers From 5cea6ec56c585ac67400e31f875048600ef7a0d1 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Tue, 20 Aug 2024 08:24:18 -0500 Subject: [PATCH 19/31] netflow - adjust linting and go.mod --- receiver/netflowreceiver/factory.go | 2 +- receiver/netflowreceiver/go.mod | 38 ++++----- receiver/netflowreceiver/go.sum | 112 ++++++++++++++------------- receiver/netflowreceiver/listener.go | 14 +--- receiver/netflowreceiver/receiver.go | 10 +-- 5 files changed, 87 insertions(+), 89 deletions(-) diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index 12ded40b6466..967d827fa6b2 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -37,7 +37,7 @@ func createDefaultConfig() component.Config { } -func createLogsReceiver(_ context.Context, params receiver.CreateSettings, cfg component.Config, consumer consumer.Logs) (receiver.Logs, error) { +func createLogsReceiver(_ context.Context, params receiver.Settings, cfg component.Config, consumer consumer.Logs) (receiver.Logs, error) { logger := params.Logger conf := cfg.(*Config) diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 051e03588b81..220e86d7181a 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -3,11 +3,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflo go 1.21.0 require ( - github.com/netsampler/goflow2/v2 v2.1.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.106.2-0.20240809191011-ef07ea073562 go.opentelemetry.io/collector/confmap v0.106.2-0.20240809191011-ef07ea073562 go.opentelemetry.io/collector/consumer v0.106.2-0.20240809191011-ef07ea073562 + go.opentelemetry.io/collector/consumer/consumertest v0.106.1 go.opentelemetry.io/collector/receiver v0.106.2-0.20240809191011-ef07ea073562 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -17,9 +17,9 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect @@ -27,32 +27,34 @@ require ( 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/libp2p/go-reuseport v0.4.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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.54.0 // indirect - github.com/prometheus/procfs v0.15.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240809191011-ef07ea073562 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect go.opentelemetry.io/collector/featuregate v1.12.1-0.20240809191011-ef07ea073562 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.106.1 // indirect go.opentelemetry.io/collector/pdata v1.12.1-0.20240809191011-ef07ea073562 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk v1.27.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/grpc v1.64.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum index 120ac932c155..748d39776392 100644 --- a/receiver/netflowreceiver/go.sum +++ b/receiver/netflowreceiver/go.sum @@ -6,12 +6,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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/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/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/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-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/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= +github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -35,8 +35,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/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= -github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU= 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= @@ -46,18 +44,18 @@ 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/netsampler/goflow2/v2 v2.1.3 h1:glfeG2hIzFlAmEz236nZIAWi848AB+p1pJnuQqiyLkI= -github.com/netsampler/goflow2/v2 v2.1.3/go.mod h1:94ZaxfHuUwG6KviCxMWuZIvz0UGu657StE/g83hlS8A= +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/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.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= 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.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= -github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +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.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -66,39 +64,43 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT 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= -go.opentelemetry.io/collector v0.104.0 h1:R3zjM4O3K3+ttzsjPV75P80xalxRbwYTURlK0ys7uyo= -go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= -go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= -go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= -go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= -go.opentelemetry.io/collector/confmap v0.105.0 h1:3NP2BbUju42rjeQvRbmpCJGJGvbiV3WnGyXsVmocimo= -go.opentelemetry.io/collector/confmap v0.105.0/go.mod h1:Oj1xUBRvAuL8OWWMj9sSYf1uQpB+AErpj+FKGUQLBI0= -go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= -go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= -go.opentelemetry.io/collector/featuregate v1.12.0 h1:l5WbV2vMQd2bL8ubfGrbKNtZaeJRckE12CTHvRe47Tw= -go.opentelemetry.io/collector/featuregate v1.12.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= -go.opentelemetry.io/collector/internal/globalgates v0.105.0 h1:U/CwnTUXtrblD1sZ6ri7KWfYoTNjQd7GjJKrX/phRik= -go.opentelemetry.io/collector/internal/globalgates v0.105.0/go.mod h1:Z5US6O2xkZAtxVSSBnHAPFZwPhFoxlyKLUvS67Vx4gc= -go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= -go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= -go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= -go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= -go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= -go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= -go.opentelemetry.io/collector/receiver v0.104.0 h1:URL1ExkYYd+qbndm7CdGvI2mxzsv/pNfmwJ+1QSQ9/o= -go.opentelemetry.io/collector/receiver v0.104.0/go.mod h1:+enTCZQLf6dRRANWvykXEzrlRw2JDppXJtoYWd/Dd54= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= -go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/collector v0.106.1 h1:ZSQMpFGzFP3RILe1/+K80kCCT2ahn3MKt5e3u0Yz7Rs= +go.opentelemetry.io/collector/component v0.106.2-0.20240809191011-ef07ea073562 h1:myjn1RkKrZ0//4Tb4kOWKUboFzVEo2LNAcbVKOsqcnY= +go.opentelemetry.io/collector/component v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:KiVE/5ZayuLlDJTe7mHqHRCn/5LrmF99C7/mKe54mWA= +go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240809191011-ef07ea073562 h1:76U+ZAoRnp04x5zS2E0Cf1QQD+lAVHuKImNWe6RfY3I= +go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/confmap v0.106.2-0.20240809191011-ef07ea073562 h1:wzgUr39AtHb77uLju8ArOflFvSfRwMvkY4pDv6MZ0H0= +go.opentelemetry.io/collector/confmap v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:iWdWgvxRYSHdAt5ySgPJq/i6fQMKGNnP5Pt7jOfTXno= +go.opentelemetry.io/collector/consumer v0.106.2-0.20240809191011-ef07ea073562 h1:AD9nE4H0qLVZknWPR7euqUKrcGzrmP6bHn+3zoj0DTw= +go.opentelemetry.io/collector/consumer v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:oy6pR/v5o/N9cxsICskyt//bU8k8EG0JeOO1MTDfs5A= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 h1:uxQjWm2XE7d1OncQDM9tL1ha+otGt1HjoRYIcQRMOfQ= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1/go.mod h1:xQScBf9/PORFaYM6JVPOr7/TcRVEuKcW5XbAXfJByRs= +go.opentelemetry.io/collector/consumer/consumertest v0.106.1 h1:hDdFeVjCLIJ6iLfbiYcV9s+4iboFXbkJ/k3h09qusPw= +go.opentelemetry.io/collector/consumer/consumertest v0.106.1/go.mod h1:WRTYnQ8bYHQrEN6eJZ80oC4pNI7VeDRdsTZI6xs9o5M= +go.opentelemetry.io/collector/featuregate v1.12.1-0.20240809191011-ef07ea073562 h1:jBKXaLF71yH9jXZH3OhwMr6sUxXX5vVafUNg3EnRJbk= +go.opentelemetry.io/collector/featuregate v1.12.1-0.20240809191011-ef07ea073562/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= +go.opentelemetry.io/collector/internal/globalgates v0.106.1 h1:0NQHTcykmYNDsNKObJ2XocGCv3WUAQZppfP3o6hZUIA= +go.opentelemetry.io/collector/internal/globalgates v0.106.1/go.mod h1:Z5US6O2xkZAtxVSSBnHAPFZwPhFoxlyKLUvS67Vx4gc= +go.opentelemetry.io/collector/pdata v1.12.1-0.20240809191011-ef07ea073562 h1:8EP6Grp5VFUxwlvXvamAVgL6bY6wayCC3xg0HadAnkU= +go.opentelemetry.io/collector/pdata v1.12.1-0.20240809191011-ef07ea073562/go.mod h1:MYeB0MmMAxeM0hstCFrCqWLzdyeYySim2dG6pDT6nYI= +go.opentelemetry.io/collector/pdata/pprofile v0.106.1 h1:nOLo25YnluNi+zAbU7G24RN86cJ1/EZJc6VEayBlOPo= +go.opentelemetry.io/collector/pdata/pprofile v0.106.1/go.mod h1:chr7lMJIzyXkccnPRkIPhyXtqLZLSReZYhwsggOGEfg= +go.opentelemetry.io/collector/pdata/testdata v0.106.1 h1:JUyLAwKD8o/9jgkBi16zOClxOyY028A7XIXHPV4mNmM= +go.opentelemetry.io/collector/pdata/testdata v0.106.1/go.mod h1:ghdz2RDEzsfigW0J+9oqA4fGmQJ/DJYUhE3vYU6JfhM= +go.opentelemetry.io/collector/receiver v0.106.2-0.20240809191011-ef07ea073562 h1:EqpFfqlV8OfFkvq48HpG/hyKCZ9r9IewVKFNoD5DPHY= +go.opentelemetry.io/collector/receiver v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:+J2FEg4eDYdUuaDW8Cn41SeqFiuKdvnZOZlXvbVdVaw= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -114,20 +116,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= 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/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.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -136,10 +138,10 @@ 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= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/receiver/netflowreceiver/listener.go b/receiver/netflowreceiver/listener.go index f5d2ee0b3398..d4507cadec8f 100644 --- a/receiver/netflowreceiver/listener.go +++ b/receiver/netflowreceiver/listener.go @@ -3,15 +3,9 @@ package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" -import ( - "github.com/netsampler/goflow2/v2/utils" - "go.opentelemetry.io/collector/consumer" - "go.uber.org/zap" -) - type Listener struct { - config Config - logger *zap.Logger - recv *utils.UDPReceiver - logConsumer consumer.Logs + // config Config + // logger *zap.Logger + // recv *utils.UDPReceiver + // logConsumer consumer.Logs } diff --git a/receiver/netflowreceiver/receiver.go b/receiver/netflowreceiver/receiver.go index 3e79cbe67c66..c31bcbe7baaf 100644 --- a/receiver/netflowreceiver/receiver.go +++ b/receiver/netflowreceiver/receiver.go @@ -12,18 +12,18 @@ import ( ) type netflowReceiver struct { - host component.Host - cancel context.CancelFunc + // host component.Host + // cancel context.CancelFunc config *Config logConsumer consumer.Logs logger *zap.Logger - listeners []*Listener + // listeners []*Listener } -func (nr *netflowReceiver) Start(ctx context.Context, host component.Host) error { +func (nr *netflowReceiver) Start(_ context.Context, _ component.Host) error { return nil } -func (nr *netflowReceiver) Shutdown(ctx context.Context) error { +func (nr *netflowReceiver) Shutdown(_ context.Context) error { return nil } From 3b42bc4436f89f95e154c5762f9fde782fa1b7cb Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 22 Aug 2024 08:53:58 -0500 Subject: [PATCH 20/31] netflowreceiver - gofmt and gci --- receiver/netflowreceiver/config.go | 43 ++++++++++++++--------------- receiver/netflowreceiver/factory.go | 3 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/receiver/netflowreceiver/config.go b/receiver/netflowreceiver/config.go index 7464a8f97013..e92eb79feb2e 100644 --- a/receiver/netflowreceiver/config.go +++ b/receiver/netflowreceiver/config.go @@ -34,33 +34,32 @@ type Config struct { func (cfg *Config) Validate() error { validSchemes := [3]string{"sflow", "netflow", "flow"} - validScheme := false - for _, scheme := range validSchemes { - if cfg.Scheme == scheme { - validScheme = true - break - } - } - if !validScheme { - return fmt.Errorf("scheme must be one of sflow, netflow, or flow") + validScheme := false + for _, scheme := range validSchemes { + if cfg.Scheme == scheme { + validScheme = true + break } + } + if !validScheme { + return fmt.Errorf("scheme must be one of sflow, netflow, or flow") + } - if cfg.Sockets <= 0 { - return fmt.Errorf("sockets must be greater than 0") - } + if cfg.Sockets <= 0 { + return fmt.Errorf("sockets must be greater than 0") + } - if cfg.Workers <= 0 { - return fmt.Errorf("workers must be greater than 0") - } + if cfg.Workers <= 0 { + return fmt.Errorf("workers must be greater than 0") + } - if cfg.QueueSize <= 0 { - cfg.QueueSize = defaultQueueSize - } + if cfg.QueueSize <= 0 { + cfg.QueueSize = defaultQueueSize + } - if cfg.Port <= 0 { - return fmt.Errorf("port must be greater than 0") - } - + if cfg.Port <= 0 { + return fmt.Errorf("port must be greater than 0") + } return nil } diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index 967d827fa6b2..c0b9b4fe50e3 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -6,10 +6,11 @@ package netflowreceiver // import "github.com/open-telemetry/opentelemetry-colle import ( "context" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver/internal/metadata" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver/internal/metadata" ) const ( From 3b1019e1586e1579cdd575290c3194bfe8f3b765 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 22 Aug 2024 08:58:15 -0500 Subject: [PATCH 21/31] netflowreceiver - go.mod version update --- receiver/netflowreceiver/go.mod | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 220e86d7181a..0b2f493f1b94 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -4,11 +4,11 @@ go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.106.2-0.20240809191011-ef07ea073562 - go.opentelemetry.io/collector/confmap v0.106.2-0.20240809191011-ef07ea073562 - go.opentelemetry.io/collector/consumer v0.106.2-0.20240809191011-ef07ea073562 + go.opentelemetry.io/collector/component v0.107.1-0.20240816132030-9fd84668bb02 + go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02 + go.opentelemetry.io/collector/consumer v0.107.1-0.20240816132030-9fd84668bb02 go.opentelemetry.io/collector/consumer/consumertest v0.106.1 - go.opentelemetry.io/collector/receiver v0.106.2-0.20240809191011-ef07ea073562 + go.opentelemetry.io/collector/receiver v0.107.1-0.20240816132030-9fd84668bb02 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -37,11 +37,11 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240809191011-ef07ea073562 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.107.1-0.20240816132030-9fd84668bb02 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect - go.opentelemetry.io/collector/featuregate v1.12.1-0.20240809191011-ef07ea073562 // indirect + go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02 // indirect go.opentelemetry.io/collector/internal/globalgates v0.106.1 // indirect - go.opentelemetry.io/collector/pdata v1.12.1-0.20240809191011-ef07ea073562 // indirect + go.opentelemetry.io/collector/pdata v1.13.1-0.20240816132030-9fd84668bb02 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect From 062d07a87ebc42416b903e08fea70a446660a74c Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 5 Sep 2024 06:41:06 -0500 Subject: [PATCH 22/31] netflow - add to versions.yaml --- versions.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/versions.yaml b/versions.yaml index 2b5fc633a95a..6d09ed81adfd 100644 --- a/versions.yaml +++ b/versions.yaml @@ -237,6 +237,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver From f62e09201a51bed9e9bd2722ef14782e47777aa4 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 5 Sep 2024 07:03:21 -0500 Subject: [PATCH 23/31] netflow - run make checks --- receiver/netflowreceiver/README.md | 3 +-- receiver/netflowreceiver/internal/metadata/generated_status.go | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index 5dd06ae0dedc..815a840ae2e3 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -3,12 +3,11 @@ | Status | | | ------------- |-----------| | Stability | [development]: logs | -| Distributions | [contrib] | +| Distributions | [] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fnetflow%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fnetflow) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fnetflow%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fnetflow) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@evan-bradley](https://www.github.com/evan-bradley), [@dlopes7](https://www.github.com/dlopes7) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib The netflow receiver can listen for [netflow](https://en.wikipedia.org/wiki/NetFlow), [sflow](https://en.wikipedia.org/wiki/SFlow), and [ipfix](https://en.wikipedia.org/wiki/IP_Flow_Information_Export) data and convert it to OpenTelemetry logs. The receiver is based on the [goflow2](https://github.com/netsampler/goflow2) project. diff --git a/receiver/netflowreceiver/internal/metadata/generated_status.go b/receiver/netflowreceiver/internal/metadata/generated_status.go index 93f9d2a8b6cc..65987878f5fd 100644 --- a/receiver/netflowreceiver/internal/metadata/generated_status.go +++ b/receiver/netflowreceiver/internal/metadata/generated_status.go @@ -7,7 +7,8 @@ import ( ) var ( - Type = component.MustNewType("netflow") + Type = component.MustNewType("netflow") + ScopeName = "otelcol/netflowreceiver" ) const ( From ca5128c86fa3675e8df2a4d7aca7704e1a969083 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Thu, 5 Sep 2024 07:03:55 -0500 Subject: [PATCH 24/31] netflow - update go.mod --- receiver/netflowreceiver/go.mod | 14 +++++---- receiver/netflowreceiver/go.sum | 54 ++++++++++++++++----------------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 0b2f493f1b94..3044f5b89c3e 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -1,13 +1,15 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver -go 1.21.0 +go 1.22.0 + +toolchain go1.22.2 require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.107.1-0.20240816132030-9fd84668bb02 go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02 go.opentelemetry.io/collector/consumer v0.107.1-0.20240816132030-9fd84668bb02 - go.opentelemetry.io/collector/consumer/consumertest v0.106.1 + go.opentelemetry.io/collector/consumer/consumertest v0.107.0 go.opentelemetry.io/collector/receiver v0.107.1-0.20240816132030-9fd84668bb02 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -19,7 +21,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-viper/mapstructure/v2 v2.0.0 // indirect + github.com/go-viper/mapstructure/v2 v2.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect @@ -38,11 +40,11 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.107.1-0.20240816132030-9fd84668bb02 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.107.0 // indirect go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.106.1 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.107.0 // indirect go.opentelemetry.io/collector/pdata v1.13.1-0.20240816132030-9fd84668bb02 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.107.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum index 748d39776392..b2b51db74025 100644 --- a/receiver/netflowreceiver/go.sum +++ b/receiver/netflowreceiver/go.sum @@ -10,8 +10,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/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-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= -github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= +github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -64,31 +64,31 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT 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= -go.opentelemetry.io/collector v0.106.1 h1:ZSQMpFGzFP3RILe1/+K80kCCT2ahn3MKt5e3u0Yz7Rs= -go.opentelemetry.io/collector/component v0.106.2-0.20240809191011-ef07ea073562 h1:myjn1RkKrZ0//4Tb4kOWKUboFzVEo2LNAcbVKOsqcnY= -go.opentelemetry.io/collector/component v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:KiVE/5ZayuLlDJTe7mHqHRCn/5LrmF99C7/mKe54mWA= -go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240809191011-ef07ea073562 h1:76U+ZAoRnp04x5zS2E0Cf1QQD+lAVHuKImNWe6RfY3I= -go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= -go.opentelemetry.io/collector/confmap v0.106.2-0.20240809191011-ef07ea073562 h1:wzgUr39AtHb77uLju8ArOflFvSfRwMvkY4pDv6MZ0H0= -go.opentelemetry.io/collector/confmap v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:iWdWgvxRYSHdAt5ySgPJq/i6fQMKGNnP5Pt7jOfTXno= -go.opentelemetry.io/collector/consumer v0.106.2-0.20240809191011-ef07ea073562 h1:AD9nE4H0qLVZknWPR7euqUKrcGzrmP6bHn+3zoj0DTw= -go.opentelemetry.io/collector/consumer v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:oy6pR/v5o/N9cxsICskyt//bU8k8EG0JeOO1MTDfs5A= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 h1:uxQjWm2XE7d1OncQDM9tL1ha+otGt1HjoRYIcQRMOfQ= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1/go.mod h1:xQScBf9/PORFaYM6JVPOr7/TcRVEuKcW5XbAXfJByRs= -go.opentelemetry.io/collector/consumer/consumertest v0.106.1 h1:hDdFeVjCLIJ6iLfbiYcV9s+4iboFXbkJ/k3h09qusPw= -go.opentelemetry.io/collector/consumer/consumertest v0.106.1/go.mod h1:WRTYnQ8bYHQrEN6eJZ80oC4pNI7VeDRdsTZI6xs9o5M= -go.opentelemetry.io/collector/featuregate v1.12.1-0.20240809191011-ef07ea073562 h1:jBKXaLF71yH9jXZH3OhwMr6sUxXX5vVafUNg3EnRJbk= -go.opentelemetry.io/collector/featuregate v1.12.1-0.20240809191011-ef07ea073562/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= -go.opentelemetry.io/collector/internal/globalgates v0.106.1 h1:0NQHTcykmYNDsNKObJ2XocGCv3WUAQZppfP3o6hZUIA= -go.opentelemetry.io/collector/internal/globalgates v0.106.1/go.mod h1:Z5US6O2xkZAtxVSSBnHAPFZwPhFoxlyKLUvS67Vx4gc= -go.opentelemetry.io/collector/pdata v1.12.1-0.20240809191011-ef07ea073562 h1:8EP6Grp5VFUxwlvXvamAVgL6bY6wayCC3xg0HadAnkU= -go.opentelemetry.io/collector/pdata v1.12.1-0.20240809191011-ef07ea073562/go.mod h1:MYeB0MmMAxeM0hstCFrCqWLzdyeYySim2dG6pDT6nYI= -go.opentelemetry.io/collector/pdata/pprofile v0.106.1 h1:nOLo25YnluNi+zAbU7G24RN86cJ1/EZJc6VEayBlOPo= -go.opentelemetry.io/collector/pdata/pprofile v0.106.1/go.mod h1:chr7lMJIzyXkccnPRkIPhyXtqLZLSReZYhwsggOGEfg= -go.opentelemetry.io/collector/pdata/testdata v0.106.1 h1:JUyLAwKD8o/9jgkBi16zOClxOyY028A7XIXHPV4mNmM= -go.opentelemetry.io/collector/pdata/testdata v0.106.1/go.mod h1:ghdz2RDEzsfigW0J+9oqA4fGmQJ/DJYUhE3vYU6JfhM= -go.opentelemetry.io/collector/receiver v0.106.2-0.20240809191011-ef07ea073562 h1:EqpFfqlV8OfFkvq48HpG/hyKCZ9r9IewVKFNoD5DPHY= -go.opentelemetry.io/collector/receiver v0.106.2-0.20240809191011-ef07ea073562/go.mod h1:+J2FEg4eDYdUuaDW8Cn41SeqFiuKdvnZOZlXvbVdVaw= +go.opentelemetry.io/collector v0.107.0 h1:C1Mng03iE73flGhEg795IFVlr3qhDLef5GESjIVtx5g= +go.opentelemetry.io/collector/component v0.107.1-0.20240816132030-9fd84668bb02 h1:LLWhq5h/z7JdxeMIqKs49oc+xd+7oyqpnbgfFAw1L9c= +go.opentelemetry.io/collector/component v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:dJbbK7+PLB4qvX1pboKyBnpRimGCV4qFJemPiLO4rdo= +go.opentelemetry.io/collector/config/configtelemetry v0.107.1-0.20240816132030-9fd84668bb02 h1:qpoImoLfVpZfND+o2qKJ0hib15yTF7mnjKBnS8O+cKQ= +go.opentelemetry.io/collector/config/configtelemetry v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02 h1:ebDK+CmU+bGm5T/hAao09vxc4SG6+qQgSuRvDGjzFyY= +go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:3ybd6KEP2x4PcfFhrrEX86b4Y9dk6uBgFgMgK1Rc+aE= +go.opentelemetry.io/collector/consumer v0.107.1-0.20240816132030-9fd84668bb02 h1:/hY2zgb7nZHYOSFDsA482n9bnhplL6gktg43nc938As= +go.opentelemetry.io/collector/consumer v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:eNdgFcd4kPmFcNi6b1A9rCvaWr/9mXnKOb2qS/YC6ec= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.107.0 h1:SEP5rLm4KgBaELciRQO4m9U2q3xn16KGjpIw8zQn6Ik= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.107.0/go.mod h1:Vi/aqlZjCBdGgGu+iOEfUyHvq2TJBar0WfsQSOMhR6Y= +go.opentelemetry.io/collector/consumer/consumertest v0.107.0 h1:BfjFHHAqbTmCN32akYvMhWKYC+ayHTX935/fRChwohM= +go.opentelemetry.io/collector/consumer/consumertest v0.107.0/go.mod h1:qNMedscdVyuxbV+wWUt4yGKQM3c0YEgQJTFeAtGZjRY= +go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02 h1:ZoCqkkOcfTJW7nd6hNF+cTD2cVSn48/OA4sgQVkxnhM= +go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= +go.opentelemetry.io/collector/internal/globalgates v0.107.0 h1:PaD6WgQg80YTVxg8OF+YEqgI7WRd13wMu/R6GIG7uNU= +go.opentelemetry.io/collector/internal/globalgates v0.107.0/go.mod h1:hca7Tpzu6JmBrAOgmlyp/ZM6kxprPRMKqSYoq/Tdzjw= +go.opentelemetry.io/collector/pdata v1.13.1-0.20240816132030-9fd84668bb02 h1:ZWKffCXPwEjYkfoDPCVLHEBdHrFyD/ZcMc4nbCmYkFU= +go.opentelemetry.io/collector/pdata v1.13.1-0.20240816132030-9fd84668bb02/go.mod h1:z1dTjwwtcoXxZx2/nkHysjxMeaxe9pEmYTEr4SMNIx8= +go.opentelemetry.io/collector/pdata/pprofile v0.107.0 h1:F25VZrEkSaneIBNcNI9LEBWf9nRC/WHKluSBTP0gKAA= +go.opentelemetry.io/collector/pdata/pprofile v0.107.0/go.mod h1:1GrwsKtgogRCt8aG/0lfJ037yDdFtYqF+OtJr+snxRQ= +go.opentelemetry.io/collector/pdata/testdata v0.107.0 h1:02CqvJrYjkrBlWDD+6yrByN1AhG2zT61OScLPhyyMwU= +go.opentelemetry.io/collector/pdata/testdata v0.107.0/go.mod h1:bqaeiDH1Lc5DFJXvjVHwO50x00TXj+oFre+EbOVeZXs= +go.opentelemetry.io/collector/receiver v0.107.1-0.20240816132030-9fd84668bb02 h1:6HCy2FC7aJQKeNjQ4hOPoiDDSc++8WczvymWFRsVSxA= +go.opentelemetry.io/collector/receiver v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:rmVeOIqeqbyJL/C57A7ryg2VLWiW8hXApCqf9+4BtKE= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= From 8c65324c989b1cf55c73af91b2185210d197efb0 Mon Sep 17 00:00:00 2001 From: David Lopes Date: Mon, 14 Oct 2024 11:12:34 -0500 Subject: [PATCH 25/31] Update receiver/netflowreceiver/factory.go Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> --- receiver/netflowreceiver/factory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index c0b9b4fe50e3..39a4d5ee14d6 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -24,7 +24,7 @@ func NewFactory() receiver.Factory { return receiver.NewFactory( metadata.Type, createDefaultConfig, - receiver.WithLogs(createLogsReceiver, component.StabilityLevelAlpha)) + receiver.WithLogs(createLogsReceiver, metadata.LogsStability)) } func createDefaultConfig() component.Config { From 56b1024cc34f4c311c19009598bb2996ac95072b Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Fri, 8 Nov 2024 07:46:39 -0600 Subject: [PATCH 26/31] #34164 - add dlopes7 to githubgen allowlist --- cmd/githubgen/allowlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/githubgen/allowlist.txt b/cmd/githubgen/allowlist.txt index 9783b4329155..2becfbca581e 100644 --- a/cmd/githubgen/allowlist.txt +++ b/cmd/githubgen/allowlist.txt @@ -22,3 +22,4 @@ tomasmota m1rp jriguera abhishek-at-cloudwerx +dlopes7 \ No newline at end of file From f3e45eda76f0ef7e19a7d43da0860ee394c4fb98 Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Fri, 8 Nov 2024 07:50:58 -0600 Subject: [PATCH 27/31] netflow - update readme with new format --- receiver/netflowreceiver/README.md | 45 ++++++++++++++++++------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index 815a840ae2e3..cb0cf2e3318a 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -21,7 +21,7 @@ This gives OpenTelemetry users the capability of monitoring network traffic, and ## Getting started -By default the receiver will listen for ipfix and netflow on port `2055` and sflow on port `6343`. The receiver can be configured to listen on different ports and protocols. +By default the receiver will listen for ipfix and netflow on port `2055`. The receiver can be configured to listen on different ports and protocols. Example configuration: @@ -63,31 +63,40 @@ You would then configure your network devices to send netflow, sflow, or ipfix d |-------|-------------|--------| ------- | | scheme | The type of flow data that to receive | `sflow`, `netflow`, `flow` | `netflow` | | hostname | The hostname or IP address to bind to | `localhost` | `0.0.0.0` | -| port | The port to bind to | `2055` | `2055` | +| port | The port to bind to | `2055` or `6343` | `2055` | | sockets | The number of sockets to use | 1 | 1 | | workers | The number of workers used to decode incoming flow messages | 2 | 2 | | queue_size | The size of the incoming netflow packets queue | 1000 | 1000000 | ## Data format -The netflow data is standardized for the different schemas and is converted to OpenTelemetry logs. The output will follow the format: +The netflow data is standardized for the different schemas and is converted to OpenTelemetry logs following the [semantic conventions](https://opentelemetry.io/docs/specs/semconv/general/attributes/#server-client-and-shared-network-attributes) + +The output will adhere the format: ```json { - "type": "SFLOW_5", - "time_received_ns": 1681583295157626000, - "sequence_num": 2999, - "sampling_rate": 100, - "sampler_address": "192.168.0.1", - "time_flow_start_ns": 1681583295157626000, - "time_flow_end_ns": 1681583295157626000, - "bytes": 1500, - "packets": 1, - "src_addr": "fd01::1", - "dst_addr": "fd01::2", - "etype": "IPv6", - "proto": "TCP", - "src_port": 443, - "dst_port": 50001 + "destination": { + "address": "192.168.0.1", + "port": 22 + }, + "flow": { + "end": 1731073104662487000, + "sampler_address": "192.168.0.2", + "sequence_num": 49, + "start": 1731073077662487000, + "time_received": 1731073138662487000, + "type": "NETFLOW_V5" + }, + "io": { + "bytes": 529, + "packets": 378 + }, + "source": { + "address": "192.168.0.3", + "port": 40 + }, + "transport": "TCP", + "type": "IPv4" } ``` From cd49448d500b90f500e2b304569e2a617b4b678d Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Mon, 11 Nov 2024 12:42:37 -0600 Subject: [PATCH 28/31] netflow - update to 0.113.0 --- receiver/netflowreceiver/factory_test.go | 2 +- .../generated_component_test.go | 2 +- receiver/netflowreceiver/go.mod | 57 ++++----- receiver/netflowreceiver/go.sum | 119 ++++++++---------- receiver/netflowreceiver/listener_test.go | 2 +- receiver/netflowreceiver/receiver_test.go | 2 +- 6 files changed, 81 insertions(+), 103 deletions(-) diff --git a/receiver/netflowreceiver/factory_test.go b/receiver/netflowreceiver/factory_test.go index 0beb374ccee6..5260b66572fd 100644 --- a/receiver/netflowreceiver/factory_test.go +++ b/receiver/netflowreceiver/factory_test.go @@ -24,7 +24,7 @@ func TestCreateReceiver(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() set := receivertest.NewNopSettings() - receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) + receiver, err := factory.CreateLogs(context.Background(), set, cfg, consumertest.NewNop()) assert.NoError(t, err, "receiver creation failed") assert.NotNil(t, receiver, "receiver creation failed") } diff --git a/receiver/netflowreceiver/generated_component_test.go b/receiver/netflowreceiver/generated_component_test.go index 21e1f8f187e9..15a599dc341a 100644 --- a/receiver/netflowreceiver/generated_component_test.go +++ b/receiver/netflowreceiver/generated_component_test.go @@ -34,7 +34,7 @@ func TestComponentLifecycle(t *testing.T) { { name: "logs", createFn: func(ctx context.Context, set receiver.Settings, cfg component.Config) (component.Component, error) { - return factory.CreateLogsReceiver(ctx, set, cfg, consumertest.NewNop()) + return factory.CreateLogs(ctx, set, cfg, consumertest.NewNop()) }, }, } diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 3044f5b89c3e..248de2b77d1e 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -6,25 +6,23 @@ toolchain go1.22.2 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.107.1-0.20240816132030-9fd84668bb02 - go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02 - go.opentelemetry.io/collector/consumer v0.107.1-0.20240816132030-9fd84668bb02 - go.opentelemetry.io/collector/consumer/consumertest v0.107.0 - go.opentelemetry.io/collector/receiver v0.107.1-0.20240816132030-9fd84668bb02 + go.opentelemetry.io/collector/component v0.113.0 + go.opentelemetry.io/collector/confmap v1.19.0 + go.opentelemetry.io/collector/consumer v0.113.0 + go.opentelemetry.io/collector/consumer/consumertest v0.113.0 + go.opentelemetry.io/collector/receiver v0.113.0 + go.opentelemetry.io/collector/receiver/receivertest v0.113.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) require ( - github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect @@ -33,30 +31,25 @@ require ( 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.107.1-0.20240816132030-9fd84668bb02 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.107.0 // indirect - go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.107.0 // indirect - go.opentelemetry.io/collector/pdata v1.13.1-0.20240816132030-9fd84668bb02 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.107.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.113.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror v0.113.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 // indirect + go.opentelemetry.io/collector/pdata v1.19.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.113.0 // indirect + go.opentelemetry.io/collector/pipeline v0.113.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/sdk v1.31.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum index b2b51db74025..c06629131fb8 100644 --- a/receiver/netflowreceiver/go.sum +++ b/receiver/netflowreceiver/go.sum @@ -1,7 +1,3 @@ -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/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= @@ -10,8 +6,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/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-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -19,8 +15,6 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN 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/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= -github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= 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= @@ -44,18 +38,8 @@ 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/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/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.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= -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.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -64,43 +48,44 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT 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= -go.opentelemetry.io/collector v0.107.0 h1:C1Mng03iE73flGhEg795IFVlr3qhDLef5GESjIVtx5g= -go.opentelemetry.io/collector/component v0.107.1-0.20240816132030-9fd84668bb02 h1:LLWhq5h/z7JdxeMIqKs49oc+xd+7oyqpnbgfFAw1L9c= -go.opentelemetry.io/collector/component v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:dJbbK7+PLB4qvX1pboKyBnpRimGCV4qFJemPiLO4rdo= -go.opentelemetry.io/collector/config/configtelemetry v0.107.1-0.20240816132030-9fd84668bb02 h1:qpoImoLfVpZfND+o2qKJ0hib15yTF7mnjKBnS8O+cKQ= -go.opentelemetry.io/collector/config/configtelemetry v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= -go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02 h1:ebDK+CmU+bGm5T/hAao09vxc4SG6+qQgSuRvDGjzFyY= -go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:3ybd6KEP2x4PcfFhrrEX86b4Y9dk6uBgFgMgK1Rc+aE= -go.opentelemetry.io/collector/consumer v0.107.1-0.20240816132030-9fd84668bb02 h1:/hY2zgb7nZHYOSFDsA482n9bnhplL6gktg43nc938As= -go.opentelemetry.io/collector/consumer v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:eNdgFcd4kPmFcNi6b1A9rCvaWr/9mXnKOb2qS/YC6ec= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.107.0 h1:SEP5rLm4KgBaELciRQO4m9U2q3xn16KGjpIw8zQn6Ik= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.107.0/go.mod h1:Vi/aqlZjCBdGgGu+iOEfUyHvq2TJBar0WfsQSOMhR6Y= -go.opentelemetry.io/collector/consumer/consumertest v0.107.0 h1:BfjFHHAqbTmCN32akYvMhWKYC+ayHTX935/fRChwohM= -go.opentelemetry.io/collector/consumer/consumertest v0.107.0/go.mod h1:qNMedscdVyuxbV+wWUt4yGKQM3c0YEgQJTFeAtGZjRY= -go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02 h1:ZoCqkkOcfTJW7nd6hNF+cTD2cVSn48/OA4sgQVkxnhM= -go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= -go.opentelemetry.io/collector/internal/globalgates v0.107.0 h1:PaD6WgQg80YTVxg8OF+YEqgI7WRd13wMu/R6GIG7uNU= -go.opentelemetry.io/collector/internal/globalgates v0.107.0/go.mod h1:hca7Tpzu6JmBrAOgmlyp/ZM6kxprPRMKqSYoq/Tdzjw= -go.opentelemetry.io/collector/pdata v1.13.1-0.20240816132030-9fd84668bb02 h1:ZWKffCXPwEjYkfoDPCVLHEBdHrFyD/ZcMc4nbCmYkFU= -go.opentelemetry.io/collector/pdata v1.13.1-0.20240816132030-9fd84668bb02/go.mod h1:z1dTjwwtcoXxZx2/nkHysjxMeaxe9pEmYTEr4SMNIx8= -go.opentelemetry.io/collector/pdata/pprofile v0.107.0 h1:F25VZrEkSaneIBNcNI9LEBWf9nRC/WHKluSBTP0gKAA= -go.opentelemetry.io/collector/pdata/pprofile v0.107.0/go.mod h1:1GrwsKtgogRCt8aG/0lfJ037yDdFtYqF+OtJr+snxRQ= -go.opentelemetry.io/collector/pdata/testdata v0.107.0 h1:02CqvJrYjkrBlWDD+6yrByN1AhG2zT61OScLPhyyMwU= -go.opentelemetry.io/collector/pdata/testdata v0.107.0/go.mod h1:bqaeiDH1Lc5DFJXvjVHwO50x00TXj+oFre+EbOVeZXs= -go.opentelemetry.io/collector/receiver v0.107.1-0.20240816132030-9fd84668bb02 h1:6HCy2FC7aJQKeNjQ4hOPoiDDSc++8WczvymWFRsVSxA= -go.opentelemetry.io/collector/receiver v0.107.1-0.20240816132030-9fd84668bb02/go.mod h1:rmVeOIqeqbyJL/C57A7ryg2VLWiW8hXApCqf9+4BtKE= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= -go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= -go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/collector/component v0.113.0 h1:/nx+RvZgxUEXP+YcTj69rEtuSEGkfaCyp/ad5zQGLjU= +go.opentelemetry.io/collector/component v0.113.0/go.mod h1:2T779hIGHU9i7xbXbV3q1/JnRw2FyzUYXW2vq47A6EU= +go.opentelemetry.io/collector/config/configtelemetry v0.113.0 h1:hweTRrVddnUeA3k7HzRY4oUR9lRdMa7of3mHNUS5YyA= +go.opentelemetry.io/collector/config/configtelemetry v0.113.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/confmap v1.19.0 h1:TQ0lZpAKqgsE0EKk+u4JA+uBbPYeFRmWP3GH43w40CY= +go.opentelemetry.io/collector/confmap v1.19.0/go.mod h1:GgNu1ElPGmLn9govqIfjaopvdspw4PJ9KeDtWC4E2Q4= +go.opentelemetry.io/collector/consumer v0.113.0 h1:KJSiK5vSIY9dgPxwKfQ3gOgKtQsqc+7IB7mGhUAL5c8= +go.opentelemetry.io/collector/consumer v0.113.0/go.mod h1:zHMlXYFaJlZoLCBR6UwWoyXZ/adcO1u2ydqUal3VmYU= +go.opentelemetry.io/collector/consumer/consumererror v0.113.0 h1:Hd2N7n9RKbnKRaVrdw6fPBoQko5zZIgCxwVxkL6SAIE= +go.opentelemetry.io/collector/consumer/consumererror v0.113.0/go.mod h1:o0MAGFdzcr7LFTUQ6iivPPhbVmn2ZVIYm3FPXk2+JUo= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 h1:RftAcQUY5UOfbEK4s16jnORqTx16y9+PxA1lQwt98cQ= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0/go.mod h1:ZuHrQ4pWguh6dw0DgTfcUtdY/T+cnOJJNP6LMbm5Y5A= +go.opentelemetry.io/collector/consumer/consumertest v0.113.0 h1:ua2AjNx3DUA8qElXNkggB4w3VDL/rBKBvryOQkhumH8= +go.opentelemetry.io/collector/consumer/consumertest v0.113.0/go.mod h1:vK8o4ZTZSiG3rVyqxZcCNmT/cvEfx34ig7V65L9+6Rg= +go.opentelemetry.io/collector/pdata v1.19.0 h1:jmnU5R8TOCbwRr4B8sjdRxM7L5WnEKlQWX1dtLYxIbE= +go.opentelemetry.io/collector/pdata v1.19.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= +go.opentelemetry.io/collector/pdata/pprofile v0.113.0 h1:VRf4p0VhfuaR+Epy/nMIlu/9t39WU9CUgHVUvpuGxfU= +go.opentelemetry.io/collector/pdata/pprofile v0.113.0/go.mod h1:5aDejksdXh5PdJN/OhpzATGT3kbNL0RMmw2Q0Q6E/o0= +go.opentelemetry.io/collector/pdata/testdata v0.113.0 h1:vRfn85jicO2F4eOTgsWtzmU/K3E/uZUtM1HEefvvJD8= +go.opentelemetry.io/collector/pdata/testdata v0.113.0/go.mod h1:sR+6eR+YEJhYZu9StbqzeWcCmHpfBAgX/qjP82HY9Gw= +go.opentelemetry.io/collector/pipeline v0.113.0 h1:vSRzRe3717jV0btCNPhVkhg2lu0uFxcm2VO+vhad/eE= +go.opentelemetry.io/collector/pipeline v0.113.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= +go.opentelemetry.io/collector/receiver v0.113.0 h1:vraAbkPy8Pz9x5X39gV+j9t6x23PNsY2aJ6gQMugRbQ= +go.opentelemetry.io/collector/receiver v0.113.0/go.mod h1:IUa8/lNw8Qh4L5Q3jOeRWKW0ebQPoNcfhytxN5Puq2A= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0 h1:uVxuzjGe2t1sbwahSBowVHYnGzpzn8brmfn8z1UHvQg= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0/go.mod h1:khKDkzYJR2x2OPUqGSmoSncdINT9lUE5IThiHPDbqZk= +go.opentelemetry.io/collector/receiver/receivertest v0.113.0 h1:0vOvz3S4Q/KwcNCS9C7zPo0uxD6RSWktG88yGdxfV6g= +go.opentelemetry.io/collector/receiver/receivertest v0.113.0/go.mod h1:sRq5ctm5UE/0Ar562wnCVQ1zbAie/D127D1WbtbEuEc= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -116,20 +101,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= 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/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.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -138,12 +123,12 @@ 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= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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= diff --git a/receiver/netflowreceiver/listener_test.go b/receiver/netflowreceiver/listener_test.go index ee783970b49d..6c241747daed 100644 --- a/receiver/netflowreceiver/listener_test.go +++ b/receiver/netflowreceiver/listener_test.go @@ -16,7 +16,7 @@ func TestCreateValidDefaultListener(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() set := receivertest.NewNopSettings() - receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) + receiver, err := factory.CreateLogs(context.Background(), set, cfg, consumertest.NewNop()) assert.NoError(t, err, "receiver creation failed") assert.NotNil(t, receiver, "receiver creation failed") assert.Equal(t, "netflow", receiver.(*netflowReceiver).config.Scheme) diff --git a/receiver/netflowreceiver/receiver_test.go b/receiver/netflowreceiver/receiver_test.go index 3bad430341db..10e0f689f040 100644 --- a/receiver/netflowreceiver/receiver_test.go +++ b/receiver/netflowreceiver/receiver_test.go @@ -16,7 +16,7 @@ func TestCreateValidDefaultReceiver(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() set := receivertest.NewNopSettings() - receiver, err := factory.CreateLogsReceiver(context.Background(), set, cfg, consumertest.NewNop()) + receiver, err := factory.CreateLogs(context.Background(), set, cfg, consumertest.NewNop()) assert.NoError(t, err, "receiver creation failed") assert.NotNil(t, receiver, "receiver creation failed") // TODO - Will be added on the following PR From 20eee8149e6b09eb0c7d97cb19b2e91892ccf48f Mon Sep 17 00:00:00 2001 From: dlopes7 Date: Mon, 11 Nov 2024 13:54:43 -0600 Subject: [PATCH 29/31] netflow - generate --- receiver/netflowreceiver/README.md | 2 +- receiver/netflowreceiver/generated_component_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md index cb0cf2e3318a..30443c6d1199 100644 --- a/receiver/netflowreceiver/README.md +++ b/receiver/netflowreceiver/README.md @@ -7,7 +7,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fnetflow%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fnetflow) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fnetflow%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fnetflow) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@evan-bradley](https://www.github.com/evan-bradley), [@dlopes7](https://www.github.com/dlopes7) | -[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development The netflow receiver can listen for [netflow](https://en.wikipedia.org/wiki/NetFlow), [sflow](https://en.wikipedia.org/wiki/SFlow), and [ipfix](https://en.wikipedia.org/wiki/IP_Flow_Information_Export) data and convert it to OpenTelemetry logs. The receiver is based on the [goflow2](https://github.com/netsampler/goflow2) project. diff --git a/receiver/netflowreceiver/generated_component_test.go b/receiver/netflowreceiver/generated_component_test.go index 15a599dc341a..40ac0909cd8e 100644 --- a/receiver/netflowreceiver/generated_component_test.go +++ b/receiver/netflowreceiver/generated_component_test.go @@ -46,21 +46,21 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, err) require.NoError(t, sub.Unmarshal(&cfg)) - for _, test := range tests { - t.Run(test.name+"-shutdown", func(t *testing.T) { - c, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + for _, tt := range tests { + t.Run(tt.name+"-shutdown", func(t *testing.T) { + c, err := tt.createFn(context.Background(), receivertest.NewNopSettings(), cfg) require.NoError(t, err) err = c.Shutdown(context.Background()) require.NoError(t, err) }) - t.Run(test.name+"-lifecycle", func(t *testing.T) { - firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + t.Run(tt.name+"-lifecycle", func(t *testing.T) { + firstRcvr, err := tt.createFn(context.Background(), receivertest.NewNopSettings(), cfg) require.NoError(t, err) host := componenttest.NewNopHost() require.NoError(t, err) require.NoError(t, firstRcvr.Start(context.Background(), host)) require.NoError(t, firstRcvr.Shutdown(context.Background())) - secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + secondRcvr, err := tt.createFn(context.Background(), receivertest.NewNopSettings(), cfg) require.NoError(t, err) require.NoError(t, secondRcvr.Start(context.Background(), host)) require.NoError(t, secondRcvr.Shutdown(context.Background())) From e6b99ac3354512f2e1dafc0d193b25187ca81ee6 Mon Sep 17 00:00:00 2001 From: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:10:54 -0500 Subject: [PATCH 30/31] Fix linting errors --- .github/CODEOWNERS | 95 +---------------------- receiver/netflowreceiver/config_test.go | 2 - receiver/netflowreceiver/factory.go | 1 - receiver/netflowreceiver/listener_test.go | 1 - receiver/netflowreceiver/receiver_test.go | 1 - 5 files changed, 1 insertion(+), 99 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b739aa44dc8e..b7869087f338 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -248,6 +248,7 @@ receiver/mongodbatlasreceiver/ @open-telemetry/collector-cont receiver/mongodbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei receiver/mysqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/namedpipereceiver/ @open-telemetry/collector-contrib-approvers @sinkingpoint @djaglowski +receiver/netflowreceiver/ @open-telemetry/collector-contrib-approvers @evan-bradley @dlopes7 receiver/nginxreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/nsxtreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @schmikei receiver/ntpreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @@ -293,100 +294,6 @@ receiver/windowseventlogreceiver/ @open-telemetry/collector-cont receiver/windowsperfcountersreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @alxbl @pjanotti receiver/zipkinreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @andrzej-stencel @crobert-1 receiver/zookeeperreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/activedirectorydsreceiver/ @open-telemetry/collector-contrib-approvers @BinaryFissionGames @pjanotti -receiver/aerospikereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @antonblock -receiver/apachereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/apachesparkreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @Caleb-Hurshman @mrsillydog -receiver/awscloudwatchmetricsreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling -receiver/awscloudwatchreceiver/ @open-telemetry/collector-contrib-approvers @schmikei -receiver/awscontainerinsightreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @pxaws -receiver/awsecscontainermetricsreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 -receiver/awsfirehosereceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 -receiver/awss3receiver/ @open-telemetry/collector-contrib-approvers @atoulme @adcharre -receiver/awsxrayreceiver/ @open-telemetry/collector-contrib-approvers @wangzlei @srprash -receiver/azureblobreceiver/ @open-telemetry/collector-contrib-approvers @eedorenko @mx-psi -receiver/azureeventhubreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @cparkins -receiver/azuremonitorreceiver/ @open-telemetry/collector-contrib-approvers @nslaughter @codeboten -receiver/bigipreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek -receiver/carbonreceiver/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo -receiver/chronyreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @jamesmoessis -receiver/cloudflarereceiver/ @open-telemetry/collector-contrib-approvers @dehaansa @djaglowski -receiver/cloudfoundryreceiver/ @open-telemetry/collector-contrib-approvers @crobert-1 -receiver/collectdreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/couchdbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/datadogreceiver/ @open-telemetry/collector-contrib-approvers @boostchicken @gouthamve @jpkrohling @MovieStoreGuy -receiver/dockerstatsreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis -receiver/elasticsearchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @BinaryFissionGames -receiver/expvarreceiver/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy -receiver/filelogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/filestatsreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/flinkmetricsreceiver/ @open-telemetry/collector-contrib-approvers @JonathanWamsley @djaglowski -receiver/fluentforwardreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax -receiver/gitproviderreceiver/ @open-telemetry/collector-contrib-approvers @adrielp @andrzej-stencel -receiver/googlecloudmonitoringreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @TylerHelmuth @abhishek-at-cloudwerx -receiver/googlecloudpubsubreceiver/ @open-telemetry/collector-contrib-approvers @alexvanboxel -receiver/haproxyreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @MovieStoreGuy -receiver/hostmetricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @braydonk -receiver/httpcheckreceiver/ @open-telemetry/collector-contrib-approvers @codeboten -receiver/iisreceiver/ @open-telemetry/collector-contrib-approvers @Mrod1598 @pjanotti -receiver/influxdbreceiver/ @open-telemetry/collector-contrib-approvers @jacobmarble -receiver/jaegerreceiver/ @open-telemetry/collector-contrib-approvers @yurishkuro -receiver/jmxreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick -receiver/journaldreceiver/ @open-telemetry/collector-contrib-approvers @sumo-drosiek @djaglowski -receiver/k8sclusterreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth @povilasv -receiver/k8seventsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth -receiver/k8sobjectsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @hvaghani221 @TylerHelmuth -receiver/kafkametricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax -receiver/kafkareceiver/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy -receiver/kubeletstatsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth @ChrsMark -receiver/lokireceiver/ @open-telemetry/collector-contrib-approvers @mar4uk @jpkrohling -receiver/memcachedreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/mongodbatlasreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei -receiver/mongodbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei -receiver/mysqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/namedpipereceiver/ @open-telemetry/collector-contrib-approvers @sinkingpoint @djaglowski -receiver/netflowreceiver/ @open-telemetry/collector-contrib-approvers @evan-bradley @dlopes7 -receiver/nginxreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/nsxtreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @schmikei -receiver/opencensusreceiver/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -receiver/oracledbreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @crobert-1 @atoulme -receiver/osqueryreceiver/ @open-telemetry/collector-contrib-approvers @codeboten @nslaughter @smithclay -receiver/otelarrowreceiver/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 -receiver/otlpjsonfilereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme -receiver/podmanreceiver/ @open-telemetry/collector-contrib-approvers @rogercoll -receiver/postgresqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/prometheusreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole -receiver/pulsarreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @dao-jun -receiver/purefareceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure -receiver/purefbreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure -receiver/rabbitmqreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @cpheps -receiver/receivercreator/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick -receiver/redisreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @hughesjj -receiver/riakreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @armstrmi -receiver/saphanareceiver/ @open-telemetry/collector-contrib-approvers @dehaansa -receiver/sapmreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/signalfxreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax -receiver/simpleprometheusreceiver/ @open-telemetry/collector-contrib-approvers @fatsheep9146 -receiver/skywalkingreceiver/ @open-telemetry/collector-contrib-approvers @JaredTan95 -receiver/snmpreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek @tamir-michaeli -receiver/snowflakereceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @shalper2 -receiver/solacereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @mcardy -receiver/splunkenterprisereceiver/ @open-telemetry/collector-contrib-approvers @shalper2 @MovieStoreGuy @greatestusername -receiver/splunkhecreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/sqlqueryreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @crobert-1 -receiver/sqlserverreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek -receiver/sshcheckreceiver/ @open-telemetry/collector-contrib-approvers @nslaughter @codeboten -receiver/statsdreceiver/ @open-telemetry/collector-contrib-approvers @jmacd @dmitryax -receiver/syslogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @andrzej-stencel -receiver/tcplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/udplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/vcenterreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei @StefanKurek -receiver/wavefrontreceiver/ @open-telemetry/collector-contrib-approvers @samiura -receiver/webhookeventreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @shalper2 -receiver/windowseventlogreceiver/ @open-telemetry/collector-contrib-approvers @armstrmi @pjanotti -receiver/windowsperfcountersreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @alxbl @pjanotti -receiver/zipkinreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @andrzej-stencel @crobert-1 -receiver/zookeeperreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski testbed/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers testbed/mockdatasenders/mockdatadogagentexporter/ @open-telemetry/collector-contrib-approvers @boostchicken diff --git a/receiver/netflowreceiver/config_test.go b/receiver/netflowreceiver/config_test.go index f430caf2c6b2..167eaadaaf1e 100644 --- a/receiver/netflowreceiver/config_test.go +++ b/receiver/netflowreceiver/config_test.go @@ -32,7 +32,6 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "one_listener"), expected: &Config{ - Scheme: "netflow", Port: 2055, Sockets: 1, @@ -90,5 +89,4 @@ func TestInvalidConfig(t *testing.T) { assert.ErrorContains(t, err, tt.err) }) } - } diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go index 39a4d5ee14d6..87c27e9b76ed 100644 --- a/receiver/netflowreceiver/factory.go +++ b/receiver/netflowreceiver/factory.go @@ -35,7 +35,6 @@ func createDefaultConfig() component.Config { Workers: defaultWorkers, QueueSize: defaultQueueSize, } - } func createLogsReceiver(_ context.Context, params receiver.Settings, cfg component.Config, consumer consumer.Logs) (receiver.Logs, error) { diff --git a/receiver/netflowreceiver/listener_test.go b/receiver/netflowreceiver/listener_test.go index 6c241747daed..9fbae90c700c 100644 --- a/receiver/netflowreceiver/listener_test.go +++ b/receiver/netflowreceiver/listener_test.go @@ -24,5 +24,4 @@ func TestCreateValidDefaultListener(t *testing.T) { assert.Equal(t, 1, receiver.(*netflowReceiver).config.Sockets) assert.Equal(t, 2, receiver.(*netflowReceiver).config.Workers) assert.Equal(t, 1_000_000, receiver.(*netflowReceiver).config.QueueSize) - } diff --git a/receiver/netflowreceiver/receiver_test.go b/receiver/netflowreceiver/receiver_test.go index 10e0f689f040..ad37d7feebf0 100644 --- a/receiver/netflowreceiver/receiver_test.go +++ b/receiver/netflowreceiver/receiver_test.go @@ -21,5 +21,4 @@ func TestCreateValidDefaultReceiver(t *testing.T) { assert.NotNil(t, receiver, "receiver creation failed") // TODO - Will be added on the following PR // assert.NotNil(t, "sflow", receiver.(*netflowReceiver).listeners[0].recv) - } From 58b4baa2d8234c2ca464bb66fd8ee40c975ff3a2 Mon Sep 17 00:00:00 2001 From: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:19:57 -0500 Subject: [PATCH 31/31] Update to latest Collector version --- receiver/netflowreceiver/go.mod | 41 ++++++++-------- receiver/netflowreceiver/go.sum | 86 +++++++++++++++++---------------- 2 files changed, 65 insertions(+), 62 deletions(-) diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod index 248de2b77d1e..76f1ede69faa 100644 --- a/receiver/netflowreceiver/go.mod +++ b/receiver/netflowreceiver/go.mod @@ -6,12 +6,13 @@ toolchain go1.22.2 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.113.0 - go.opentelemetry.io/collector/confmap v1.19.0 - go.opentelemetry.io/collector/consumer v0.113.0 - go.opentelemetry.io/collector/consumer/consumertest v0.113.0 - go.opentelemetry.io/collector/receiver v0.113.0 - go.opentelemetry.io/collector/receiver/receivertest v0.113.0 + go.opentelemetry.io/collector/component v0.114.0 + go.opentelemetry.io/collector/component/componenttest v0.114.0 + go.opentelemetry.io/collector/confmap v1.20.0 + go.opentelemetry.io/collector/consumer v0.114.0 + go.opentelemetry.io/collector/consumer/consumertest v0.114.0 + go.opentelemetry.io/collector/receiver v0.114.0 + go.opentelemetry.io/collector/receiver/receivertest v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -26,27 +27,27 @@ require ( github.com/json-iterator/go v1.1.12 // 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/knadh/koanf/v2 v2.1.2 // 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/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.113.0 // indirect - go.opentelemetry.io/collector/consumer/consumererror v0.113.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/pdata v1.19.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.113.0 // indirect - go.opentelemetry.io/collector/pipeline v0.113.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0 // indirect - go.opentelemetry.io/otel v1.31.0 // indirect - go.opentelemetry.io/otel/metric v1.31.0 // indirect - go.opentelemetry.io/otel/sdk v1.31.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect - go.opentelemetry.io/otel/trace v1.31.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.114.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror v0.114.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 // indirect + go.opentelemetry.io/collector/pdata v1.20.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.114.0 // indirect + go.opentelemetry.io/collector/pipeline v0.114.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0 // indirect + go.opentelemetry.io/otel v1.32.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/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.26.0 // indirect + golang.org/x/sys v0.27.0 // indirect golang.org/x/text v0.17.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect google.golang.org/grpc v1.67.1 // indirect diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum index c06629131fb8..aadadb6cb45c 100644 --- a/receiver/netflowreceiver/go.sum +++ b/receiver/netflowreceiver/go.sum @@ -23,8 +23,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -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/knadh/koanf/v2 v2.1.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= 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= @@ -48,44 +48,46 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT 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= -go.opentelemetry.io/collector/component v0.113.0 h1:/nx+RvZgxUEXP+YcTj69rEtuSEGkfaCyp/ad5zQGLjU= -go.opentelemetry.io/collector/component v0.113.0/go.mod h1:2T779hIGHU9i7xbXbV3q1/JnRw2FyzUYXW2vq47A6EU= -go.opentelemetry.io/collector/config/configtelemetry v0.113.0 h1:hweTRrVddnUeA3k7HzRY4oUR9lRdMa7of3mHNUS5YyA= -go.opentelemetry.io/collector/config/configtelemetry v0.113.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= -go.opentelemetry.io/collector/confmap v1.19.0 h1:TQ0lZpAKqgsE0EKk+u4JA+uBbPYeFRmWP3GH43w40CY= -go.opentelemetry.io/collector/confmap v1.19.0/go.mod h1:GgNu1ElPGmLn9govqIfjaopvdspw4PJ9KeDtWC4E2Q4= -go.opentelemetry.io/collector/consumer v0.113.0 h1:KJSiK5vSIY9dgPxwKfQ3gOgKtQsqc+7IB7mGhUAL5c8= -go.opentelemetry.io/collector/consumer v0.113.0/go.mod h1:zHMlXYFaJlZoLCBR6UwWoyXZ/adcO1u2ydqUal3VmYU= -go.opentelemetry.io/collector/consumer/consumererror v0.113.0 h1:Hd2N7n9RKbnKRaVrdw6fPBoQko5zZIgCxwVxkL6SAIE= -go.opentelemetry.io/collector/consumer/consumererror v0.113.0/go.mod h1:o0MAGFdzcr7LFTUQ6iivPPhbVmn2ZVIYm3FPXk2+JUo= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 h1:RftAcQUY5UOfbEK4s16jnORqTx16y9+PxA1lQwt98cQ= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0/go.mod h1:ZuHrQ4pWguh6dw0DgTfcUtdY/T+cnOJJNP6LMbm5Y5A= -go.opentelemetry.io/collector/consumer/consumertest v0.113.0 h1:ua2AjNx3DUA8qElXNkggB4w3VDL/rBKBvryOQkhumH8= -go.opentelemetry.io/collector/consumer/consumertest v0.113.0/go.mod h1:vK8o4ZTZSiG3rVyqxZcCNmT/cvEfx34ig7V65L9+6Rg= -go.opentelemetry.io/collector/pdata v1.19.0 h1:jmnU5R8TOCbwRr4B8sjdRxM7L5WnEKlQWX1dtLYxIbE= -go.opentelemetry.io/collector/pdata v1.19.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= -go.opentelemetry.io/collector/pdata/pprofile v0.113.0 h1:VRf4p0VhfuaR+Epy/nMIlu/9t39WU9CUgHVUvpuGxfU= -go.opentelemetry.io/collector/pdata/pprofile v0.113.0/go.mod h1:5aDejksdXh5PdJN/OhpzATGT3kbNL0RMmw2Q0Q6E/o0= -go.opentelemetry.io/collector/pdata/testdata v0.113.0 h1:vRfn85jicO2F4eOTgsWtzmU/K3E/uZUtM1HEefvvJD8= -go.opentelemetry.io/collector/pdata/testdata v0.113.0/go.mod h1:sR+6eR+YEJhYZu9StbqzeWcCmHpfBAgX/qjP82HY9Gw= -go.opentelemetry.io/collector/pipeline v0.113.0 h1:vSRzRe3717jV0btCNPhVkhg2lu0uFxcm2VO+vhad/eE= -go.opentelemetry.io/collector/pipeline v0.113.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= -go.opentelemetry.io/collector/receiver v0.113.0 h1:vraAbkPy8Pz9x5X39gV+j9t6x23PNsY2aJ6gQMugRbQ= -go.opentelemetry.io/collector/receiver v0.113.0/go.mod h1:IUa8/lNw8Qh4L5Q3jOeRWKW0ebQPoNcfhytxN5Puq2A= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0 h1:uVxuzjGe2t1sbwahSBowVHYnGzpzn8brmfn8z1UHvQg= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0/go.mod h1:khKDkzYJR2x2OPUqGSmoSncdINT9lUE5IThiHPDbqZk= -go.opentelemetry.io/collector/receiver/receivertest v0.113.0 h1:0vOvz3S4Q/KwcNCS9C7zPo0uxD6RSWktG88yGdxfV6g= -go.opentelemetry.io/collector/receiver/receivertest v0.113.0/go.mod h1:sRq5ctm5UE/0Ar562wnCVQ1zbAie/D127D1WbtbEuEc= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.opentelemetry.io/collector/component v0.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= +go.opentelemetry.io/collector/component v0.114.0/go.mod h1:MLxtjZ6UVHjDxSdhGLuJfHBHvfl1iT/Y7IaQPD24Eww= +go.opentelemetry.io/collector/component/componenttest v0.114.0 h1:GM4FTTlfeXoVm6sZYBHImwlRN8ayh2oAfUhvaFj7Zo8= +go.opentelemetry.io/collector/component/componenttest v0.114.0/go.mod h1:ZZEJMtbJtoVC/3/9R1HzERq+cYQRxuMFQrPCpfZ4Xos= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0 h1:kjLeyrumge6wsX6ZIkicdNOlBXaEyW2PI2ZdVXz/rzY= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/confmap v1.20.0 h1:ARfOwmkKxFOud1njl03yAHQ30+uenlzqCO6LBYamDTE= +go.opentelemetry.io/collector/confmap v1.20.0/go.mod h1:DMpd9Ay/ffls3JoQBQ73vWeRsz1rNuLbwjo6WtjSQus= +go.opentelemetry.io/collector/consumer v0.114.0 h1:1zVaHvfIZowGwZRitRBRo3i+RP2StlU+GClYiofSw0Q= +go.opentelemetry.io/collector/consumer v0.114.0/go.mod h1:d+Mrzt9hsH1ub3zmwSlnQVPLeTYir4Mgo7CrWfnncN4= +go.opentelemetry.io/collector/consumer/consumererror v0.114.0 h1:r2YiELfWerb40FHD23V04gNjIkLUcjEKGxI4Vtm2iO4= +go.opentelemetry.io/collector/consumer/consumererror v0.114.0/go.mod h1:MzIrLQ5jptO2egypolhlAbZsWZr29WC4FhSxQjnxcvg= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 h1:5pXYy3E6UK5Huu3aQbsYL8B6E6MyWx4fvXXDn+oXZaA= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0/go.mod h1:PMq3f54KcJQO4v1tue0QxQScu7REFVADlXxXSAYMiN0= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0 h1:isaTwJK5DOy8Bs7GuLq23ejfgj8gLIo5dOUvkRnLF4g= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0/go.mod h1:GNeLPkfRPdh06n/Rv1UKa/cAtCKjN0a7ADyHjIj4HFE= +go.opentelemetry.io/collector/pdata v1.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= +go.opentelemetry.io/collector/pdata v1.20.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0 h1:pUNfTzsI/JUTiE+DScDM4lsrPoxnVNLI2fbTxR/oapo= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0/go.mod h1:4aNcj6WM1n1uXyFSXlhVs4ibrERgNYsTbzcYI2zGhxA= +go.opentelemetry.io/collector/pdata/testdata v0.114.0 h1:+AzszWSL1i4K6meQ8rU0JDDW55SYCXa6FVqfDixhhTo= +go.opentelemetry.io/collector/pdata/testdata v0.114.0/go.mod h1:bv8XFdCTZxG2MQB5l9dKxSxf5zBrcodwO6JOy1+AxXM= +go.opentelemetry.io/collector/pipeline v0.114.0 h1:v3YOhc5z0tD6QbO5n/pnftpIeroihM2ks9Z2yKPCcwY= +go.opentelemetry.io/collector/pipeline v0.114.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= +go.opentelemetry.io/collector/receiver v0.114.0 h1:90SAnXAjNq7/k52/pFmmb06Cf1YauoPYtbio4aOXafY= +go.opentelemetry.io/collector/receiver v0.114.0/go.mod h1:KUGT0/D953LXbGH/D3lLPU8yrU3HfWnUqpt4W4hSOnE= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0 h1:ibhEfGpvNB3yrtpl2jYFabrunMk1hurxvMYpM0b1Ck4= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0/go.mod h1:UZyRfaasw+NLvN10AN8IQnmj5tQ3BOUH1uP2ctpO9f0= +go.opentelemetry.io/collector/receiver/receivertest v0.114.0 h1:D+Kh9t2n4asTnM+TiSxbrKlUemLZandWntj17BJWWb0= +go.opentelemetry.io/collector/receiver/receivertest v0.114.0/go.mod h1:mNSHQ13vFmqD+VAcRzLjStFBejbcWUn2Mp0pAd7Op+U= +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/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/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= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -109,8 +111,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ 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.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=