Skip to content

Commit

Permalink
reduce options
Browse files Browse the repository at this point in the history
Signed-off-by: Sandor Szücs <[email protected]>
  • Loading branch information
szuecs committed Apr 16, 2024
1 parent c593180 commit b9d62b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions skipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit b9d62b2

Please sign in to comment.