diff --git a/command/connect/envoy/bootstrap_config.go b/command/connect/envoy/bootstrap_config.go index ef83a5774297a..a50eaf36fe066 100644 --- a/command/connect/envoy/bootstrap_config.go +++ b/command/connect/envoy/bootstrap_config.go @@ -57,7 +57,7 @@ type BootstrapConfig struct { // TelemetryCollectorBindSocketDir is a string that configures the directory for a // unix socket where Envoy will forward metrics. These metrics get pushed to - // the Metrics collector. + // the telemetry collector. TelemetryCollectorBindSocketDir string `mapstructure:"envoy_telemetry_collector_bind_socket_dir"` // PrometheusBindAddr configures an : on which the Envoy will listen @@ -812,7 +812,7 @@ func (c *BootstrapConfig) generateListenerConfig(args *BootstrapTplArgs, bindAdd return nil } -// appendMetricsCollectorConfig generates config to enable a socket at path: /.sock +// appendTelemetryCollectorConfig generates config to enable a socket at path: /.sock // We take the hash of the compound proxy ID for a few reasons: // // - The proxy ID is included because this socket path must be unique per proxy. Each Envoy proxy will ship @@ -821,7 +821,7 @@ func (c *BootstrapConfig) generateListenerConfig(args *BootstrapTplArgs, bindAdd // - The hash is needed because UNIX domain socket paths must be less than 104 characters. By using a b64 encoded // SHA1 hash we end up with 27 chars for the name, 5 chars for the extension, and the remainder is saved for // the configurable socket dir. The length of the directory's path is validated on writes to avoid going over. -func appendTelemetryCollectorConfig(args *BootstrapTplArgs, metricsCollectorBindSocketDir string) { +func appendTelemetryCollectorConfig(args *BootstrapTplArgs, telemetryCollectorBindSocketDir string) { // Normalize namespace to "default". This ensures we match the namespace behaviour in proxycfg package, // where a dynamic listener will be created at the same socket path via xDS. ns := args.Namespace @@ -833,7 +833,7 @@ func appendTelemetryCollectorConfig(args *BootstrapTplArgs, metricsCollectorBind h := sha1.New() h.Write([]byte(id)) hash := base64.RawURLEncoding.EncodeToString(h.Sum(nil)) - path := path.Join(metricsCollectorBindSocketDir, hash+".sock") + path := path.Join(telemetryCollectorBindSocketDir, hash+".sock") if args.StatsSinksJSON != "" { args.StatsSinksJSON += ",\n"