[Grafana] Golang datasource backend plugin reload

Hello guys, how do i reload a Golang datasource backend plugin? I tried [http://admin](http://admin):admin@localhost:3000/api/admin/provisioning/plugins/reload, but it looks like it is not meant for that.

Why do you need to reload it? you can rebuild the binary if you are developing it

yes I’m developing it; the reason why I’m trying to reload it is to make the change take effect without restarting the Grafana

But it seems like the Grafana will load the Golang binary at start.

It depends on the way you deploy Grafana. Grafana use gRPC to communicate with binaries directly: https://grafana.com/docs/grafana/latest/developers/plugins/backend/

I deployed the Grafana locally, and put the go binary plugin inside plugins-bundled folder.
When Grafana starts, I can see that it says it loads the go binary;
Then I made some changes to the binary and replace that go binary file directly — I don’t see anything in the log says it reloaded the plugin. I have to restart Grafana to load the new binary.

So my question is more like how can I hot reload the go binary plugin without restarting Grafana

Or do you mean that I can simply replace the go binary plugin without restarting the Grafana?

Plugins are easy to develop: just write a Go application and run go build (or use any other language which supports gRPC).
does this mean that i can just replace the binary?

That’s correct, it works in the most cases, unless something drastically change in the binary and Grafana can’t communicate with it… then you will see error and should restart Grafana

Let me know if it works for you!

Got it. Thank you ! So pretty much when Grafana starts, what I see in the log is simply telling me that Granana knows there is a binary plugin on the disk, and it didn’t do anything like loading into the memory. Every time Grafana needs something from the golang binary, it will execute the binary directly just like executing another CLI command, e.g., ls, or echo.