diff --git a/proxy/proxy.go b/proxy/proxy.go index 5b9e75ad8d..922a6ecbd3 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -897,7 +897,7 @@ func (p *Proxy) writeTraceIfTooSlow(ctx *context) { p.log.Errorf("Failed to get successful response from %s: (%d) %s", p.flightRecorderURL.String(), rsp.StatusCode, rsp.Status) } default: - p.log.Errorf("Failed to write trace, unknown FlightRecorderURL %q", p.flightRecorderURL.Scheme) + p.log.Errorf("Failed to write trace, unknown FlightRecorderURL scheme %q", p.flightRecorderURL.Scheme) } } } diff --git a/skipper.go b/skipper.go index 47111ca97a..cdd7a7a6ae 100644 --- a/skipper.go +++ b/skipper.go @@ -462,9 +462,6 @@ type Options struct { // MemProfileRate calls runtime.SetMemProfileRate(MemProfileRate) if non zero value, deactivate with <0 MemProfileRate int - // EnableFlightRecorder enables trace.FlightRecorder https://pkg.go.dev/golang.org/x/exp/trace#FlightRecorder to support Go tool trace. - EnableFlightRecorder bool - // FlightRecorderSizeBytes set size of the FlightRecorder https://pkg.go.dev/golang.org/x/exp/trace#FlightRecorder.SetSize FlightRecorderSize int @@ -474,7 +471,10 @@ type Options struct { // FlightRecorderTargetURL is the target to write the trace // to. Supported targets are http URL and file URL. Skipper // will try to upload the trace data by an http PUT request to - // this http URL. request + // this http URL. This is required to set if you want to have + // trace.FlightRecorder + // https://pkg.go.dev/golang.org/x/exp/trace#FlightRecorder + // enabled to support Go tool trace. FlightRecorderTargetURL string // Flag that enables reporting of the Go garbage collector statistics exported in debug.GCStats @@ -2048,7 +2048,7 @@ func run(o Options, sig chan os.Signal, idleConnsCH chan struct{}) error { fr = nil } } - log.Infof("FlightRecorder enabled %v: %v", o.EnableFlightRecorder, fr) + log.Infof("FlightRecorder: %v", fr) proxyFlags := proxy.Flags(o.ProxyOptions) | o.ProxyFlags proxyParams := proxy.Params{