Skip to content

Commit

Permalink
Remove final references to metrics collector
Browse files Browse the repository at this point in the history
  • Loading branch information
Achooo committed May 15, 2023
1 parent 97f9923 commit ac71bb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions command/connect/envoy/bootstrap_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ip>:<port> on which the Envoy will listen
Expand Down Expand Up @@ -812,7 +812,7 @@ func (c *BootstrapConfig) generateListenerConfig(args *BootstrapTplArgs, bindAdd
return nil
}

// appendMetricsCollectorConfig generates config to enable a socket at path: <MetricsCollectorBindSocketDir>/<hash of compound proxy ID>.sock
// appendTelemetryCollectorConfig generates config to enable a socket at path: <TelemetryCollectorBindSocketDir>/<hash of compound proxy ID>.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
Expand All @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit ac71bb0

Please sign in to comment.