From 853fcdc64fe2458194abc3e506f470020610fb22 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Wed, 19 Jun 2024 17:29:12 +0200 Subject: [PATCH 1/4] [all] Promote `component.UseLocalHostAsDefaultHost` feature gate to beta --- .chloggen/mx-psi_localhost-fg.yaml | 44 +++++++++++++++++++ extension/awsproxy/factory_test.go | 2 +- .../healthcheckextension/factory_test.go | 2 +- extension/jaegerremotesampling/config_test.go | 8 ++-- .../jaegerremotesampling/factory_test.go | 4 +- internal/common/localhostgate/featuregate.go | 6 +-- processor/remotetapprocessor/config_test.go | 2 +- receiver/awsxrayreceiver/config_test.go | 4 +- receiver/jaegerreceiver/config_test.go | 10 ++--- receiver/jaegerreceiver/factory_test.go | 2 +- receiver/k8sobjectsreceiver/e2e_test.go | 1 + receiver/lokireceiver/config_test.go | 4 +- receiver/opencensusreceiver/config_test.go | 8 ++-- receiver/sapmreceiver/config_test.go | 4 +- receiver/signalfxreceiver/config_test.go | 2 +- receiver/skywalkingreceiver/config_test.go | 18 ++++++-- receiver/splunkhecreceiver/config_test.go | 2 +- receiver/zipkinreceiver/factory.go | 2 +- receiver/zookeeperreceiver/factory_test.go | 2 +- 19 files changed, 92 insertions(+), 35 deletions(-) create mode 100644 .chloggen/mx-psi_localhost-fg.yaml diff --git a/.chloggen/mx-psi_localhost-fg.yaml b/.chloggen/mx-psi_localhost-fg.yaml new file mode 100644 index 000000000000..e4c79862c43b --- /dev/null +++ b/.chloggen/mx-psi_localhost-fg.yaml @@ -0,0 +1,44 @@ +# 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: all + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Promote `component.UseLocalHostAsDefaultHost` feature gate to beta. This changes default endpoints from 0.0.0.0 to localhost" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [30702] + +# (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: | + This change affects the following components: + - extension/awsproxy + - extension/health_check + - extension/jaegerremotesampling + - internal/aws/proxy + - processor/remotetap + - receiver/awsfirehose + - receiver/awsxray + - receiver/influxdb + - receiver/jaeger + - receiver/loki + - receiver/opencensus + - receiver/sapm + - receiver/signalfx + - receiver/skywalking + - receiver/splunk_hec + - receiver/zipkin + - receiver/zookeeper + +# 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/extension/awsproxy/factory_test.go b/extension/awsproxy/factory_test.go index c919b2ffd268..e2f57d0fd797 100644 --- a/extension/awsproxy/factory_test.go +++ b/extension/awsproxy/factory_test.go @@ -28,7 +28,7 @@ func TestFactory_CreateDefaultConfig(t *testing.T) { assert.Equal(t, &Config{ ProxyConfig: proxy.Config{ TCPAddrConfig: confignet.TCPAddrConfig{ - Endpoint: "0.0.0.0:2000", + Endpoint: "localhost:2000", }, }, }, cfg) diff --git a/extension/healthcheckextension/factory_test.go b/extension/healthcheckextension/factory_test.go index 8e35f2bbc251..2397dda4d3d6 100644 --- a/extension/healthcheckextension/factory_test.go +++ b/extension/healthcheckextension/factory_test.go @@ -20,7 +20,7 @@ func TestFactory_CreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig() assert.Equal(t, &Config{ ServerConfig: confighttp.ServerConfig{ - Endpoint: "0.0.0.0:13133", + Endpoint: "localhost:13133", }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), Path: "/", diff --git a/extension/jaegerremotesampling/config_test.go b/extension/jaegerremotesampling/config_test.go index 4dcd99f27e18..05704929d5e0 100644 --- a/extension/jaegerremotesampling/config_test.go +++ b/extension/jaegerremotesampling/config_test.go @@ -29,9 +29,9 @@ func TestLoadConfig(t *testing.T) { { id: component.NewID(metadata.Type), expected: &Config{ - HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "0.0.0.0:5778"}, + HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "localhost:5778"}, GRPCServerConfig: &configgrpc.ServerConfig{NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:14250", + Endpoint: "localhost:14250", Transport: confignet.TransportTypeTCP, }}, Source: Source{ @@ -44,9 +44,9 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "1"), expected: &Config{ - HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "0.0.0.0:5778"}, + HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "localhost:5778"}, GRPCServerConfig: &configgrpc.ServerConfig{NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:14250", + Endpoint: "localhost:14250", Transport: confignet.TransportTypeTCP, }}, Source: Source{ diff --git a/extension/jaegerremotesampling/factory_test.go b/extension/jaegerremotesampling/factory_test.go index 09d7588e3097..fe59c3a677c2 100644 --- a/extension/jaegerremotesampling/factory_test.go +++ b/extension/jaegerremotesampling/factory_test.go @@ -18,9 +18,9 @@ import ( func TestCreateDefaultConfig(t *testing.T) { // prepare and test expected := &Config{ - HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "0.0.0.0:5778"}, + HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "localhost:5778"}, GRPCServerConfig: &configgrpc.ServerConfig{NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:14250", + Endpoint: "localhost:14250", Transport: confignet.TransportTypeTCP, }}, } diff --git a/internal/common/localhostgate/featuregate.go b/internal/common/localhostgate/featuregate.go index 238d909f0b63..9d74c396e857 100644 --- a/internal/common/localhostgate/featuregate.go +++ b/internal/common/localhostgate/featuregate.go @@ -23,7 +23,7 @@ const UseLocalHostAsDefaultHostID = "component.UseLocalHostAsDefaultHost" var UseLocalHostAsDefaultHostfeatureGate = mustRegisterOrLoad( featuregate.GlobalRegistry(), UseLocalHostAsDefaultHostID, - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints"), ) @@ -60,8 +60,8 @@ func EndpointForPort(port int) string { // LogAboutUseLocalHostAsDefault logs about the upcoming change from 0.0.0.0 to localhost on server-like components. func LogAboutUseLocalHostAsDefault(logger *zap.Logger) { if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { - logger.Warn( - "The default endpoints for all servers in components will change to use localhost instead of 0.0.0.0 in a future version. Use the feature gate to preview the new default.", + logger.Info( + "The default endpoints for all servers in components have changed to use localhost instead of 0.0.0.0. Use the feature gate to temporarily revert to the previous default.", zap.String("feature gate ID", UseLocalHostAsDefaultHostID), ) } diff --git a/processor/remotetapprocessor/config_test.go b/processor/remotetapprocessor/config_test.go index c941c9402636..8c8e2633c7fb 100644 --- a/processor/remotetapprocessor/config_test.go +++ b/processor/remotetapprocessor/config_test.go @@ -11,6 +11,6 @@ import ( func TestCreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig().(*Config) - assert.Equal(t, "0.0.0.0:12001", cfg.Endpoint) + assert.Equal(t, "localhost:12001", cfg.Endpoint) assert.EqualValues(t, 1, cfg.Limit) } diff --git a/receiver/awsxrayreceiver/config_test.go b/receiver/awsxrayreceiver/config_test.go index 8f49ac4b8fc3..b41b152b112a 100644 --- a/receiver/awsxrayreceiver/config_test.go +++ b/receiver/awsxrayreceiver/config_test.go @@ -41,7 +41,7 @@ func TestLoadConfig(t *testing.T) { }, ProxyServer: &proxy.Config{ TCPAddrConfig: confignet.TCPAddrConfig{ - Endpoint: "0.0.0.0:2000", + Endpoint: "localhost:2000", }, ProxyAddress: "", TLSSetting: configtls.ClientConfig{ @@ -59,7 +59,7 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "proxy_server"), expected: &Config{ AddrConfig: confignet.AddrConfig{ - Endpoint: "0.0.0.0:2000", + Endpoint: "localhost:2000", Transport: confignet.TransportTypeUDP, }, ProxyServer: &proxy.Config{ diff --git a/receiver/jaegerreceiver/config_test.go b/receiver/jaegerreceiver/config_test.go index 8fddeaf4b7a4..dfe6dfdc36cc 100644 --- a/receiver/jaegerreceiver/config_test.go +++ b/receiver/jaegerreceiver/config_test.go @@ -69,19 +69,19 @@ func TestLoadConfig(t *testing.T) { Protocols: Protocols{ GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:14250", + Endpoint: "localhost:14250", Transport: confignet.TransportTypeTCP, }, }, ThriftHTTP: &confighttp.ServerConfig{ - Endpoint: "0.0.0.0:14268", + Endpoint: "localhost:14268", }, ThriftCompact: &ProtocolUDP{ - Endpoint: "0.0.0.0:6831", + Endpoint: "localhost:6831", ServerConfigUDP: defaultServerConfigUDP(), }, ThriftBinary: &ProtocolUDP{ - Endpoint: "0.0.0.0:6832", + Endpoint: "localhost:6832", ServerConfigUDP: defaultServerConfigUDP(), }, }, @@ -98,7 +98,7 @@ func TestLoadConfig(t *testing.T) { }, }, ThriftCompact: &ProtocolUDP{ - Endpoint: "0.0.0.0:6831", + Endpoint: "localhost:6831", ServerConfigUDP: defaultServerConfigUDP(), }, }, diff --git a/receiver/jaegerreceiver/factory_test.go b/receiver/jaegerreceiver/factory_test.go index 50662e6811ae..cb91a5d09c06 100644 --- a/receiver/jaegerreceiver/factory_test.go +++ b/receiver/jaegerreceiver/factory_test.go @@ -143,7 +143,7 @@ func TestCreateInvalidHTTPEndpoint(t *testing.T) { r, err := factory.CreateTracesReceiver(context.Background(), set, cfg, nil) assert.NoError(t, err, "unexpected error creating receiver") - assert.Equal(t, "0.0.0.0:14268", r.(*jReceiver).config.HTTPServerConfig.Endpoint, "http port should be default") + assert.Equal(t, "localhost:14268", r.(*jReceiver).config.HTTPServerConfig.Endpoint, "http port should be default") } func TestCreateInvalidThriftBinaryEndpoint(t *testing.T) { diff --git a/receiver/k8sobjectsreceiver/e2e_test.go b/receiver/k8sobjectsreceiver/e2e_test.go index 4af2cb1e9c21..4848e96449fa 100644 --- a/receiver/k8sobjectsreceiver/e2e_test.go +++ b/receiver/k8sobjectsreceiver/e2e_test.go @@ -49,6 +49,7 @@ func TestE2E(t *testing.T) { f := otlpreceiver.NewFactory() cfg := f.CreateDefaultConfig().(*otlpreceiver.Config) cfg.HTTP = nil + cfg.GRPC.NetAddr.Endpoint = "0.0.0.0:4317" logsConsumer := new(consumertest.LogsSink) rcvr, err := f.CreateLogsReceiver(context.Background(), receivertest.NewNopSettings(), cfg, logsConsumer) require.NoError(t, rcvr.Start(context.Background(), componenttest.NewNopHost())) diff --git a/receiver/lokireceiver/config_test.go b/receiver/lokireceiver/config_test.go index 699d1182fafd..3524c41e607f 100644 --- a/receiver/lokireceiver/config_test.go +++ b/receiver/lokireceiver/config_test.go @@ -34,12 +34,12 @@ func TestLoadConfig(t *testing.T) { Protocols: Protocols{ GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:3600", + Endpoint: "localhost:3600", Transport: confignet.TransportTypeTCP, }, }, HTTP: &confighttp.ServerConfig{ - Endpoint: "0.0.0.0:3500", + Endpoint: "localhost:3500", }, }, }, diff --git a/receiver/opencensusreceiver/config_test.go b/receiver/opencensusreceiver/config_test.go index 8929c80e42fe..330bfbc5a9bb 100644 --- a/receiver/opencensusreceiver/config_test.go +++ b/receiver/opencensusreceiver/config_test.go @@ -46,7 +46,7 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ ServerConfig: configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:55678", + Endpoint: "localhost:55678", Transport: confignet.TransportTypeTCP, }, ReadBufferSize: 512 * 1024, @@ -71,7 +71,7 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ ServerConfig: configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:55678", + Endpoint: "localhost:55678", Transport: confignet.TransportTypeTCP, }, MaxRecvMsgSizeMiB: 32, @@ -91,7 +91,7 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ ServerConfig: configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:55678", + Endpoint: "localhost:55678", Transport: confignet.TransportTypeTCP, }, ReadBufferSize: 512 * 1024, @@ -109,7 +109,7 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ ServerConfig: configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:55678", + Endpoint: "localhost:55678", Transport: confignet.TransportTypeTCP, }, ReadBufferSize: 512 * 1024, diff --git a/receiver/sapmreceiver/config_test.go b/receiver/sapmreceiver/config_test.go index 5062c81fde6a..42d1f562b5f0 100644 --- a/receiver/sapmreceiver/config_test.go +++ b/receiver/sapmreceiver/config_test.go @@ -44,7 +44,7 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "tls"), expected: &Config{ ServerConfig: confighttp.ServerConfig{ - Endpoint: "0.0.0.0:7276", + Endpoint: "localhost:7276", TLSSetting: &configtls.ServerConfig{ Config: configtls.Config{ CertFile: "/test.crt", @@ -58,7 +58,7 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "passthrough"), expected: &Config{ ServerConfig: confighttp.ServerConfig{ - Endpoint: "0.0.0.0:7276", + Endpoint: "localhost:7276", }, AccessTokenPassthroughConfig: splunk.AccessTokenPassthroughConfig{ AccessTokenPassthrough: true, diff --git a/receiver/signalfxreceiver/config_test.go b/receiver/signalfxreceiver/config_test.go index fe16f538cf3a..6254aa5a3640 100644 --- a/receiver/signalfxreceiver/config_test.go +++ b/receiver/signalfxreceiver/config_test.go @@ -47,7 +47,7 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "tls"), expected: &Config{ ServerConfig: confighttp.ServerConfig{ - Endpoint: "0.0.0.0:9943", + Endpoint: "localhost:9943", TLSSetting: &configtls.ServerConfig{ Config: configtls.Config{ CertFile: "/test.crt", diff --git a/receiver/skywalkingreceiver/config_test.go b/receiver/skywalkingreceiver/config_test.go index b9738b1c2230..a57c166c2385 100644 --- a/receiver/skywalkingreceiver/config_test.go +++ b/receiver/skywalkingreceiver/config_test.go @@ -29,8 +29,20 @@ func TestLoadConfig(t *testing.T) { expected component.Config }{ { - id: component.NewIDWithName(metadata.Type, ""), - expected: createDefaultConfig(), + id: component.NewIDWithName(metadata.Type, ""), + expected: &Config{ + Protocols: Protocols{ + HTTP: &confighttp.ServerConfig{ + Endpoint: "0.0.0.0:12800", + }, + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ + Endpoint: "0.0.0.0:11800", + Transport: confignet.TransportTypeTCP, + }, + }, + }, + }, }, { id: component.NewIDWithName(metadata.Type, "customname"), @@ -48,7 +60,7 @@ func TestLoadConfig(t *testing.T) { Protocols: Protocols{ GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:11800", + Endpoint: "localhost:11800", Transport: confignet.TransportTypeTCP, }, }, diff --git a/receiver/splunkhecreceiver/config_test.go b/receiver/splunkhecreceiver/config_test.go index 4e93675835df..0d6ce134c869 100644 --- a/receiver/splunkhecreceiver/config_test.go +++ b/receiver/splunkhecreceiver/config_test.go @@ -57,7 +57,7 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "tls"), expected: &Config{ ServerConfig: confighttp.ServerConfig{ - Endpoint: "0.0.0.0:8088", + Endpoint: "localhost:8088", TLSSetting: &configtls.ServerConfig{ Config: configtls.Config{ CertFile: "/test.crt", diff --git a/receiver/zipkinreceiver/factory.go b/receiver/zipkinreceiver/factory.go index 4aeaa82b93fc..6a86daa6f0d6 100644 --- a/receiver/zipkinreceiver/factory.go +++ b/receiver/zipkinreceiver/factory.go @@ -19,7 +19,7 @@ import ( const ( defaultHTTPPort = 9411 - defaultBindEndpoint = "0.0.0.0:9411" + defaultBindEndpoint = "localhost:9411" ) // NewFactory creates a new Zipkin receiver factory diff --git a/receiver/zookeeperreceiver/factory_test.go b/receiver/zookeeperreceiver/factory_test.go index c07c12837ef4..003b4d89742c 100644 --- a/receiver/zookeeperreceiver/factory_test.go +++ b/receiver/zookeeperreceiver/factory_test.go @@ -28,7 +28,7 @@ func TestFactory(t *testing.T) { // Assert defaults. assert.Equal(t, 10*time.Second, rCfg.CollectionInterval) assert.Equal(t, 10*time.Second, rCfg.Timeout) - assert.Equal(t, "0.0.0.0:2181", rCfg.Endpoint) + assert.Equal(t, "localhost:2181", rCfg.Endpoint) tests := []struct { name string From 7d8e610f2b75d638670540b895fa9d16bb2e92d3 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Thu, 20 Jun 2024 11:59:36 +0200 Subject: [PATCH 2/4] Set explicit endpoint on healthcheck extension to fix end to end tests --- .../testdata/e2e/clusterrbac/collector/configmap.yaml | 3 ++- .../testdata/e2e/mixrbac/collector/configmap.yaml | 3 ++- .../e2e/namespaced_rbac_no_pod_ip/collector/configmap.yaml | 3 ++- .../testdata/e2e/namespacedrbac/collector/configmap.yaml | 3 ++- .../k8sclusterreceiver/testdata/e2e/collector/configmap.yaml | 3 ++- .../k8sobjectsreceiver/testdata/e2e/collector/configmap.yaml | 3 ++- .../kubeletstatsreceiver/testdata/e2e/collector/configmap.yaml | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/configmap.yaml index 384903a4b1fd..72cbd3a03e56 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/configmap.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/configmap.yaml @@ -11,7 +11,8 @@ data: tls: insecure: true extensions: - health_check: {} + health_check: + endpoint: 0.0.0.0:13133 processors: k8sattributes: extract: diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/configmap.yaml index 33a368cf7bec..39a1931d4777 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/configmap.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/configmap.yaml @@ -11,7 +11,8 @@ data: tls: insecure: true extensions: - health_check: {} + health_check: + endpoint: 0.0.0.0:13133 processors: k8sattributes: filter: diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/collector/configmap.yaml index e0394b254a7c..9915c07c40b2 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/collector/configmap.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/collector/configmap.yaml @@ -11,7 +11,8 @@ data: tls: insecure: true extensions: - health_check: {} + health_check: + endpoint: 0.0.0.0:13133 processors: k8sattributes: filter: diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/configmap.yaml index e8170c327bf5..e74d54a1d952 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/configmap.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/configmap.yaml @@ -11,7 +11,8 @@ data: tls: insecure: true extensions: - health_check: {} + health_check: + endpoint: 0.0.0.0:13133 processors: k8sattributes: filter: diff --git a/receiver/k8sclusterreceiver/testdata/e2e/collector/configmap.yaml b/receiver/k8sclusterreceiver/testdata/e2e/collector/configmap.yaml index c286a1245a5f..50299d6cac92 100644 --- a/receiver/k8sclusterreceiver/testdata/e2e/collector/configmap.yaml +++ b/receiver/k8sclusterreceiver/testdata/e2e/collector/configmap.yaml @@ -11,7 +11,8 @@ data: tls: insecure: true extensions: - health_check: {} + health_check: + endpoint: 0.0.0.0:13133 processors: receivers: k8s_cluster: diff --git a/receiver/k8sobjectsreceiver/testdata/e2e/collector/configmap.yaml b/receiver/k8sobjectsreceiver/testdata/e2e/collector/configmap.yaml index b14167072225..b8ef12e92bbb 100644 --- a/receiver/k8sobjectsreceiver/testdata/e2e/collector/configmap.yaml +++ b/receiver/k8sobjectsreceiver/testdata/e2e/collector/configmap.yaml @@ -11,7 +11,8 @@ data: tls: insecure: true extensions: - health_check: {} + health_check: + endpoint: 0.0.0.0:13133 processors: transform/k8sobjectsNS: error_mode: ignore diff --git a/receiver/kubeletstatsreceiver/testdata/e2e/collector/configmap.yaml b/receiver/kubeletstatsreceiver/testdata/e2e/collector/configmap.yaml index e2f7acc8d665..8e0774218230 100644 --- a/receiver/kubeletstatsreceiver/testdata/e2e/collector/configmap.yaml +++ b/receiver/kubeletstatsreceiver/testdata/e2e/collector/configmap.yaml @@ -11,7 +11,8 @@ data: tls: insecure: true extensions: - health_check: {} + health_check: + endpoint: 0.0.0.0:13133 processors: receivers: kubeletstats: From 1704f895c7b88a9b6411fd72490d6bd5b307947b Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Thu, 20 Jun 2024 12:54:04 +0200 Subject: [PATCH 3/4] Add healtcheck v2 to list --- .chloggen/mx-psi_localhost-fg.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.chloggen/mx-psi_localhost-fg.yaml b/.chloggen/mx-psi_localhost-fg.yaml index e4c79862c43b..7eea0176d3b3 100644 --- a/.chloggen/mx-psi_localhost-fg.yaml +++ b/.chloggen/mx-psi_localhost-fg.yaml @@ -18,6 +18,7 @@ subtext: | This change affects the following components: - extension/awsproxy - extension/health_check + - extension/health_checkv2 - extension/jaegerremotesampling - internal/aws/proxy - processor/remotetap From 05f2f993227eb7b3a2a8f50c15aa424e1cd474de Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 24 Jun 2024 17:30:50 +0200 Subject: [PATCH 4/4] Updates READMEs --- extension/awsproxy/README.md | 4 ++-- extension/healthcheckextension/README.md | 2 +- extension/healthcheckv2extension/README.md | 4 ++-- extension/jaegerremotesampling/README.md | 6 +++--- processor/remotetapprocessor/README.md | 4 ++-- receiver/awsfirehosereceiver/README.md | 4 ++-- receiver/awsxrayreceiver/README.md | 5 +++-- receiver/influxdbreceiver/README.md | 3 +-- receiver/jaegerreceiver/README.md | 11 +++++------ receiver/lokireceiver/README.md | 2 +- receiver/opencensusreceiver/README.md | 5 ++--- receiver/sapmreceiver/README.md | 4 ++-- receiver/signalfxreceiver/README.md | 4 ++-- receiver/skywalkingreceiver/README.md | 7 +++---- receiver/splunkhecreceiver/README.md | 6 +++--- receiver/zipkinreceiver/README.md | 2 +- receiver/zookeeperreceiver/README.md | 2 +- 17 files changed, 36 insertions(+), 39 deletions(-) diff --git a/extension/awsproxy/README.md b/extension/awsproxy/README.md index 02ac527f9932..ba0b529ceb0c 100644 --- a/extension/awsproxy/README.md +++ b/extension/awsproxy/README.md @@ -39,9 +39,9 @@ extensions: ### endpoint (Optional) The TCP address and port on which this proxy listens for requests. -Default: `0.0.0.0:2000` +Default: `localhost:2000` -The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:2000. This will become the default in a future release. +You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:2000`. This feature gate will be removed in a future release. ### proxy_address (Optional) diff --git a/extension/healthcheckextension/README.md b/extension/healthcheckextension/README.md index ecc70f7911b6..299028a36620 100644 --- a/extension/healthcheckextension/README.md +++ b/extension/healthcheckextension/README.md @@ -28,7 +28,7 @@ liveness and/or readiness probe on Kubernetes. The following settings are required: -- `endpoint` (default = 0.0.0.0:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:13133. This will become the default in a future release. +- `endpoint` (default = localhost:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to 0.0.0.0:13133. This feature gate will be removed in a future release. - `path` (default = "/"): Specifies the path to be configured for the health check server. - `response_body` (default = ""): Specifies a static body that overrides the default response returned by the health check service. diff --git a/extension/healthcheckv2extension/README.md b/extension/healthcheckv2extension/README.md index 638093e8dff7..07e40e40177a 100644 --- a/extension/healthcheckv2extension/README.md +++ b/extension/healthcheckv2extension/README.md @@ -38,7 +38,7 @@ liveness and/or readiness probe on Kubernetes. The following settings are required: -- `endpoint` (default = 0.0.0.0:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:13133. This will become the default in a future release. +- `endpoint` (default = localhost:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to 0.0.0.0:13133. This feature gate will be removed in a future release. - `path` (default = "/"): Specifies the path to be configured for the health check server. - `response_body` (default = ""): Specifies a static body that overrides the default response returned by the health check service. - `check_collector_pipeline:` (deprecated and ignored): Settings of collector pipeline health check @@ -425,4 +425,4 @@ begin streaming. There are plans to provide the ability to export status events as OTLP logs adhering to the event semantic conventions. -[grpc_health_v1 service]: https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto \ No newline at end of file +[grpc_health_v1 service]: https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto diff --git a/extension/jaegerremotesampling/README.md b/extension/jaegerremotesampling/README.md index 74b45961535e..d77e22588e75 100644 --- a/extension/jaegerremotesampling/README.md +++ b/extension/jaegerremotesampling/README.md @@ -14,10 +14,10 @@ This extension allows serving sampling strategies following the Jaeger's remote sampling API. This extension can be configured to proxy requests to a backing remote sampling server, which could potentially be a Jaeger Collector down the pipeline, or a static JSON file from the local file system. By default, two listeners are made available: -- `0.0.0.0:5778`, following the legacy remote sampling endpoint as defined by Jaeger -- `0.0.0.0:14250`, following the gRPC remote sampling endpoint, also defined by Jaeger +- `localhost:5778`, following the legacy remote sampling endpoint as defined by Jaeger +- `localhost:14250`, following the gRPC remote sampling endpoint, also defined by Jaeger -The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:9943. This will become the default in a future release. +You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:5778` and `0.0.0.0:14250` respectively. This feature gate will be removed in a future release. Note that the port `14250` will clash with the Jaeger Receiver. When both are used, it's recommended to change this extension to use another port. diff --git a/processor/remotetapprocessor/README.md b/processor/remotetapprocessor/README.md index a44711d6dad2..ffbb7048e04b 100644 --- a/processor/remotetapprocessor/README.md +++ b/processor/remotetapprocessor/README.md @@ -25,8 +25,8 @@ any open WebSockets is rate limited by an adjustable amount. The Remote Tap processor has two configurable fields: `endpoint` and `limit`: - `endpoint`: The endpoint on which the WebSocket processor listens. Optional. Defaults - to `0.0.0.0:12001`. - The `component.UseLocalHostAsDefaultHost` feature gate changes this to `localhost:12001`. This will become the default in a future release. + to `localhost:12001`. + You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:12001`. This feature gate will be removed in a future release. - `limit`: The rate limit over the WebSocket in messages per second. Can be a float or an integer. Optional. Defaults to `1`. diff --git a/receiver/awsfirehosereceiver/README.md b/receiver/awsfirehosereceiver/README.md index 9c07107286bd..eb4041c833d0 100644 --- a/receiver/awsfirehosereceiver/README.md +++ b/receiver/awsfirehosereceiver/README.md @@ -36,9 +36,9 @@ using a Load Balancer. ### endpoint: The address:port to bind the listener to. -default: `0.0.0.0:4433` +default: `localhost:4433` -The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:4433. This will become the default in a future release. +You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:4433`. This feature gate will be removed in a future release. ### tls: See [documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md#server-configuration) for more details. diff --git a/receiver/awsxrayreceiver/README.md b/receiver/awsxrayreceiver/README.md index 010ab32b4dcf..1be44508503b 100644 --- a/receiver/awsxrayreceiver/README.md +++ b/receiver/awsxrayreceiver/README.md @@ -43,9 +43,10 @@ The default configurations below are based on the [default configurations](https ### endpoint (Optional) The UDP address and port on which this receiver listens for X-Ray segment documents emitted by the X-Ray SDK. -Default: `0.0.0.0:2000` +Default: `localhost:2000` + +You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:2000`. This feature gate will be removed in a future release. -The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:2000. This will become the default in a future release. ### transport (Optional) This should always be "udp" as X-Ray SDKs only send segments using UDP. diff --git a/receiver/influxdbreceiver/README.md b/receiver/influxdbreceiver/README.md index 882ccb1b1609..df911c5b2dfc 100644 --- a/receiver/influxdbreceiver/README.md +++ b/receiver/influxdbreceiver/README.md @@ -27,8 +27,7 @@ Write responses: The following configuration options are supported: -* `endpoint` (default = 0.0.0.0:8086) HTTP service endpoint for the line protocol receiver. The - `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:8086. This will become the default in a future release. +* `endpoint` (default = localhost:8086) HTTP service endpoint for the line protocol receiver. You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:8086`. This feature gate will be removed in a future release. The full list of settings exposed for this receiver are documented in [config.go](config.go). diff --git a/receiver/jaegerreceiver/README.md b/receiver/jaegerreceiver/README.md index f94995852db4..7625b6990980 100644 --- a/receiver/jaegerreceiver/README.md +++ b/receiver/jaegerreceiver/README.md @@ -22,13 +22,12 @@ named under the `protocols` object for the jaeger receiver to start. The below protocols are supported, each supports an optional `endpoint` object configuration parameter. -- `grpc` (default `endpoint` = 0.0.0.0:14250) -- `thrift_binary` (default `endpoint` = 0.0.0.0:6832) -- `thrift_compact` (default `endpoint` = 0.0.0.0:6831) -- `thrift_http` (default `endpoint` = 0.0.0.0:14268) +- `grpc` (default `endpoint` = localhost:14250) +- `thrift_binary` (default `endpoint` = localhost:6832) +- `thrift_compact` (default `endpoint` = localhost:6831) +- `thrift_http` (default `endpoint` = localhost:14268) -The `component.UseLocalHostAsDefaultHost` feature gate changes these endpoints to localhost:14250, localhost:6832, -localhost:6831 and localhost:14268. This will become the default in a future release. +You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change tgese endpoints to 0.0.0.0:14250, 0.0.0.0:6832, 0.0.0.0:6831 and 0.0.0.0:14268. This feature gate will be removed in a future release. Examples: diff --git a/receiver/lokireceiver/README.md b/receiver/lokireceiver/README.md index 78d862523ab8..207e4799260e 100644 --- a/receiver/lokireceiver/README.md +++ b/receiver/lokireceiver/README.md @@ -21,7 +21,7 @@ This receiver runs HTTP and GRPC servers to ingest log entries in Loki format. The settings are: -- `endpoint` (required, default = 0.0.0.0:3500 for HTTP protocol, 0.0.0.0:3600 gRPC protocol): host:port to which the receiver is going to receive data. The `component.UseLocalHostAsDefaultHost` feature gate changes these to localhost:3500 and localhost:3600. These will become the default in a future release. +- `endpoint` (required, default = localhost:3500 for HTTP protocol, localhost:3600 gRPC protocol): host:port to which the receiver is going to receive data. You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:3500` and `0.0.0.0:3600`. This feature gate will be removed in a future release. - `use_incoming_timestamp` (optional, default = false) if set `true` the timestamp from Loki log entry is used Example: diff --git a/receiver/opencensusreceiver/README.md b/receiver/opencensusreceiver/README.md index c53d206fb0c0..f4ca72eda5e1 100644 --- a/receiver/opencensusreceiver/README.md +++ b/receiver/opencensusreceiver/README.md @@ -28,10 +28,9 @@ receivers: The following settings are configurable: -- `endpoint` (default = 0.0.0.0:55678): host:port to which the receiver is +- `endpoint` (default = localhost:55678): host:port to which the receiver is going to receive data. The valid syntax is described at - https://github.com/grpc/grpc/blob/master/doc/naming.md. The - `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:55678. This will become the default in a future release. + https://github.com/grpc/grpc/blob/master/doc/naming.md. You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:55678`. This feature gate will be removed in a future release. ## Advanced Configuration diff --git a/receiver/sapmreceiver/README.md b/receiver/sapmreceiver/README.md index 32483ef7c9b3..0c19d2ef0399 100644 --- a/receiver/sapmreceiver/README.md +++ b/receiver/sapmreceiver/README.md @@ -21,9 +21,9 @@ and some useful related utilities can be found The following settings are required: -- `endpoint` (default = `0.0.0.0:7276`): Address and port that the SAPM +- `endpoint` (default = `localhost:7276`): Address and port that the SAPM receiver should bind to. - The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:7276. This will become the default in a future release. + You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:7276`. This feature gate will be removed in a future release. The following setting are optional: diff --git a/receiver/signalfxreceiver/README.md b/receiver/signalfxreceiver/README.md index fd6308bdf44d..a9a43fa4483c 100644 --- a/receiver/signalfxreceiver/README.md +++ b/receiver/signalfxreceiver/README.md @@ -26,9 +26,9 @@ Guide](https://dev.splunk.com/observability/reference/api/ingest_data/latest). The following settings are required: -- `endpoint` (default = `0.0.0.0:9943`): Address and port that the SignalFx +- `endpoint` (default = `localhost:9943`): Address and port that the SignalFx receiver should bind to. - The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:9943. This will become the default in a future release. + You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:9943`. This feature gate will be removed in a future release. The following settings are optional: diff --git a/receiver/skywalkingreceiver/README.md b/receiver/skywalkingreceiver/README.md index 8c4f5f220a65..1cffd714d9bf 100644 --- a/receiver/skywalkingreceiver/README.md +++ b/receiver/skywalkingreceiver/README.md @@ -25,11 +25,10 @@ named under the `protocols` object for the Skywalking receiver to start. The below protocols are supported, each supports an optional `endpoint` object configuration parameter. -- `grpc` (default `endpoint` = 0.0.0.0:11800) -- `http` (default `endpoint` = 0.0.0.0:12800) +- `grpc` (default `endpoint` = localhost:11800) +- `http` (default `endpoint` = localhost:12800) -The `component.UseLocalHostAsDefaultHost` feature gate changes endpoints to localhost:11800 and localhost:12800 respectively. -This will become the default in a future release. +You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change these to `0.0.0.0:11800` and `0.0.0.0:12800`. This feature gate will be removed in a future release. Examples: diff --git a/receiver/splunkhecreceiver/README.md b/receiver/splunkhecreceiver/README.md index d04a318547a7..a4169cc8414b 100644 --- a/receiver/splunkhecreceiver/README.md +++ b/receiver/splunkhecreceiver/README.md @@ -25,10 +25,10 @@ if sent to the `raw_path` path. The following settings are required: -* `endpoint` (default = `0.0.0.0:8088`): Address and port that the Splunk HEC +* `endpoint` (default = `localhost:8088`): Address and port that the Splunk HEC receiver should bind to. -The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:8088. This will become the default in a future release. +You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:8088`. This feature gate will be removed in a future release. The following settings are optional: @@ -78,4 +78,4 @@ receivers: The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). -[configtls]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls \ No newline at end of file +[configtls]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls diff --git a/receiver/zipkinreceiver/README.md b/receiver/zipkinreceiver/README.md index 7cbd83afb629..a97fd50b7add 100644 --- a/receiver/zipkinreceiver/README.md +++ b/receiver/zipkinreceiver/README.md @@ -27,7 +27,7 @@ receivers: The following settings are configurable: -- `endpoint` (default = 0.0.0.0:9411): host:port on which the receiver is going to receive data. The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:9411. This will become the default in a future release. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). +- `endpoint` (default = localhost:9411): host:port on which the receiver is going to receive data.You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:9411`. This feature gate will be removed in a future release. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). - `parse_string_tags` (default = false): if enabled, the receiver will attempt to parse string tags/binary annotations into int/bool/float. ## Advanced Configuration diff --git a/receiver/zookeeperreceiver/README.md b/receiver/zookeeperreceiver/README.md index 7df902f7fdfe..a85d99e6b47c 100644 --- a/receiver/zookeeperreceiver/README.md +++ b/receiver/zookeeperreceiver/README.md @@ -17,7 +17,7 @@ to be enabled for the receiver to be able to collect metrics. ## Configuration -- `endpoint`: (default = `0.0.0.0:2181`) Endpoint to connect to collect metrics. Takes the form `host:port`. The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:2181. This will become the default in a future release. +- `endpoint`: (default = `localhost:2181`) Endpoint to connect to collect metrics. Takes the form `host:port`. You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:2181`. This feature gate will be removed in a future release. - `timeout`: (default = `10s`) Timeout within which requests should be completed. - `initial_delay` (default = `1s`): defines how long this receiver waits before starting.