Elasticsearch/Prometheus: Set correct service namespace for SigV4 (#39439) (#39664)

Makes sure to set the SigV4 service namespace for Elasticsearch and Prometheus.

Fixes #38440

(cherry picked from commit 45a844e77e)
This commit is contained in:
Marcus Efraimsson authored and GitHub committed 2021-09-27 16:25:55 +02:00
1 parent 6678215a1c
commit c857fb0d49
1 file changed
+5
+5
View File
@@ -88,6 +88,11 @@ func newInstanceSettings() datasource.InstanceFactoryFunc {
return nil, fmt.Errorf("error getting http options: %w", err)
}
// Set SigV4 service namespace
if httpCliOpts.SigV4 != nil {
httpCliOpts.SigV4.Service = "es"
}
version, err := coerceVersion(jsonData["esVersion"])
if err != nil {