mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 16:12:30 +08:00
Plugins: Update collect metrics handler to latest signature (#45166)
* use updated collect metrics handler * use proto helper
This commit is contained in:
@ -131,12 +131,12 @@ func (p *grpcPlugin) getPluginClient() (pluginClient, bool) {
|
||||
return pluginClient, true
|
||||
}
|
||||
|
||||
func (p *grpcPlugin) CollectMetrics(ctx context.Context) (*backend.CollectMetricsResult, error) {
|
||||
func (p *grpcPlugin) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error) {
|
||||
pluginClient, ok := p.getPluginClient()
|
||||
if !ok {
|
||||
return nil, backendplugin.ErrPluginUnavailable
|
||||
}
|
||||
return pluginClient.CollectMetrics(ctx)
|
||||
return pluginClient.CollectMetrics(ctx, req)
|
||||
}
|
||||
|
||||
func (p *grpcPlugin) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error) {
|
||||
|
Reference in New Issue
Block a user