diff --git a/receiver/otlpreceiver/config.go b/receiver/otlpreceiver/config.go index 90a22dbcdc4..e231fe35791 100644 --- a/receiver/otlpreceiver/config.go +++ b/receiver/otlpreceiver/config.go @@ -21,7 +21,7 @@ const ( protoHTTP = "protocols::http" ) -type HttpServerSettings struct { +type HTTPServerSettings struct { *confighttp.HTTPServerSettings `mapstructure:",squash"` // The URL path to receive traces on. If omitted "/v1/traces" will be used. @@ -37,7 +37,7 @@ type HttpServerSettings struct { // Protocols is the configuration for the supported protocols. type Protocols struct { GRPC *configgrpc.GRPCServerSettings `mapstructure:"grpc"` - HTTP *HttpServerSettings `mapstructure:"http"` + HTTP *HTTPServerSettings `mapstructure:"http"` } // Config defines configuration for OTLP receiver. diff --git a/receiver/otlpreceiver/config_test.go b/receiver/otlpreceiver/config_test.go index 56ff8d9c82a..f205807d08b 100644 --- a/receiver/otlpreceiver/config_test.go +++ b/receiver/otlpreceiver/config_test.go @@ -115,7 +115,7 @@ func TestUnmarshalConfig(t *testing.T) { }, }, }, - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: "0.0.0.0:4318", TLSSetting: &configtls.TLSServerSetting{ @@ -154,7 +154,7 @@ func TestUnmarshalConfigUnix(t *testing.T) { }, ReadBufferSize: 512 * 1024, }, - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: "/tmp/http_otlp.sock", }, diff --git a/receiver/otlpreceiver/factory.go b/receiver/otlpreceiver/factory.go index d4f57ef59d3..165a200fb4a 100644 --- a/receiver/otlpreceiver/factory.go +++ b/receiver/otlpreceiver/factory.go @@ -48,7 +48,7 @@ func createDefaultConfig() component.Config { // We almost write 0 bytes, so no need to tune WriteBufferSize. ReadBufferSize: 512 * 1024, }, - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: defaultHTTPEndpoint, }, diff --git a/receiver/otlpreceiver/factory_test.go b/receiver/otlpreceiver/factory_test.go index 5a11acd2436..e0d77b28fda 100644 --- a/receiver/otlpreceiver/factory_test.go +++ b/receiver/otlpreceiver/factory_test.go @@ -51,7 +51,7 @@ func TestCreateTracesReceiver(t *testing.T) { Transport: "tcp", }, } - defaultHTTPSettings := &HttpServerSettings{ + defaultHTTPSettings := &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: testutil.GetAvailableLocalAddress(t), }, @@ -94,7 +94,7 @@ func TestCreateTracesReceiver(t *testing.T) { cfg: &Config{ Protocols: Protocols{ GRPC: defaultGRPCSettings, - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: "localhost:112233", }, @@ -132,7 +132,7 @@ func TestCreateMetricReceiver(t *testing.T) { Transport: "tcp", }, } - defaultHTTPSettings := &HttpServerSettings{ + defaultHTTPSettings := &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: testutil.GetAvailableLocalAddress(t), }, @@ -175,7 +175,7 @@ func TestCreateMetricReceiver(t *testing.T) { cfg: &Config{ Protocols: Protocols{ GRPC: defaultGRPCSettings, - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: "327.0.0.1:1122", }, @@ -212,7 +212,7 @@ func TestCreateLogReceiver(t *testing.T) { Transport: "tcp", }, } - defaultHTTPSettings := &HttpServerSettings{ + defaultHTTPSettings := &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: testutil.GetAvailableLocalAddress(t), }, @@ -259,7 +259,7 @@ func TestCreateLogReceiver(t *testing.T) { cfg: &Config{ Protocols: Protocols{ GRPC: defaultGRPCSettings, - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: "327.0.0.1:1122", }, @@ -275,7 +275,7 @@ func TestCreateLogReceiver(t *testing.T) { cfg: &Config{ Protocols: Protocols{ GRPC: defaultGRPCSettings, - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: "127.0.0.1:1122", }, diff --git a/receiver/otlpreceiver/otlp_test.go b/receiver/otlpreceiver/otlp_test.go index 5f58bfca0be..e699eb4b99c 100644 --- a/receiver/otlpreceiver/otlp_test.go +++ b/receiver/otlpreceiver/otlp_test.go @@ -201,7 +201,7 @@ func TestHandleInvalidRequests(t *testing.T) { endpoint := testutil.GetAvailableLocalAddress(t) cfg := &Config{ Protocols: Protocols{ - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: endpoint, }, @@ -900,7 +900,7 @@ func TestGRPCMaxRecvSize(t *testing.T) { func TestHTTPInvalidTLSCredentials(t *testing.T) { cfg := &Config{ Protocols: Protocols{ - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: testutil.GetAvailableLocalAddress(t), TLSSetting: &configtls.TLSServerSetting{ @@ -933,7 +933,7 @@ func testHTTPMaxRequestBodySizeJSON(t *testing.T, payload []byte, size int, expe url := fmt.Sprintf("http://%s/v1/traces", endpoint) cfg := &Config{ Protocols: Protocols{ - HTTP: &HttpServerSettings{ + HTTP: &HTTPServerSettings{ HTTPServerSettings: &confighttp.HTTPServerSettings{ Endpoint: endpoint, MaxRequestBodySize: int64(size),