diff --git a/.chloggen/collectd-http-server-settings-api.yaml b/.chloggen/collectd-http-server-settings-api.yaml new file mode 100644 index 000000000000..90baafb4e59c --- /dev/null +++ b/.chloggen/collectd-http-server-settings-api.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: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: collectdreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Move to use confighttp.HTTPServerSettings + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [28811] + +# (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: [api] diff --git a/.chloggen/collectd-http-server-settings.yaml b/.chloggen/collectd-http-server-settings.yaml new file mode 100644 index 000000000000..c08818af0315 --- /dev/null +++ b/.chloggen/collectd-http-server-settings.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: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: collectdreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add support of confighttp.HTTPServerSettings + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [28811] + +# (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: [] diff --git a/receiver/collectdreceiver/README.md b/receiver/collectdreceiver/README.md index a24b87fd51b6..688acc41f227 100644 --- a/receiver/collectdreceiver/README.md +++ b/receiver/collectdreceiver/README.md @@ -29,10 +29,12 @@ value `field[a=b, k=v]`, this receiver will extract `a` and `b` as label keys and, `k` and `v` as the respective label values. ## Configuration +The configuration includes the Opentelemetry collector's server [confighttp](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp#server-configuration), +which allows for a variety of settings. Only the most relevant ones will be discussed here, but all are available. The following settings are required: -- `endpoint` (default = `localhost:8081`): Address to reach the desired Docker daemon. +- `endpoint` (default = `localhost:8081`): Endpoint exposed by this receiver to send data. The following settings are optional: diff --git a/receiver/collectdreceiver/config.go b/receiver/collectdreceiver/config.go index bb62eeba702e..d1959ba94834 100644 --- a/receiver/collectdreceiver/config.go +++ b/receiver/collectdreceiver/config.go @@ -4,16 +4,29 @@ package collectdreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver" import ( + "fmt" + "strings" "time" - "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/confighttp" ) // Config defines configuration for Collectd receiver. type Config struct { - confignet.TCPAddr `mapstructure:",squash"` + confighttp.HTTPServerSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct + Timeout time.Duration `mapstructure:"timeout"` + Encoding string `mapstructure:"encoding"` + AttributesPrefix string `mapstructure:"attributes_prefix"` +} - Timeout time.Duration `mapstructure:"timeout"` - AttributesPrefix string `mapstructure:"attributes_prefix"` - Encoding string `mapstructure:"encoding"` +func (c *Config) Validate() error { + // CollectD receiver only supports JSON encoding. We expose a config option + // to make it explicit and obvious to the users. + if strings.ToLower(c.Encoding) != defaultEncodingFormat { + return fmt.Errorf( + "CollectD only support JSON encoding format. %s is not supported", + c.Encoding, + ) + } + return nil } diff --git a/receiver/collectdreceiver/config_test.go b/receiver/collectdreceiver/config_test.go index 4e67ab5a9a24..1e1af73fb53a 100644 --- a/receiver/collectdreceiver/config_test.go +++ b/receiver/collectdreceiver/config_test.go @@ -4,6 +4,7 @@ package collectdreceiver import ( + "errors" "path/filepath" "testing" "time" @@ -11,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/confmap/confmaptest" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver/internal/metadata" @@ -23,6 +24,7 @@ func TestLoadConfig(t *testing.T) { tests := []struct { id component.ID expected component.Config + wantErr error }{ { id: component.NewIDWithName(metadata.Type, ""), @@ -31,13 +33,14 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "one"), expected: &Config{ - TCPAddr: confignet.TCPAddr{ + HTTPServerSettings: confighttp.HTTPServerSettings{ Endpoint: "localhost:12345", }, - Timeout: time.Second * 50, + Timeout: 50 * time.Second, AttributesPrefix: "dap_", Encoding: "command", }, + wantErr: errors.New("CollectD only support JSON encoding format. command is not supported"), }, } @@ -53,7 +56,11 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) require.NoError(t, component.UnmarshalConfig(sub, cfg)) - assert.NoError(t, component.ValidateConfig(cfg)) + if tt.wantErr == nil { + assert.NoError(t, component.ValidateConfig(cfg)) + } else { + assert.Equal(t, tt.wantErr, component.ValidateConfig(cfg)) + } assert.Equal(t, tt.expected, cfg) }) } diff --git a/receiver/collectdreceiver/factory.go b/receiver/collectdreceiver/factory.go index b0a211997d39..b28891a8e4b7 100644 --- a/receiver/collectdreceiver/factory.go +++ b/receiver/collectdreceiver/factory.go @@ -5,12 +5,10 @@ package collectdreceiver // import "github.com/open-telemetry/opentelemetry-coll import ( "context" - "fmt" - "strings" "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" @@ -21,7 +19,6 @@ import ( const ( defaultBindEndpoint = "localhost:8081" - defaultTimeout = time.Second * 30 defaultEncodingFormat = "json" ) @@ -34,10 +31,10 @@ func NewFactory() receiver.Factory { } func createDefaultConfig() component.Config { return &Config{ - TCPAddr: confignet.TCPAddr{ + HTTPServerSettings: confighttp.HTTPServerSettings{ Endpoint: defaultBindEndpoint, }, - Timeout: defaultTimeout, + Timeout: 30 * time.Second, Encoding: defaultEncodingFormat, } } @@ -49,14 +46,5 @@ func createMetricsReceiver( nextConsumer consumer.Metrics, ) (receiver.Metrics, error) { c := cfg.(*Config) - c.Encoding = strings.ToLower(c.Encoding) - // CollectD receiver only supports JSON encoding. We expose a config option - // to make it explicit and obvious to the users. - if c.Encoding != defaultEncodingFormat { - return nil, fmt.Errorf( - "CollectD only support JSON encoding format. %s is not supported", - c.Encoding, - ) - } - return newCollectdReceiver(cs.Logger, c.Endpoint, c.Timeout, c.AttributesPrefix, nextConsumer, cs) + return newCollectdReceiver(cs.Logger, c, c.AttributesPrefix, nextConsumer, cs) } diff --git a/receiver/collectdreceiver/go.mod b/receiver/collectdreceiver/go.mod index 7d89ec45fd8a..294752cc8312 100644 --- a/receiver/collectdreceiver/go.mod +++ b/receiver/collectdreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.88.0 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.88.1-0.20231026220224-6405e152a2d9 - go.opentelemetry.io/collector/config/confignet v0.88.1-0.20231026220224-6405e152a2d9 + go.opentelemetry.io/collector/config/confighttp v0.88.1-0.20231026220224-6405e152a2d9 go.opentelemetry.io/collector/confmap v0.88.1-0.20231026220224-6405e152a2d9 go.opentelemetry.io/collector/consumer v0.88.1-0.20231026220224-6405e152a2d9 go.opentelemetry.io/collector/pdata v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 @@ -19,9 +19,15 @@ require ( require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.2 // 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.0.1 // indirect @@ -32,10 +38,19 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.88.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rs/cors v1.10.1 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configauth v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configcompression v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configopaque v0.88.1-0.20231026220224-6405e152a2d9 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configtls v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/internal v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/extension v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/extension/auth v0.88.1-0.20231026220224-6405e152a2d9 // indirect go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect go.opentelemetry.io/otel v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect diff --git a/receiver/collectdreceiver/go.sum b/receiver/collectdreceiver/go.sum index 5a4a2b216e2e..a8a8917a7e1e 100644 --- a/receiver/collectdreceiver/go.sum +++ b/receiver/collectdreceiver/go.sum @@ -14,10 +14,17 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -36,6 +43,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -50,6 +59,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= 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= @@ -79,6 +90,8 @@ github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lne github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -96,20 +109,36 @@ go.opentelemetry.io/collector v0.88.1-0.20231026220224-6405e152a2d9 h1:UIbHSFtHl go.opentelemetry.io/collector v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:5iWdJH9WM+Bp+t3Ii72ppPmeZ0B2vci07ApE+0fRGKs= go.opentelemetry.io/collector/component v0.88.1-0.20231026220224-6405e152a2d9 h1:t9GCaQDZ1MDBjEAC1Y7NvwiqvVppK6ckAfrUEAlFioA= go.opentelemetry.io/collector/component v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:4utKxz4Lilym3SPxNXJHosdaTjT1aQxI+TCmnJO54pU= -go.opentelemetry.io/collector/config/confignet v0.88.1-0.20231026220224-6405e152a2d9 h1:NPTJUR2N2d0XfRgkuxLJk3TzoaIaeXsC6eynZXDkC9w= -go.opentelemetry.io/collector/config/confignet v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= +go.opentelemetry.io/collector/config/configauth v0.88.1-0.20231026220224-6405e152a2d9 h1:/miLBOHQlxspauNzKacbukT861aW8vgkG6DYjc6i7YA= +go.opentelemetry.io/collector/config/configauth v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:iMPoqAeGB9UScF/sugPF8xcuctlhx8jFK2jAmzDn/1E= +go.opentelemetry.io/collector/config/configcompression v0.88.1-0.20231026220224-6405e152a2d9 h1:5cqU6jeFGjqSrL5RsDSxrQe7vTIICeyoxATY1J4mUvc= +go.opentelemetry.io/collector/config/configcompression v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= +go.opentelemetry.io/collector/config/confighttp v0.88.1-0.20231026220224-6405e152a2d9 h1:jEEupxkBYPlKo4uA/9s7mrN9d2iZQ5hTPIQpOelxaiw= +go.opentelemetry.io/collector/config/confighttp v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:bmzLcdPexlRvI7a+56eGqZOWhMYAMf+F0h+HLzrpv6w= +go.opentelemetry.io/collector/config/configopaque v0.88.1-0.20231026220224-6405e152a2d9 h1:YwkklGD3FSAp9QAmkFwzjRLxYKdTGp61s0ZuIpFQSyM= +go.opentelemetry.io/collector/config/configopaque v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= go.opentelemetry.io/collector/config/configtelemetry v0.88.1-0.20231026220224-6405e152a2d9 h1:4WPy3qE1lJE1LZE7t1kAj1XSZN85w68JknZO5Uo00vw= go.opentelemetry.io/collector/config/configtelemetry v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= +go.opentelemetry.io/collector/config/configtls v0.88.1-0.20231026220224-6405e152a2d9 h1:Ez4mdgLXvdusZGu7I4+X2hiXCQP69aAB0LWERwosJmE= +go.opentelemetry.io/collector/config/configtls v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:i8X3Zj6ICyTbtIOZrDzgXFkFVGKjFtM6/82SMOXbYHc= +go.opentelemetry.io/collector/config/internal v0.88.1-0.20231026220224-6405e152a2d9 h1:11WTkBuGy3QCRXQA6oy9ZJn+wBSEfZ7USnKVTPy9yCY= +go.opentelemetry.io/collector/config/internal v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= go.opentelemetry.io/collector/confmap v0.88.1-0.20231026220224-6405e152a2d9 h1:JKFChlNpigR1Q4hZUjDU2sB2VuQ+RigAh7oOQfdcaiQ= go.opentelemetry.io/collector/confmap v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:CSJlMk1KRZloXAygpiPeCLpuQiLVDEZYbGsGHIKHeUg= go.opentelemetry.io/collector/consumer v0.88.1-0.20231026220224-6405e152a2d9 h1:xiosDLoF99krBlBdiZvw22CSCYU0picQMKskzjaIU8I= go.opentelemetry.io/collector/consumer v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:VVoafgyhjpO6fuJu12GqspmuLrn91JCOou0sOtb9GOg= +go.opentelemetry.io/collector/extension v0.88.1-0.20231026220224-6405e152a2d9 h1:6lnGLRgbuTQR7sR1xRqTfJMX2UNkOKbqVAwJDzobvGY= +go.opentelemetry.io/collector/extension v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:5wPlOyWtVJcZS9CMhFUnuRvNQ0XIoV/iUSaZWtCjoHA= +go.opentelemetry.io/collector/extension/auth v0.88.1-0.20231026220224-6405e152a2d9 h1:YFN6/C9HLfY/k0OyHUdF7jInwBZT+C9O9FNfQTxNHoY= +go.opentelemetry.io/collector/extension/auth v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:IcwiPhj6ZGTaZ7WVRVvl97uyw9NShsVqcTRLtXddpK0= go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 h1:luvDPu+FNy6LIylBOO8PH/ca6ym7JKAdMe1J1aJbsF4= go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9/go.mod h1:fLmJMf1AoHttkF8p5oJAc4o5ZpHu8yO5XYJ7gbLCLzo= go.opentelemetry.io/collector/pdata v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 h1:TVYPzf0ZwFDTSoQ6gPk4lpQgVK4g43cWYuo710E0RHI= go.opentelemetry.io/collector/pdata v1.0.0-rcv0017.0.20231026220224-6405e152a2d9/go.mod h1:Rv9fOclA5AtM/JGm0d4jBOIAo1+jBA13UT5Bx0ovXi4= go.opentelemetry.io/collector/receiver v0.88.1-0.20231026220224-6405e152a2d9 h1:h+1btMM+rRpZsCnR2vFmvmczeQxKhVwEohV8urOvZho= go.opentelemetry.io/collector/receiver v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:3lhOi7CWMwiiolm6d579ZX+pIVwKPCRP+7ScontYOuI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/prometheus v0.42.0 h1:jwV9iQdvp38fxXi8ZC+lNpxjK16MRcZlpDYvbuO1FiA= diff --git a/receiver/collectdreceiver/receiver.go b/receiver/collectdreceiver/receiver.go index 225d5bc30633..977292f4d217 100644 --- a/receiver/collectdreceiver/receiver.go +++ b/receiver/collectdreceiver/receiver.go @@ -7,11 +7,9 @@ import ( "context" "encoding/json" "errors" - "fmt" "io" "net/http" "strings" - "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" @@ -28,53 +26,59 @@ var _ receiver.Metrics = (*collectdReceiver)(nil) // collectdReceiver implements the receiver.Metrics for CollectD protocol. type collectdReceiver struct { logger *zap.Logger - addr string server *http.Server defaultAttrsPrefix string nextConsumer consumer.Metrics obsrecv *receiverhelper.ObsReport + createSettings receiver.CreateSettings + config *Config } // newCollectdReceiver creates the CollectD receiver with the given parameters. func newCollectdReceiver( logger *zap.Logger, - addr string, - timeout time.Duration, + cfg *Config, defaultAttrsPrefix string, nextConsumer consumer.Metrics, createSettings receiver.CreateSettings) (receiver.Metrics, error) { if nextConsumer == nil { return nil, component.ErrNilNextConsumer } - obsrecv, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ - ReceiverID: createSettings.ID, - Transport: "http", - ReceiverCreateSettings: createSettings, - }) - if err != nil { - return nil, err - } + r := &collectdReceiver{ logger: logger, - addr: addr, nextConsumer: nextConsumer, defaultAttrsPrefix: defaultAttrsPrefix, - obsrecv: obsrecv, - } - r.server = &http.Server{ - Addr: addr, - Handler: r, - ReadTimeout: timeout, - WriteTimeout: timeout, + config: cfg, + createSettings: createSettings, } - return r, err + return r, nil } // Start starts an HTTP server that can process CollectD JSON requests. func (cdr *collectdReceiver) Start(_ context.Context, host component.Host) error { + var err error + cdr.server, err = cdr.config.HTTPServerSettings.ToServer(host, cdr.createSettings.TelemetrySettings, cdr) + if err != nil { + return err + } + cdr.server.ReadTimeout = cdr.config.Timeout + cdr.server.WriteTimeout = cdr.config.Timeout + cdr.obsrecv, err = receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ + ReceiverID: cdr.createSettings.ID, + Transport: "http", + ReceiverCreateSettings: cdr.createSettings, + }) + if err != nil { + return err + } + l, err := cdr.config.HTTPServerSettings.ToListener() + if err != nil { + return err + } go func() { - if err := cdr.server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) && err != nil { - host.ReportFatalError(fmt.Errorf("error starting collectd receiver: %w", err)) + if err := cdr.server.Serve(l); !errors.Is(err, http.ErrServerClosed) && err != nil { + _ = cdr.createSettings.TelemetrySettings.ReportComponentStatus(component.NewFatalErrorEvent(err)) } }() return nil @@ -82,6 +86,9 @@ func (cdr *collectdReceiver) Start(_ context.Context, host component.Host) error // Shutdown stops the CollectD receiver. func (cdr *collectdReceiver) Shutdown(context.Context) error { + if cdr.server == nil { + return nil + } return cdr.server.Shutdown(context.Background()) } diff --git a/receiver/collectdreceiver/receiver_test.go b/receiver/collectdreceiver/receiver_test.go index f03d7149a3cb..69a87f82380c 100644 --- a/receiver/collectdreceiver/receiver_test.go +++ b/receiver/collectdreceiver/receiver_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/pcommon" @@ -33,8 +34,7 @@ type wantedBody struct { func TestNewReceiver(t *testing.T) { type args struct { - addr string - timeout time.Duration + config *Config attrsPrefix string nextConsumer consumer.Metrics } @@ -46,8 +46,11 @@ func TestNewReceiver(t *testing.T) { { name: "nil next Consumer", args: args{ - addr: ":0", - timeout: defaultTimeout, + config: &Config{ + HTTPServerSettings: confighttp.HTTPServerSettings{ + Endpoint: ":0", + }, + }, attrsPrefix: "default_attr_", }, wantErr: component.ErrNilNextConsumer, @@ -55,8 +58,11 @@ func TestNewReceiver(t *testing.T) { { name: "happy path", args: args{ - addr: ":0", - timeout: defaultTimeout, + config: &Config{ + HTTPServerSettings: confighttp.HTTPServerSettings{ + Endpoint: ":0", + }, + }, attrsPrefix: "default_attr_", nextConsumer: consumertest.NewNop(), }, @@ -65,7 +71,7 @@ func TestNewReceiver(t *testing.T) { logger := zap.NewNop() for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - _, err := newCollectdReceiver(logger, tt.args.addr, time.Second*10, "", tt.args.nextConsumer, receivertest.NewNopCreateSettings()) + _, err := newCollectdReceiver(logger, tt.args.config, "", tt.args.nextConsumer, receivertest.NewNopCreateSettings()) require.ErrorIs(t, err, tt.wantErr) }) } @@ -82,7 +88,11 @@ func TestCollectDServer(t *testing.T) { WantData []pmetric.Metrics } - var endpoint = "localhost:8081" + config := &Config{ + HTTPServerSettings: confighttp.HTTPServerSettings{ + Endpoint: "localhost:8081", + }, + } defaultAttrsPrefix := "dap_" wantedRequestBody := wantedBody{ @@ -148,18 +158,18 @@ func TestCollectDServer(t *testing.T) { sink := new(consumertest.MetricsSink) logger := zap.NewNop() - cdr, err := newCollectdReceiver(logger, endpoint, defaultTimeout, defaultAttrsPrefix, sink, receivertest.NewNopCreateSettings()) + cdr, err := newCollectdReceiver(logger, config, defaultAttrsPrefix, sink, receivertest.NewNopCreateSettings()) if err != nil { t.Fatalf("Failed to create receiver: %v", err) } require.NoError(t, cdr.Start(context.Background(), componenttest.NewNopHost())) - defer func() { + t.Cleanup(func() { err := cdr.Shutdown(context.Background()) if err != nil { t.Fatalf("Error stopping metrics reception: %v", err) } - }() + }) time.Sleep(time.Second) @@ -168,7 +178,7 @@ func TestCollectDServer(t *testing.T) { sink.Reset() req, err := http.NewRequest( tt.HTTPMethod, - "http://"+endpoint+"?"+tt.QueryParams, + "http://"+config.HTTPServerSettings.Endpoint+"?"+tt.QueryParams, bytes.NewBuffer([]byte(tt.RequestBody)), ) require.NoError(t, err) diff --git a/receiver/wavefrontreceiver/go.mod b/receiver/wavefrontreceiver/go.mod index 4be42d5ae5ab..a5c2d168183a 100644 --- a/receiver/wavefrontreceiver/go.mod +++ b/receiver/wavefrontreceiver/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.88.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.88.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.88.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.88.1-0.20231026220224-6405e152a2d9 go.opentelemetry.io/collector/config/confignet v0.88.1-0.20231026220224-6405e152a2d9 @@ -17,10 +17,16 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.2 // 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.0.1 // indirect @@ -30,10 +36,20 @@ require ( 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/rs/cors v1.10.1 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configauth v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configcompression v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/confighttp v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configopaque v0.88.1-0.20231026220224-6405e152a2d9 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/configtls v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/config/internal v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/extension v0.88.1-0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/collector/extension/auth v0.88.1-0.20231026220224-6405e152a2d9 // indirect go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect go.opentelemetry.io/otel v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect diff --git a/receiver/wavefrontreceiver/go.sum b/receiver/wavefrontreceiver/go.sum index 7f44f4b6320a..98eeb3fc0e1c 100644 --- a/receiver/wavefrontreceiver/go.sum +++ b/receiver/wavefrontreceiver/go.sum @@ -13,10 +13,17 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -36,6 +43,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -50,6 +59,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= 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= @@ -79,6 +90,8 @@ github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lne github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -96,20 +109,38 @@ go.opentelemetry.io/collector v0.88.1-0.20231026220224-6405e152a2d9 h1:UIbHSFtHl go.opentelemetry.io/collector v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:5iWdJH9WM+Bp+t3Ii72ppPmeZ0B2vci07ApE+0fRGKs= go.opentelemetry.io/collector/component v0.88.1-0.20231026220224-6405e152a2d9 h1:t9GCaQDZ1MDBjEAC1Y7NvwiqvVppK6ckAfrUEAlFioA= go.opentelemetry.io/collector/component v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:4utKxz4Lilym3SPxNXJHosdaTjT1aQxI+TCmnJO54pU= +go.opentelemetry.io/collector/config/configauth v0.88.1-0.20231026220224-6405e152a2d9 h1:/miLBOHQlxspauNzKacbukT861aW8vgkG6DYjc6i7YA= +go.opentelemetry.io/collector/config/configauth v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:iMPoqAeGB9UScF/sugPF8xcuctlhx8jFK2jAmzDn/1E= +go.opentelemetry.io/collector/config/configcompression v0.88.1-0.20231026220224-6405e152a2d9 h1:5cqU6jeFGjqSrL5RsDSxrQe7vTIICeyoxATY1J4mUvc= +go.opentelemetry.io/collector/config/configcompression v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= +go.opentelemetry.io/collector/config/confighttp v0.88.1-0.20231026220224-6405e152a2d9 h1:jEEupxkBYPlKo4uA/9s7mrN9d2iZQ5hTPIQpOelxaiw= +go.opentelemetry.io/collector/config/confighttp v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:bmzLcdPexlRvI7a+56eGqZOWhMYAMf+F0h+HLzrpv6w= go.opentelemetry.io/collector/config/confignet v0.88.1-0.20231026220224-6405e152a2d9 h1:NPTJUR2N2d0XfRgkuxLJk3TzoaIaeXsC6eynZXDkC9w= go.opentelemetry.io/collector/config/confignet v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= +go.opentelemetry.io/collector/config/configopaque v0.88.1-0.20231026220224-6405e152a2d9 h1:YwkklGD3FSAp9QAmkFwzjRLxYKdTGp61s0ZuIpFQSyM= +go.opentelemetry.io/collector/config/configopaque v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= go.opentelemetry.io/collector/config/configtelemetry v0.88.1-0.20231026220224-6405e152a2d9 h1:4WPy3qE1lJE1LZE7t1kAj1XSZN85w68JknZO5Uo00vw= go.opentelemetry.io/collector/config/configtelemetry v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= +go.opentelemetry.io/collector/config/configtls v0.88.1-0.20231026220224-6405e152a2d9 h1:Ez4mdgLXvdusZGu7I4+X2hiXCQP69aAB0LWERwosJmE= +go.opentelemetry.io/collector/config/configtls v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:i8X3Zj6ICyTbtIOZrDzgXFkFVGKjFtM6/82SMOXbYHc= +go.opentelemetry.io/collector/config/internal v0.88.1-0.20231026220224-6405e152a2d9 h1:11WTkBuGy3QCRXQA6oy9ZJn+wBSEfZ7USnKVTPy9yCY= +go.opentelemetry.io/collector/config/internal v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= go.opentelemetry.io/collector/confmap v0.88.1-0.20231026220224-6405e152a2d9 h1:JKFChlNpigR1Q4hZUjDU2sB2VuQ+RigAh7oOQfdcaiQ= go.opentelemetry.io/collector/confmap v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:CSJlMk1KRZloXAygpiPeCLpuQiLVDEZYbGsGHIKHeUg= go.opentelemetry.io/collector/consumer v0.88.1-0.20231026220224-6405e152a2d9 h1:xiosDLoF99krBlBdiZvw22CSCYU0picQMKskzjaIU8I= go.opentelemetry.io/collector/consumer v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:VVoafgyhjpO6fuJu12GqspmuLrn91JCOou0sOtb9GOg= +go.opentelemetry.io/collector/extension v0.88.1-0.20231026220224-6405e152a2d9 h1:6lnGLRgbuTQR7sR1xRqTfJMX2UNkOKbqVAwJDzobvGY= +go.opentelemetry.io/collector/extension v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:5wPlOyWtVJcZS9CMhFUnuRvNQ0XIoV/iUSaZWtCjoHA= +go.opentelemetry.io/collector/extension/auth v0.88.1-0.20231026220224-6405e152a2d9 h1:YFN6/C9HLfY/k0OyHUdF7jInwBZT+C9O9FNfQTxNHoY= +go.opentelemetry.io/collector/extension/auth v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:IcwiPhj6ZGTaZ7WVRVvl97uyw9NShsVqcTRLtXddpK0= go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 h1:luvDPu+FNy6LIylBOO8PH/ca6ym7JKAdMe1J1aJbsF4= go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9/go.mod h1:fLmJMf1AoHttkF8p5oJAc4o5ZpHu8yO5XYJ7gbLCLzo= go.opentelemetry.io/collector/pdata v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 h1:TVYPzf0ZwFDTSoQ6gPk4lpQgVK4g43cWYuo710E0RHI= go.opentelemetry.io/collector/pdata v1.0.0-rcv0017.0.20231026220224-6405e152a2d9/go.mod h1:Rv9fOclA5AtM/JGm0d4jBOIAo1+jBA13UT5Bx0ovXi4= go.opentelemetry.io/collector/receiver v0.88.1-0.20231026220224-6405e152a2d9 h1:h+1btMM+rRpZsCnR2vFmvmczeQxKhVwEohV8urOvZho= go.opentelemetry.io/collector/receiver v0.88.1-0.20231026220224-6405e152a2d9/go.mod h1:3lhOi7CWMwiiolm6d579ZX+pIVwKPCRP+7ScontYOuI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/prometheus v0.42.0 h1:jwV9iQdvp38fxXi8ZC+lNpxjK16MRcZlpDYvbuO1FiA=