|
| 1 | +--- |
| 2 | +date: 2025-06-06 |
| 3 | +categories: |
| 4 | + - release |
| 5 | +--- |
| 6 | + |
| 7 | +# Release v0.51.0 |
| 8 | + |
| 9 | +We are excited to announce the release of Perses v0.51.0! |
| 10 | + |
| 11 | +This release brings several new features, improvements, and bug fixes to enhance your experience with Perses. |
| 12 | + |
| 13 | +It is a significant step forward in the evolution of Perses, and we are thrilled to share it with you. We have |
| 14 | +been working hard to bring you a more powerful and flexible platform for your observability needs. |
| 15 | + |
| 16 | +This release includes a new plugin architecture, new panel, new variable, a new |
| 17 | +repository [perses/plugins](https://github.com/perses/plugins) |
| 18 | +containing all default plugins supported by Perses. |
| 19 | + |
| 20 | +We have also made significant improvements to the documentation, highlighting features that were implemented some time |
| 21 | +ago but not well advertised, such as datasource discovery and ephemeral dashboards. |
| 22 | + |
| 23 | +## New Plugins system |
| 24 | + |
| 25 | +Big news from us at Perses! We've rolled out a brand-new plugin system, and it's all about making things more flexible |
| 26 | +and expandable. |
| 27 | +Our goal? To provide a more flexible and extensible way to scaffold, develop and distribute plugins in Perses so we can |
| 28 | +expand the possibilities for sources of data, visualization and interactions within the platform. |
| 29 | + |
| 30 | +### What's Under the Hood? |
| 31 | + |
| 32 | +Leveraging [module federation](https://rspack.dev/guide/features/module-federation) plugins can now operate |
| 33 | +independently of the main Perses code. |
| 34 | +Opening up a world of possibilities for developers to create and share plugins without being tied down to the core |
| 35 | +codebase. |
| 36 | +Plugins can be grouped into **Plugin Modules**, which are essentially collections of related plugins that can be |
| 37 | +developed and distributed together. |
| 38 | +Underneath it all, the system has a backend that handles data validation and migrations using Cuelang schemas, and a |
| 39 | +frontend that brings everything to life with React components. |
| 40 | + |
| 41 | +### Easier Plugin Development |
| 42 | + |
| 43 | +To make life easier for developers, we've built some handy `plugin` commands right into our command-line interface, |
| 44 | +[`percli`](https://perses.dev/perses/docs/cli/). |
| 45 | +The CLI will do all the heavy lifting from setting up your project, getting your development environment ready, to |
| 46 | +building your plugins. |
| 47 | +That way, you can kick back and focus on the exciting part: actually creating awesome plugin features! |
| 48 | + |
| 49 | +### How Does It Work? |
| 50 | + |
| 51 | +The new plugin system is designed to be super user-friendly. |
| 52 | +You can scaffold a plugin using the `percli plugin generate` command, which will set up the new plugin files for you. |
| 53 | +This command can be used several times to create multiple plugins in the same plugin module. |
| 54 | +Then you can start developing your plugin using `percli plugin start` to run it in development mode and test it out in |
| 55 | +your local Perses instance. Finally, compile it with `percli plugin build` to prepare it for distribution. |
| 56 | + |
| 57 | +You can follow the [documentation](https://perses.dev/perses/docs/plugins/creation) for details and examples to get |
| 58 | +started with creating your own plugins. |
| 59 | + |
| 60 | +### Where to Find Plugins |
| 61 | + |
| 62 | +Thanks to this new setup, our main Perses plugins have moved to their own dedicated home |
| 63 | +at [perses/plugins](https://github.com/perses/plugins). And speaking of plugins, the system supports a bunch of |
| 64 | +different types: |
| 65 | + |
| 66 | +- Datasource: Perfect for grabbing data from all sorts of places. |
| 67 | +- Query: This one links your datasources to your panels. |
| 68 | +- Panel: Your go-to for making data look good through various visualizations. |
| 69 | +- Variable: For when you need dynamic values in your queries. |
| 70 | +- Explore: A special kind of panel designed for diving deep into your data. |
| 71 | + |
| 72 | +You just use `percli` to get started, test your creations, and then build them up to distribute as archive files or npm |
| 73 | +packages. |
| 74 | +After that, they're ready to be installed on a Perses server or even embedded directly into other React apps. |
| 75 | + |
| 76 | +So, what kind of plugin are you dreaming of building first? |
| 77 | + |
| 78 | +### Which plugins are available in Perses |
| 79 | + |
| 80 | +All plugins that are available in the repository [perses/plugins](https://github.com/perses/plugins) are installed by |
| 81 | +default in Perses. |
| 82 | + |
| 83 | +You can find the list of available plugins at runtime in the UI, in the **Configuration** page, under the **Plugins** |
| 84 | +tab. |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +You can also use the CLI command `percli plugin list` to get the list of available plugins. |
| 89 | + |
| 90 | +```bash |
| 91 | +percli plugin list |
| 92 | + |
| 93 | + NAME │ VERSION │ TYPE │ LOADED │ FROM DEV |
| 94 | +────────────────────┼─────────────┼──────────────┼────────┼────────── |
| 95 | + DatasourceVariable │ 0.1.2 │ Variable │ true │ false |
| 96 | + GaugeChart │ 0.7.1 │ Panel │ true │ false |
| 97 | + Markdown │ 0.7.1 │ Panel │ true │ false |
| 98 | + Prometheus │ 0.51.0-rc.1 │ PluginModule │ true │ false |
| 99 | + ScatterChart │ 0.6.1 │ Panel │ true │ false |
| 100 | + StaticListVariable │ 0.3.1 │ Variable │ true │ false |
| 101 | + Table │ 0.6.1 │ Panel │ true │ false |
| 102 | + HistogramChart │ 0.7.2 │ Panel │ true │ false |
| 103 | + PieChart │ 0.7.1 │ Panel │ true │ false |
| 104 | + TimeSeriesChart │ 0.8.0 │ Panel │ true │ false |
| 105 | + TimeSeriesTable │ 0.7.1 │ Panel │ true │ false |
| 106 | + TraceTable │ 0.6.1 │ Panel │ true │ false |
| 107 | + BarChart │ 0.7.1 │ Panel │ true │ false |
| 108 | + TracingGanttChart │ 0.6.1 │ Panel │ true │ false |
| 109 | + StatChart │ 0.7.1 │ Panel │ true │ false |
| 110 | + StatusHistoryChart │ 0.7.2 │ Panel │ true │ false |
| 111 | + Tempo │ 0.51.0-rc.1 │ PluginModule │ true │ false |
| 112 | +``` |
| 113 | + |
| 114 | +## New Plugins |
| 115 | + |
| 116 | +### Datasource variable |
| 117 | + |
| 118 | +Thanks to the community contributions, we are introducing a new plugin: the **Datasource Variable**. |
| 119 | +This plugin allows the possibility to use a datasource as a variable in your dashboard, specially in the queries of your |
| 120 | +panels. |
| 121 | + |
| 122 | +This is particularly useful when you have multiple datasources of the same type, such as multiple Prometheus instances, |
| 123 | +and you would like to switch between them without having to modify each panel query. |
| 124 | + |
| 125 | + |
| 126 | +Of course, this plugin is not limited to Prometheus; it can be used with any datasource. |
| 127 | + |
| 128 | +Note: If you are familiar with Grafana this feature wont will feel particularly new to you. |
| 129 | +It's a valuable addition to Perses, helping to bring feature parity and making it a strong alternative for those |
| 130 | +considering or exploring a |
| 131 | +transition. |
| 132 | + |
| 133 | +### Histogram Chart |
| 134 | + |
| 135 | +This release introduces a new plugin: the **Histogram Chart**. This plugin allows you to visualize Prometheus Native |
| 136 | +Histograms, providing a clear and concise way to understand the distribution of your histogram buckets. |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | +This panel is supporting thresholds, which allow you to colorize the chart based on specific values, making it easier to |
| 141 | +understand your data. |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | +This chart is also used in **TimeSeriesTable** panel to display histogram details, allowing the Explore page to display |
| 146 | +histograms. |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | +In next releases, we are planning to add exponential mode support, add support for Prometheus classic histograms and |
| 151 | +summaries and thresholds on bucket counts. |
| 152 | +Feel free to give us ideas on how to improve this plugin, with issues or discussions on |
| 153 | +the [Perses GitHub repository](https://github.com/perses/perses). |
| 154 | +Spoiler: the heatmap panel is coming next release 🤫 |
| 155 | + |
| 156 | +## Breaking Change in Dashboard as Code |
| 157 | + |
| 158 | +As previously mentioned, we have relocated the default plugins to a new repository. This includes not only the frontend |
| 159 | +code, which has been transferred there, but also the corresponding Go SDK and CUE SDK for each plugin. |
| 160 | + |
| 161 | +This move is a breaking change for the Dashboard as Code feature as when upgraded to the last version, you will no |
| 162 | +longer have the plugin code from perses/perses repository. |
| 163 | + |
| 164 | +All imports will have to be updated to point to the new repository. We created a module for each plugin so you can |
| 165 | +import only the ones you need. |
| 166 | + |
| 167 | +For example, in Go SDK, in case you are using the plugin `label-values` from the `Prometheus` module, you will need to |
| 168 | +`go get` the plugin first: |
| 169 | + |
| 170 | +```bash |
| 171 | +go get github.com/perses/plugins/prometheus |
| 172 | +``` |
| 173 | + |
| 174 | +Then, in your Go code, you will have to change the import path from: |
| 175 | + |
| 176 | +```go |
| 177 | +import labelValuesVar "github.com/perses/perses/go-sdk/prometheus/variable/label-values" |
| 178 | +``` |
| 179 | + |
| 180 | +to: |
| 181 | + |
| 182 | +```go |
| 183 | +import labelValuesVar "github.com/perses/plugins/prometheus/sdk/go/variable/label-values" |
| 184 | +``` |
| 185 | + |
| 186 | +As a complete example, this PR: https://github.com/perses/community-dashboards/pull/69 is demonstrating the required |
| 187 | +changes you will have to do in your code when upgrading to the v0.51.0 of Perses. |
| 188 | + |
| 189 | +In the case of CUE SDK, we are also leveraging on the new dependency management introduced by CUE v0.12.0. |
| 190 | +Where we previously had a custom-made schema retrieval achieved by `percli dac setup`, Perses is now fully aligned with |
| 191 | +the new [CUE modules](https://cuelang.org/docs/reference/modules/). |
| 192 | + |
| 193 | +To continue using the CUE SDK, you will need to update your CUE files to import the new modules, but also to **upgrade** |
| 194 | +the |
| 195 | +**cue** version you are using to at least **v0.12.0**. |
| 196 | + |
| 197 | +## Custom Lint rules |
| 198 | + |
| 199 | +As you may know, to validate your dashboard, we have implemented a set of rules. |
| 200 | +These rules are executed when you save your dashboard during the unmarshalling step from JSON or YAML or during the |
| 201 | +validation of each plugin using Cuelang. |
| 202 | + |
| 203 | +In this release, we have added the ability to create custom lint rules. This allows you to enforce specific standards or |
| 204 | +practices within your organization. |
| 205 | + |
| 206 | +These custom rules should be defined in the configuration file of your Perses instance, typically located at |
| 207 | +`/etc/perses/config.yaml`. The rules are defined under the `dashboard.custom_lint_rules` section. |
| 208 | + |
| 209 | +Here is an example of how to define custom lint rules for dashboards: |
| 210 | + |
| 211 | +```yaml |
| 212 | +dashboard: |
| 213 | + custom_lint_rules: |
| 214 | + - name: "Dashboard Naming Convention" |
| 215 | + target: "$.metadata.name" |
| 216 | + assertion: "value.matches('^[a-z]+(-[a-z]+)*$')" |
| 217 | + message: "Dashboard name must be all lowercase letters with hyphens only." |
| 218 | + disable: false |
| 219 | + |
| 220 | + - name: "At Least One Panel Exists" |
| 221 | + target: "$.spec.panels" |
| 222 | + assertion: "value.size() > 0" |
| 223 | + message: "Dashboard must contain at least one panel." |
| 224 | + disable: false |
| 225 | +``` |
| 226 | +
|
| 227 | +We are using the [JSONPath](https://goessner.net/articles/JsonPath/) syntax to target specific parts of the dashboard |
| 228 | +JSON structure, and the assertion is a [CEL](https://github.com/google/cel-spec/blob/master/doc/langdef.md) expression. |
| 229 | +
|
| 230 | +To know more about the syntax of the rules, please refer to |
| 231 | +the [documentation](https://perses.dev/perses/docs/configuration/custom-lint-rules) |
| 232 | +
|
| 233 | +## Disable datasource and variable |
| 234 | +
|
| 235 | +In Perses, it is possible to create datasource and variables at three different levels: global, project, and dashboard. |
| 236 | +
|
| 237 | +Usually, for security and governance reasons, you may want to prevent people to create datasource and variables at |
| 238 | +various levels. For global and project levels, this is already possible using the RBAC system. |
| 239 | +
|
| 240 | +But before this release, it was not possible to disable the creation of datasource and variables at the dashboard level. |
| 241 | +
|
| 242 | +In this release, we are introducing the ability to disable the manipulation of datasources and variables at any level. |
| 243 | +For that, you need to modify the configuration file of your Perses instance, and add the following section: |
| 244 | +
|
| 245 | +```yaml |
| 246 | +datasource: |
| 247 | + global: |
| 248 | + disable: true |
| 249 | + project: |
| 250 | + disable: true |
| 251 | + disable_local: true |
| 252 | +``` |
| 253 | +
|
| 254 | +This configuration is preventing the usage of datasources at any level and disable the associated HTTP route in the |
| 255 | +Perses proxy. |
| 256 | +
|
| 257 | +Of course, this config is silly because without datasources, you cannot use dashboards, but it is a good example of how |
| 258 | +to disable datasources. |
| 259 | +
|
| 260 | +The same example applies for variables: |
| 261 | +
|
| 262 | +```yaml |
| 263 | +variable: |
| 264 | + global: |
| 265 | + disable: true |
| 266 | + project: |
| 267 | + disable: true |
| 268 | + disable_local: true |
| 269 | +``` |
| 270 | +
|
| 271 | +## Improvement of the datasource discovery |
| 272 | +
|
| 273 | +One year ago, we introduced the datasource discovery feature, which allows you to automatically discover remote |
| 274 | +datasources from the Kubernetes API or from a generic HTTP endpoint. |
| 275 | +And so far we never got feedback about it until a couple of months ago when [SAP](https://www.sap.com/) started using |
| 276 | +it. |
| 277 | +
|
| 278 | +### Overview |
| 279 | +
|
| 280 | +We didn't have the opportunity to highlight this feature, so here is a quick overview of how it works. |
| 281 | +
|
| 282 | +Datasource discovery is useful when you have a large number of datasources, and you don't want to manually register |
| 283 | +them in your application. Note that this feature can only be used when registering Global Datasources. |
| 284 | +
|
| 285 | +We are supporting two types of discovery: |
| 286 | +
|
| 287 | +- **Kubernetes API**: This allows you to discover datasources that are registered in the Kubernetes API, such as |
| 288 | + Prometheus, Loki, and others. You can configure the discovery by specifying the namespace where the datasources are |
| 289 | + located, the label selector to filter the datasources and the type of the discovery you would like to use: service, |
| 290 | + pod, endpoint. |
| 291 | +- **HTTP Endpoint**: This allows you to discover datasources from a generic HTTP endpoint. You can configure the |
| 292 | + discovery by specifying the URL of the endpoint. The endpoint should return a JSON array of Global Datasource. |
| 293 | +
|
| 294 | +If you want to learn more about this feature, please refer to |
| 295 | +the [documentation](https://perses.dev/perses/docs/configuration/datasource-discovery/). |
| 296 | +
|
| 297 | +### Improvements |
| 298 | +
|
| 299 | +- We made a mistake about how the label selector was converted from the configuration file to the Kubernetes |
| 300 | + API. The label selector was not correctly formatted, which prevented the discovery from working properly. |
| 301 | +- When converting a service to a global datasource, there was a corner case where the global datasource was not |
| 302 | + correctly created. And then Perses was not able to load the datasource. |
| 303 | +
|
| 304 | +Thanks to these little improvements, the datasource discovery feature is now more reliable and easier to use. |
| 305 | +
|
| 306 | +## Community Dashboards |
| 307 | +
|
| 308 | +Fresh off our talk at KubeCon EU 2025 in |
| 309 | +London - [Limitless Possibilities, Consistent Design: Crafting Dashboards With Perses DAC](http://youtube.com/watch?v=7h70Olo5Uzk), |
| 310 | +given by two perses maintainers, Nicolas Takashi and Antoine Thébaud, we are happy to introduce |
| 311 | +the [community-dashboards](https://github.com/perses/community-dashboards) repository. |
| 312 | +
|
| 313 | +Here we provide support for commonly used Mixin Dashboards, like Prometheus, Kubernetes and Thanos, build on top of |
| 314 | +**Dashboard as Code** capabilities provided by Perses. We’ll dive deeper into the community-dashboards in our upcoming |
| 315 | +blog post, but starting today, you can begin using them right away — whether by: |
| 316 | +
|
| 317 | +* Importing them directly into your Perses instance; |
| 318 | +
|
| 319 | +* Using them as a starting point to build your own dashboards; |
| 320 | +
|
| 321 | +* Or reusing individual panels in your own dashboards-as-code workflows. |
| 322 | +
|
| 323 | +We're also welcoming the community to help us support and extent the community-dashboards. So if there are additional |
| 324 | +dashboards you’d like to see supported, feel free to reach out to the team - or even better, help us extend the |
| 325 | +supported dashboards with feedback or improvements to the dashboards. Your input helps shape what comes next! |
0 commit comments