Preload datasource plugin


I’m developing custom datasource plugin and want to register custom transformations that can also be used for our data from other datasources such as Prometheus, Elastic, etc. We want these transformations to be available even if there is no query to our datasource plugin on the dashboard.

I’ve created a feature request to preload datasource plugins when preload option is specified (Preload datasource plugins · Issue #78374 · grafana/grafana · GitHub). However, this feature request was cancelled and I was asked to bring it up here. Any thoughts about it?

Thank you in advance!

Hi @iamdima your best option is to use an app plugin (that can be preloaded) and bundles your datasource inside.

Datasource plugins are simply not preloaded.

Hi @academo ,

Sorry for the late response, I thought that my question is answered.

Is it possible to bundle backend datasource plugin into the application plugin?

Thank you in advance!

@academo , I’ve played with that and was able to bundle backend datasource plugin inside application plugin, however on the Grafana developers portal I found the following information (Work with nested plugins | Grafana Plugin Tools):

Grafana app plugins can nest frontend data sources together with panel plugins so that you can provide a complete user experience.

Is backend datasource plugin bundled inside application plugin expected and valid set up from Grafana point of view? If yes, does it make sense to update documentation?

hi @iamdima can you clarify what part of the documentation would you like us to update and what kind of content do you expect?

Hi @academo,
Currently in documentation I sent before stated that application plugin can nest fronted data sources and panel plugins.

I was able to bundle backend datasource plugin inside application plugin. If it’s ok from Grafana point of view, I would suggest to at least change frontend data sources to the data sources

1 Like