#grafana #plugin #back-end #sdk #building

grafana-plugin-sdk

SDK for building Grafana backend plugins

8 releases (4 breaking)

0.5.0 Sep 17, 2024
0.4.3 Jan 18, 2024
0.4.2 Sep 19, 2022
0.3.0 Apr 14, 2022
0.1.0 Dec 8, 2021

#130 in HTTP client

Download history 8/week @ 2024-07-31 2/week @ 2024-08-07 24/week @ 2024-08-14 39/week @ 2024-08-21 35/week @ 2024-08-28 6/week @ 2024-09-04 123/week @ 2024-09-11 126/week @ 2024-09-18 75/week @ 2024-09-25 37/week @ 2024-10-02 35/week @ 2024-10-09 30/week @ 2024-10-16 22/week @ 2024-10-23 28/week @ 2024-10-30 10/week @ 2024-11-06 1/week @ 2024-11-13

63 downloads per month

MIT/Apache

325KB
6K SLoC

The Grafana Plugin SDK for Rust.

This crate contains a Rust implementation of the Grafana plugin SDK. It is divided into three main modules:

  • backend contains the traits that must be implemented by backend plugins for various pieces of functionality, whether querying data, calling resources, or streaming data between Grafana and the plugin.
  • data contains the fundamental data structures used by backend plugins, such as Frames, Fields, and their associated metadata.
  • live contains functionality used by Grafana Live, the streaming messaging service available from Grafana 8.0.

The prelude contains some useful unambiguous traits which are helpful when creating some structures, particularly Frames and Fields.

Backend plugins communicate with Grafana via gRPC. The low-level protocols are exposed in the pluginv2 module as an escape hatch, if required. Please file an issue if this is needed and we will try to accommodate your needs in the next release of the high-level SDK.

See the docs on backend plugins on grafana.com for an introduction to backend Grafana plugins, or check out the crate examples or sample app repo to get started with writing a backend plugin in Rust.

Feature flags

The following feature flags enable additional functionality for this crate:

The low-level structs generated from protocol definitions.

Dependencies

~18–32MB
~478K SLoC