From 3f8d0b053f9654e7d117f3d9b263b8ff675d2f99 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Thu, 6 Jun 2024 15:15:27 +0200 Subject: [PATCH] [receiver/otlp] Promote `component.UseLocalHostAsDefaultHost` to beta --- ...mx-psi_enable-component-localhost-fgh.yaml | 26 +++++++++++++++++++ internal/localhostgate/featuregate.go | 6 ++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .chloggen/mx-psi_enable-component-localhost-fgh.yaml diff --git a/.chloggen/mx-psi_enable-component-localhost-fgh.yaml b/.chloggen/mx-psi_enable-component-localhost-fgh.yaml new file mode 100644 index 00000000000..e7a51984c4e --- /dev/null +++ b/.chloggen/mx-psi_enable-component-localhost-fgh.yaml @@ -0,0 +1,26 @@ +# 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. otlpreceiver) +component: otlpreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Switch to `localhost` as the default for all endpoints. + +# One or more tracking issues or pull requests related to the change +issues: [8510] + +# (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: | + Disable the `component.UseLocalHostAsDefaultHost` feature gate to temporarily get the previous default. + +# 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: [8510] diff --git a/internal/localhostgate/featuregate.go b/internal/localhostgate/featuregate.go index 78c19622967..7c8ee7aeb49 100644 --- a/internal/localhostgate/featuregate.go +++ b/internal/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), ) }