Instrument backend plugin requests (#23346)

This commit is contained in:
Carl Bergquist authored and GitHub committed 2020-04-09 14:47:46 +02:00
1 parent 1f0e1b33bc
commit a08cbbcc81
5 files changed
+145 -67

No files matched your search

@@ -77,7 +77,14 @@ func (tw *DatasourcePluginWrapperV2) Query(ctx context.Context, ds *models.DataS
})
}
pbRes, err := tw.DataPlugin.QueryData(ctx, pbQuery)
var pbRes *pluginv2.QueryDataResponse
err = backendplugin.InstrumentPluginRequest(ds.Type, "dataquery", func() error {
var err error
pbRes, err = tw.DataPlugin.QueryData(ctx, pbQuery)
return err
})
if err != nil {
return nil, err
}