Breaking changes in Grafana v11.0
Grafana v11.0 的重大變化
Documentationbreadcrumb arrow Grafana documentationbreadcrumb arrow Breaking changesbreadcrumb arrow Breaking changes in Grafana v11.0
文件 breadcrumb arrow Grafana文檔 breadcrumb arrow 重大變化 breadcrumb arrow Grafana v11.0 的重大變化
Grafana Cloud 格拉法納雲 Enterprise 企業 Open source 開源

Breaking changes in Grafana v11.0
Grafana v11.0 的重大變化

Following are breaking changes that you should be aware of when upgrading to Grafana v11.0.
以下是升級到Grafana v11.0 時應注意的重大變更。

For our purposes, a breaking change is any change that requires users or operators to do something. This includes:
就我們的目的而言,重大變更是指任何需要使用者或操作員執行某些操作的變更。這包括:

  • Changes in one part of the system that could cause other components to fail
    系統某一部分的變更可能會導致其他元件發生故障
  • Deprecations or removal of a feature
    棄用或刪除功能
  • Changes to an API that could break automation
    對 API 的變更可能會破壞自動化
  • Changes that affect some plugins or functions of Grafana
    影響Grafana某些外掛程式或功能的更改
  • Migrations that can’t be rolled back
    無法回滾的遷移

For each change, the provided information:
對於每次更改,提供的資訊:

  • Helps you determine if you’re affected
    幫助您確定您是否受到影響
  • Describes the change or relevant background information
    描述變更或相關背景信息
  • Guides you in how to mitigate for the change or migrate
    指導您如何緩解變化或遷移
  • Provides more learning resources
    提供更多學習資源

For release highlights and deprecations, refer to our v11.0 What’s new. For the specific steps we recommend when you upgrade to v11.0, check out our Upgrade guide.
有關發布亮點和棄用的信息,請參閱我們的v11.0 新增功能。有關我們建議您升級到 v11.0 時的具體步驟,請查看我們的升級指南

Users and Operators 用戶和營運商

AngularJS support is turned off by default
AngularJS 支援預設關閉

Description 描述

In Grafana v11, support for the deprecated AngularJS framework is turned off by default for all self-managed (on-premise) and Cloud instances of Grafana. This prevents any data source or panel visualization which relies on AngularJS from being loaded, and therefore has the potential to significantly disrupt your dashboards. Support will be fully removed in the next major release of Grafana.
在Grafana v11 中,預設情況下,所有自管理(本地)和Grafana的雲端實例都會關閉對已棄用的 AngularJS 框架的支援。這會阻止載入任何依賴 AngularJS 的資料來源或面板視覺化,因此有可能嚴重破壞您的儀表板。 Grafana的下一個主要版本將完全刪除支援。

Migration/mitigation 遷移/緩解

To avoid disruption, ensure all plugins are up to date and migrate from any remaining AngularJS plugins to a React-based alternative. If a plugin relies on AngularJS, a warning icon and message will be displayed in the plugins catalog in Grafana and any dashboard panel where it’s used. Additionally, a warning banner will appear in any impacted dashboards. A list of all impacted dashboards can also be generated using the detect-angular-dashboards tool.
為了避免中斷,請確保所有插件都是最新的,並從任何剩餘的 AngularJS 插件遷移到基於 React 的替代方案。如果插件依賴 AngularJS,則Grafana的插件目錄以及使用該插件的任何儀表板面板中將顯示警告圖示和訊息。此外,任何受影響的儀表板中都會出現警告橫幅。也可以使用detect-angular-dashboards工具產生所有受影響的儀表板的清單。

Our documentation lists all known public plugins and provides migration advice when possible.
我們的文件列出了所有已知的公共插件,並在可能的情況下提供遷移建議。

For self-managed users of Grafana and existing Grafana Cloud instances, you can temporarily re-enable support through the configuration parameter, angular_support_enabled=false. However, AngularJS-based plugins will not receive any further updates and we strongly recommend migration as soon as possible. This configuration parameter will also be removed in the next major release after Grafana v11.
對於Grafana和現有Grafana Cloud 實例的自我管理用戶,您可以透過設定參數angular_support_enabled=false暫時重新啟用支援。但是,基於 AngularJS 的插件將不會收到任何進一步的更新,我們強烈建議盡快遷移。此組態參數也將在Grafana v11 之後的下一個主要版本中刪除。

New Grafana Cloud users will be unable to request that support be added to their instance.
新的Grafana Cloud 用戶將無法請求將支援新增至其實例。

Learn more 了解更多

Refer to this blog post for more information.
請參閱此部落格文章以了解更多資訊。

Grafana Enterprise: Anonymous devices are billed as users
Grafana Enterprise:匿名設備依使用者計費

Description 描述

Effective starting in Grafana v11, anonymous users are counted and charged as users in Grafana Enterprise. When you upgrade to v11, anonymous users will be automatically counted as active users against your Grafana Enterprise license.
從Grafana v11 開始,匿名用戶將作為Grafana Enterprise 中的用戶進行計數和計費。當您升級至 v11 時,匿名使用者將自動計算為Grafana Enterprise 授權的活躍使用者。

Migration/mitigation 遷移/緩解

Turn off anonymous access, and consider using public dashboards to allow view-only access to publicly-accessible dashboards.
關閉匿名訪問,並考慮使用公共儀表板以允許對可公開訪問的儀表板進行僅查看訪問。

Learn more 了解更多

Get started with a free 14-day trial of Grafana Enterprise features in your own environment. Start free trial -->
開始在您自己的環境中免費試用Grafana Enterprise 功能 14 天。開始免費試用-->

Legacy alerting is entirely removed
舊版警報已完全刪除

Legacy alerting has reached its end-of-life. In Grafana v11 you can no longer enable legacy alerting, and Grafana will fail to start if the settings are not updated to run the new Grafana Alerting. This also means that starting in Grafana v11, it is no longer possible to migrate from legacy alerting to our new alerting. Grafana v10.4.x is the last version that offers migration, so make sure to migrate to the new Grafana Alerting system before upgrading to Grafana v11. Learn more about Grafana Alerting and the advantages of the new system in the legacy alerting deprecation documentation. Learn more about migration in the upgrade alerting documentation.
舊版警報已達到其生命週期的終點。在Grafana v11 中,您無法再啟用舊版警報,如果未更新設定以執行新的Grafana警報, Grafana將無法啟動。這也意味著從Grafana v11 開始,不再可能從舊警報遷移到新警報。 Grafana v10.4.x 是最後一個提供遷移的版本,因此請確保升級到Grafana v11 之前遷移到新的Grafana警報系統。在舊警報棄用文件中了解有關Grafana Alerting 的更多資訊以及新系統的優勢。在升級警報文件中了解有關遷移的更多資訊。

For more details on the code removal, review the following PRs:
有關程式碼刪除的更多詳細信息,請查看以下 PR:

Deprecated endpoints and fields in Reporting removed
已刪除報告中已棄用的端點和字段

Description 描述

In Grafana v11, support for deprecated endpoints and fields in Reporting related to the old scheduling format, email, and dashboard is fully removed. This prevents any calls to deprecated endpoints and passing in values to deprecated fields. This feature only affects Cloud and Enterprise customers who use the API to generate reports.
在Grafana v11 中,完全刪除了對報告中與舊計劃格式、電子郵件和儀表板相關的已棄用端點和欄位的支援。這可以防止對已棄用端點的任何呼叫以及將值傳遞到已棄用欄位。此功能僅影響使用 API 產生報告的雲端和企業客戶。

Migration/mitigation 遷移/緩解

Ensure deprecated endpoints are updated to new corresponding endpoints and deprecated fields are removed and replaced with new corresponding fields.
確保已棄用的端點更新為新的對應端點,並且已棄用的欄位已刪除並替換為新的對應欄位。

Learn more 了解更多

The Reporting API documentation lists all supported endpoints and fields.
報告 API 文件列出了所有支援的端點和欄位。

Description 描述

In Grafana v11, custom branding public dashboard footer behavior is changed to default to the Grafana logo if no footer logo or footer text is set. There is no option to hide the public dashboard footer anymore. This feature only affects Cloud Advanced and Enterprise customers.
在Grafana v11 中,如果未設定頁腳標誌或頁腳文本,自訂品牌公共儀表板頁腳行為將變更為預設為Grafana標誌。不再有隱藏公共儀表板頁腳的選項。此功能僅影響 Cloud Advanced 和 Enterprise 客戶。

Migration/mitigation 遷移/緩解

Ensure you have a public dashboard footer logo or footer text set if you don’t want to display the default Grafana footer.
如果您不想顯示預設的Grafana頁腳,請確保您設定了公共儀表板頁腳標誌或頁尾文字。

Learn more 了解更多

Configure custom branding documentation for public dashboards
為公共儀表板配置自訂品牌文檔

Subfolders cause very rare issues with folders that have forward slashes in their names
子資料夾會導致名稱中含有正斜杠的資料夾出現非常罕見的問題

Description and migration/mitigation
描述和遷移/緩解

The upgrade to enable subfolders can cause some issues with alerts in certain cases. If you’ve previously set up a folder that uses a forward slash in its name, you have an alert rule in that folder, and the notification policy is set to match that folder’s name, notifications will be sent to the default receiver instead of the configured receiver.
在某些情況下,升級以啟用子資料夾可能會導致一些警報問題。如果您之前設定了名稱中使用正斜線的資料夾,並且該資料夾中有一條警報規則,並且通知策略設定為與該資料夾的名稱匹配,則通知會傳送到預設接收方,而不是傳送到預設接收方。

In these cases, we recommend that you take these steps before the upgrade to enable subfolders:
在這些情況下,我們建議您在升級之前執行以下步驟以啟用子資料夾:

  • Create a copy of the affected routes and rewrite the matchers for the new copy. For example, if the original matcher was grafana_folder=MyFolder/sub-folder, then the new route matcher will be grafana_folder=MyFolder\/sub-folder.
    建立受影響路由的副本並為新副本重寫匹配器。例如,如果原始匹配器是 grafana_folder=MyFolder/sub-folder ,那麼新的路由匹配器將是 grafana_folder=MyFolder\/sub-folder
  • After enabling subfolders, you can delete the old routes.
    啟用子資料夾後,您可以刪除舊的路由。

Please note that if you use file provisioning, you can upgrade and update the routes at the same time.
請注意,如果您使用檔案配置,則可以同時升級和更新路由。

Learn more 了解更多

Subfolders announcement 子資料夾公告

Provisioning: Provision dashboards into subfolders PR
配置:將儀表板配置到子資料夾 PR 中

The Input data source is removed
輸入資料來源已刪除

The direct input data source plugin has been removed in Grafana v11. It has been in alpha for four years and is superseded by TestData, which ships with Grafana. This is a small deprecation.
Grafana v11 中刪除了直接輸入資料來源插件。它已經處於 alpha 狀態四年了,並被Grafana附帶的TestData所取代。這是一個小的棄用。

Review this PR for details.
查看此 PR以了解詳細資訊。

Data sources: Query filtering changes
資料來源:查詢過濾變化

The Disable query button in the query editor row has caused a lot of confusion among data source developers and end-users. Until now, it has been up to data source developers to filter out any hidden queries before or after they’re executed. Starting from Grafana v11, the tooltip of this button is changed from Disable query to Hide response/Show response. Responses that are associated with hidden queries will be removed by Grafana before they’re passed to the panel.
查詢編輯器行中的「停用查詢」按鈕給資料來源開發人員和最終用戶帶來了很多困惑。到目前為止,資料來源開發人員必須在執行之前或之後過濾掉任何隱藏的查詢。從Grafana v11 開始,該按鈕的工具提示從「停用查詢」變更為「隱藏回應/顯示回應」 。與隱藏查詢關聯的回應將在傳遞到面板之前被Grafana刪除。

Users of data source plugins that didn’t previously remove hidden queries (before or after they were executed) will see a change of behavior as, previously, clicking the Disable query button had no impact on the query result. Starting from Grafana v11, responses associated with hidden queries are longer returned to the panel.
先前未刪除隱藏查詢(在執行之前或之後)的資料來源外掛程式的使用者將看到行為發生變化,因為先前點擊「停用查詢」按鈕對查詢結果沒有影響。從Grafana v11 開始,與隱藏查詢相關的回應不再回到面板。

We’re also moving the call to the datasource.filterQuery method to the query runner. This means that frontend-only data sources (or any data source that doesn’t extend DataSourceWithBackend class) can implement this method. This streamlines data source plugin behavior, ensuring filtering works in the same way for all kinds of data source plugins.
我們也將datasource.filterQuery方法的呼叫移至查詢運行程序。這意味著僅前端資料來源(或任何不擴展DataSourceWithBackend類別的資料來源)可以實現此方法。這簡化了資料來源插件的行為,確保過濾對所有類型的資料來源插件都以相同的方式運作。

Migration/mitigation 遷移/緩解

If data is missing in panels, make sure the query editor Hide response button is not clicked.
如果面板中缺少數據,請確保未按一下查詢編輯器的「隱藏回應」按鈕。

For data sources that extend DataSourceWithBackend, the filterQuery method is now called before the data source query method. If the filterQuery method assumes that some kind of query migration happens before this method is called, you now need to do the migration inside this method too.
對於擴充DataSourceWithBackend的資料來源,現在在資料來源查詢方法之前呼叫 filterQuery 方法。如果filterQuery方法假設在呼叫此方法之前發生某種查詢遷移,那麼您現在也需要在此方法內進行遷移。

Learn more 了解更多

GitHub PR GitHub 公關

Chore: Query oauth info from a new instance
雜務:從新實例查詢 oauth 訊息

We’ve added a validation between the response of the ID token HD parameter and the list of allowed domains as an extra layer of security. In the event that the HD parameter doesn’t match the list of allowed domains, we’re denying access to Grafana.
我們在 ID 令牌 HD 參數的回應和允許的網域清單之間新增了驗證,作為額外的安全層。如果 HD 參數與允許的網域清單不匹配,我們將拒絕存取Grafana 。

If you set Google OAuth configuration using api_url, you might be using the legacy implementation of OAuth, which doesn’t have the HD parameter describing the organization from which the approved token comes. This could break your login flow.
如果您使用api_url,則可能會使用 OAuth 的舊實現,該實作沒有描述已核准令牌來源的組織的 HD 參數。這可能會破壞您的登入流程。

You can turn off this feature through the configuration toggle validate_hd . Anyone using the legacy Google OAuth configuration should turn off this validation if the ID Token response doesn’t have the HD parameter.
您可以透過設定切換validate_hd關閉此功能。如果 ID 令牌回應沒有 HD 參數,則任何使用舊版 Google OAuth 配置的人都應關閉此驗證。

GitHub PR GitHub 公關

Changes to how the panel view URL is generated for repeated panels
更改了重複面板的面板視圖 URL 的產生方式

Description 描述

With the introduction of the Scenes library to dashboards, the URL that’s generated when viewing an individual repeated panel has changed. We’ve changed how these panels are referenced and what used to be &viewPanel=panel-5 is now &viewPanel=panel-3-clone1.
隨著儀表板引入場景庫,查看單一重複面板時產生的 URL 發生了變化。我們更改了這些面板的引用方式,以前的&viewPanel=panel-5現在改為&viewPanel=panel-3-clone1

This means that the previous URLs won’t work anymore and instead you’ll be redirected to the dashboard view and you’ll get a Panel not found error. From this point on, the dashboard will continue to work as expected.
這意味著先前的 URL 將不再有效,您將被重定向到儀表板視圖,並且會收到「面板未找到」錯誤。從此時起,儀表板將繼續如預期運作。

Migration/mitigation 遷移/緩解

Reopen the panel in view mode and you’ll get the new URL.
在檢視模式下重新開啟面板,您將獲得新的 URL。

Plugin developers 插件開發者

React Router is deprecated
React Router 已被棄用

Description 描述

In Grafana v11 we’re marking react-router v5 as deprecated. App plugins should start migrating to use react-router v6.
在Grafana v11 中,我們將 React-router v5 標記為已棄用。應用程式外掛程式應該開始遷移以使用react-router v6。

Migration/mitigation 遷移/緩解

For a complete guide, please follow our migration docs on the developer portal.
如需完整指南,請遵循開發人員入口網站上的遷移文件

Learn more 了解更多

The grafana/e2e testing tool is deprecated
grafana /e2e 測試工具已棄用

Description 描述

The Cypress based grafana/e2e end-to-end testing tool is now deprecated.
基於 Cypress 的grafana /e2e 端對端測試工具現已棄用。

Migration/mitigation 遷移/緩解

We recommend all plugin authors to migrate their end-to-end tests to use the new Playwright-based grafana/plugin-e2e package instead. Find details on how to migrate from grafana/e2e to grafana/plugin-e2e in the migration guide.
我們建議所有插件作者遷移他們的端對端測試,以使用新的基於 Playwright 的grafana /plugin-e2e套件。在遷移指南中查找有關如何從grafana /e2e 遷移到grafana /plugin-e2e 的詳細資訊。

Chore: Taint ArrayVector with never to further discourage
雜務:污染 ArrayVector, never進一步阻止

GitHub PR GitHub 公關

The Vector interface that was deprecated in Grafana v10 is further deprecated. Using it now generates build-time Typescript errors, but it remains working at runtime. If you’re still using ArrayVector in your code, you should remove it immediately and replace it with plain arrays. Plugins that are compiled against older versions and depend on calling get/set will continue to work because the Array prototype still has a modified prototype. This will be removed in the future.
Grafana v10 中已棄用的 Vector 介面將進一步棄用。現在使用它會產生建置時 Typescript 錯誤,但它在運行時仍然有效。如果您仍在程式碼中使用 ArrayVector,則應立即將其刪除並用普通陣列替換。針對舊版本編譯並依賴呼叫 get/set 的插件將繼續工作,因為數組原型仍然具有修改後的原型。將來這將被刪除。

Chore: Remove React 17 peer deps
雜務:刪除 React 17 同儕部門

GitHub PR GitHub 公關

We’ve removed React 17 as a peer dependency from our packages. Anyone using the new versions of these packages should ensure they’ve upgraded to React 18 following the upgrade steps.
我們已經從我們的套件中刪除了 React 17 作為對等依賴項。使用這些軟體包新版本的任何人都應確保他們已按照升級步驟升級到 React 18。

Chore: Remove SystemJS from Grafana/Runtime
瑣事:從Grafana /Runtime 中刪除 SystemJS

GitHub PR GitHub 公關

SystemJS is no longer exported from @grafana/runtime. Plugin developers should instead rely on importing modules/packages using standard TS import syntax and npm/yarn for package installation.
SystemJS 不再從@ grafana /runtime導出。插件開發人員應該依賴使用標準 TS 導入語法和 npm/yarn 來導入模組/套件來安裝套件。