Browse Source

stackdriver: add custom User-Agent header

Daniel Lee 7 years ago
parent
commit
408d4bda95
1 changed files with 1 additions and 0 deletions
  1. 1 0
      pkg/tsdb/stackdriver/stackdriver.go

+ 1 - 0
pkg/tsdb/stackdriver/stackdriver.go

@@ -301,6 +301,7 @@ func (e *StackdriverExecutor) createRequest(ctx context.Context, dsInfo *models.
 	}
 
 	req.Header.Set("Content-Type", "application/json")
+	req.Header.Set("User-Agent", fmt.Sprintf("grafana-sd-plugin/%s", setting.BuildVersion))
 
 	// find plugin
 	plugin, ok := plugins.DataSources[dsInfo.Type]