Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite as a backend plugin (needed for auth, Query Inspector, and Alerting) #13

Open
philrz opened this issue Jun 3, 2023 · 0 comments

Comments

@philrz
Copy link
Contributor

philrz commented Jun 3, 2023

The plugin was recently rewritten to use the zed-js client to query the Zed lake, since this brings improvements in code efficiency and readability. However, having completed the effort, a couple shortcomings are now apparent.

  1. The Query tab of Grafana's Query Inspector no longer works with this plugin. If the Refresh button is clicked, it just spins. grafana/31459 explains why this is expected.

    Grafana cannot detect that that URL is going against a datasource query endpoint, only those that query our backend data source api's or data source proxy api will show up in the query inspector

  2. If we wanted to add authentication to the plugin (Authentication support #8), Grafana's docs explain how being a "backend plugin" would be a prerequisite for a clean implementation of this.

  3. In order to be used with Alerting, Grafana's docs explain that a backend data source plugin is required.

For now the plugin isn't missing out on much by being written the way it is. The info that would normally be in Query Inspector can instead be found in browser tools, e.g., the Network tab of the Chrome DevTools console. And while the Zed lake has some limited authentication support, it doesn't yet support a flavor that would be compatible with Grafana's plugins. So we can cross this bridge when user demand justifies it.

@jameskerr offered a high-level sketch of one way we might go about doing the rewrite. What we could potentially do is go back to having the plugin hit the Zed lake API "raw" but as a backend plugin that requests query responses in ZJSON just as zed-js does, then use zed-js to decode the ZJSON.

@philrz philrz changed the title Rewrite as a backend plugin Rewrite as a backend plugin (needed for auth & Query Inspector) Jun 7, 2023
@philrz philrz changed the title Rewrite as a backend plugin (needed for auth & Query Inspector) Rewrite as a backend plugin (needed for auth, Query Inspector, Alerting) Jul 19, 2024
@philrz philrz changed the title Rewrite as a backend plugin (needed for auth, Query Inspector, Alerting) Rewrite as a backend plugin (needed for auth, Query Inspector, and Alerting) Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant