Skip to content

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

@philrz

Description

@philrz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions