mirror of
https://github.com/grafana/grafana.git
synced 2026-08-09 04:38:16 -05:00
Datasource: Improve default timeout settings for HTTP client provider (#36621)
Make sure that default timeout settings are based on configuration parameters. This now applies for core data sources using old TSDB contracts and new SDK contracts. Before it was only applied for old TSDB contracts. Also moves global setting variables to non-global (setting.Cfg).
This commit is contained in:
@@ -64,7 +64,7 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route
|
||||
}
|
||||
}
|
||||
|
||||
if setting.DataProxyLogging {
|
||||
if cfg.DataProxyLogging {
|
||||
logger.Debug("Requesting", "url", req.URL.String())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ func (proxy *DataSourceProxy) validateRequest() error {
|
||||
}
|
||||
|
||||
func (proxy *DataSourceProxy) logRequest() {
|
||||
if !setting.DataProxyLogging {
|
||||
if !proxy.cfg.DataProxyLogging {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user