Plugins: Set grafana config, plugin version and user agent on plugin requests (#75171)

* first pass

* fixup

* remove test line

* fix tests

* use new fields

* fix imports + formatting

* fix tests

* rollback changes

* undo whitespace

* apply pr feedback
This commit is contained in:
Will Browne
2023-09-21 11:33:31 +02:00
committed by GitHub
parent dd8f88b194
commit 7fca1bde54
37 changed files with 248 additions and 102 deletions

View File

@ -88,7 +88,7 @@ func parseQueryModel(raw json.RawMessage) (*QueryJSONModel, error) {
}
func newInstanceSettings(httpClientProvider httpclient.Provider) datasource.InstanceFactoryFunc {
return func(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error) {
return func(_ context.Context, settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error) {
opts, err := settings.HTTPClientOptions()
if err != nil {
return nil, err