Support Plugins for datasource / panel #72
Replies: 3 comments 5 replies
-
Also if it takes time to find how to do it, it can be ok to say this design will be for the v1. Even after creating the mvp, I'm expecting we will figure out that things are odd, specially after the first feedbacks. We shouldn't block ourself if we want to break things. |
Beta Was this translation helpful? Give feedback.
-
Totally agree on the "it's OK to break things", especially when it comes to any plugin APIs we create. I think we'll just need to make it clear to anyone else that's interested that "this is very unstable, so you probably don't want to use it (yet)". As for what should be a plugin, on the front-end I was thinking of three pieces of functionality for the MVP:
Like we were discussing yesterday, I really like the idea of users having the option of doing some types of plugins on either the server or in the browser. Obviously 1 is going to be limited to client-side, but I think 2 and 3 are definitely candidates for server-side plugins. In the case of a server-side plugin, the UI would just call some well-known Perses server API to perform those actions and the server plugins could take it from there. |
Beta Was this translation helpful? Give feedback.
-
One other thing I was thinking (while working on the prototype for plugins in the front-end) was whether or not it's too early to just group front-end plugins into two types like Grafana does (e.g. "Panels" and "DataSource"). For now, what I've done is to keep the concept of a plugin granular. I don't know if that's how it'll end up, but basically how I initially structured things was:
You'll see this in my initial PR, but the list of plugin types that you can write a "Plugin" for are:
I don't know if thinking of things at this granular of a level is helpful, but I figured it would be good to start granular, and then maybe group them into larger "plugin types" if necessary. While prototyping, I treated a "Data Source" as just a bundle of config that tells me how talk to something (e.g. the base URL for fetching from a Prometheus API). But I'm not sure that's how it should be. |
Beta Was this translation helpful? Give feedback.
-
Hello there,
At some point, we would like to support different datasource than Prometheus, like ElasticSearch or MySQL. That doesn't necessary mean that the core will include that.
For example, we could think to have a dedicated repository for the plugins itself (more opened for external maintainer ?)
Usage of a different datasources induces supporting different query language, different kind of variables, perhaps different panels ?
I think even before talking about a technical solution, it will be good to :
We can also start to define what "plugin" mean for us. Probably it's already clear for everybody, but we could be surprised.
On my side, a "good" plugin would be something we can add without modifying the binary (backend + frontend).
Beta Was this translation helpful? Give feedback.
All reactions