@@ -2050,18 +2050,20 @@ func run(o Options, sig chan os.Signal, idleConnsCH chan struct{}) error {
20502050 routing := routing .New (ro )
20512051 defer routing .Close ()
20522052
2053+ frPeriod := defaultFlightRecorderPeriod
20532054 var fr * trace.FlightRecorder
20542055 if o .FlightRecorderTargetURL != "" {
20552056 fr = trace .NewFlightRecorder ()
20562057
20572058 if o .FlightRecorderPeriod != 0 {
2058- fr .SetPeriod (o .FlightRecorderPeriod )
2059- } else {
2060- fr .SetPeriod (defaultFlightRecorderPeriod )
2059+ frPeriod = o .FlightRecorderPeriod
20612060 }
2061+ fr .SetPeriod (frPeriod )
20622062
2063+ frSize := defaultFlightRecorderSize
20632064 if o .FlightRecorderSize != 0 {
20642065 fr .SetSize (o .FlightRecorderSize )
2066+ frSize = o .FlightRecorderSize
20652067 } else {
20662068 fr .SetSize (defaultFlightRecorderSize )
20672069 }
@@ -2071,9 +2073,10 @@ func run(o Options, sig chan os.Signal, idleConnsCH chan struct{}) error {
20712073 log .Errorf ("Failed to start FlightRecorder: %v" , err )
20722074 fr .Stop ()
20732075 fr = nil
2076+ } else {
2077+ log .Infof ("FlightRecorder started with config (%s, %d) target: %s" , frPeriod , frSize , o .FlightRecorderTargetURL )
20742078 }
20752079 }
2076- log .Infof ("FlightRecorder: %v" , fr )
20772080
20782081 proxyFlags := proxy .Flags (o .ProxyOptions ) | o .ProxyFlags
20792082 proxyParams := proxy.Params {
@@ -2105,6 +2108,7 @@ func run(o Options, sig chan os.Signal, idleConnsCH chan struct{}) error {
21052108 PassiveHealthCheck : passiveHealthCheck ,
21062109 FlightRecorder : fr ,
21072110 FlightRecorderTargetURL : o .FlightRecorderTargetURL ,
2111+ FlightRecorderPeriod : frPeriod ,
21082112 }
21092113
21102114 if o .EnableBreakers || len (o .BreakerSettings ) > 0 {
0 commit comments