Set DatasourceName and DatasourceType in proxy.Options (#80923)

* Set DatasourceName and DatasourceType in proxy.Options

* upgrade github.com/grafana/grafana-plugin-sdk-go to v0.206.0 and fix merge conflicts
This commit is contained in:
Bruno
2024-02-01 11:09:58 -03:00
committed by GitHub
parent d7ded807a2
commit 2332bfb007
11 changed files with 18 additions and 16 deletions

View File

@ -90,7 +90,7 @@ func newInstanceSettings(cfg *setting.Cfg, logger log.Logger) datasource.Instanc
}
// register the secure socks proxy dialer context, if enabled
proxyOpts := proxyutil.GetSQLProxyOptions(cfg.SecureSocksDSProxy, dsInfo)
proxyOpts := proxyutil.GetSQLProxyOptions(cfg.SecureSocksDSProxy, dsInfo, settings.Name, settings.Type)
if sdkproxy.New(proxyOpts).SecureSocksProxyEnabled() {
// UID is only unique per org, the only way to ensure uniqueness is to do it by connection information
uniqueIdentifier := dsInfo.User + dsInfo.DecryptedSecureJSONData["password"] + dsInfo.URL + dsInfo.Database