Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Release notes for Grafana 9.0.0
Features and enhancements
- API: Add GET /api/annotations/:annotationId endpoint. #47739, @scottbock
- API: Add endpoint for updating a data source by its UID. #49396, @papagian
- AccessControl: Add enterprise only setting for rbac permission cache. #49006, @kalleep
- AccessControl: Document basic roles changes and provisioning V2. #48910, @gamab
- AccessControl: Enable RBAC by default. #48813, @IevaVasiljeva
- AddDataSourceConfig: Remove deprecated checkHealth prop. #50296, @kaydelaney
- Alerting: Add Image URLs to Microsoft Teams notifier. #49385, @joeblubaugh
- Alerting: Add RBAC actions and role for provisioning API routes. #50459, @yuri-tceretian
- Alerting: Add Screenshot URLs to Pagerduty Notifier. #49377, @joeblubaugh
- Alerting: Add a “Reason” to Alert Instances to show underlying cause of state. #49259, @joeblubaugh
- Alerting: Add a general screenshot service and alerting-specific image service. #49293, @joeblubaugh
- Alerting: Add image url or file attachment to email notifications. #49381, @joeblubaugh
- Alerting: Add image_urls to OpsGenie notification details. #49379, @joeblubaugh
- Alerting: Add notification policy flow chart. #49405, @peterholmberg
- Alerting: Attach image URL to alerts in Webhook notifier format. #49378, @joeblubaugh
- Alerting: Attach image URLs or upload files to Discord notifications. #49439, @alexweav
- Alerting: Attach image URLs to Google Chat notifications. #49445, @alexweav
- Alerting: Attach screenshot data to Unified Alerting notifications. #49374, @joeblubaugh
- Alerting: Create folder for alerting when start from the scratch. #48866, @yuri-tceretian
- Alerting: Modify alertmanager endpoints for proxying using the datasource UID. #47978, @papagian
- Alerting: Modify endpoint for testing a datasource rule using the UID. #48070, @papagian
- Alerting: Modify prometheus endpoints for proxying using the datasource UID. #48052, @papagian
- Alerting: State Manager takes screenshots. #49338, @joeblubaugh
- Alerting: Use UID scope for folders authorization. #48970, @yuri-tceretian
- Alerting: modify ruler endpoints for proxying using the datasource UID. #48046, @papagian
- Angular: Adds back two angular directives that are still used by remaining angular bits and plugins. #50380, @torkelo
- Azure Monitor: Add Resource Picker to Metrics Queries. #49029, @sarahzinger
- Azure Monitor: Add search feature to resource picker. #48234, @sarahzinger
- AzureMonitor: Add support for selecting multiple options when using the equals and not equals dimension filters. #48650, @aangelisc
- AzureMonitor: Remove deprecated code. #48328, @andresmgot
- Build: Change names to PascalCase to match. #48949, @zuchka
- Chore: Remove deprecated DataSourceAPI methods. #49313, @ifrost
- Chore: Upgrade typescript to 4.6.4. #49016, @kaydelaney
- Cloud Monitoring: Use new annotation API. #49026, @kevinwcyu
- CloudMonitoring: Allow to set a custom value or disable graph_period. #48646, @andresmgot
- CloudWatch: Add generic filter component to variable editor. #47907, @iwysiu
- CloudWatch: Added missing AWS/AppRunner metrics. #49174, @Aton-Kish
- CloudWatch: Enable support for dynamic labels with migrated alias patterns. #49173, @sunker
- Cloudwatch: Pass label in deep link. #49160, @sunker
- Cloudwatch: Use new annotation API. #48102, @sunker
- Dashboard: Validate dashboards against schema on save. #48252, @sdboyer
- DashboardPickerByID: Add option to exclude dashboards. #49211, @Clarity-89
- DashboardPickerById: Add optionLabel prop. #47556, @Clarity-89
- Dashboards: Display values of 0 with the configured decimal places. #48155, @wx1322
- Data: Remove deprecated types and functions from valueMappings. #50035, @kaydelaney
- Elasticsearch: Remove browser access mode. #49014, @gabor
- Elasticsearch: Remove support for versions after their end of the life (<7.10.0). #48715, @ivanahuckova
- Encryption: Add support for multiple data keys per day. #47765, @joanlopez
- Encryption: Enable envelope encryption by default. #49301, @joanlopez
- Explore: Remove support for legacy, compact format URLs. #49350, @gelicia
- Explore: Skip Angular error handling when Angular support is disabled. #49311, @ifrost
- Explore: simplify support for multiple query editors. #48701, @Elfo404
- FeatureToggles: Support changing feature toggles with URL parameters. #50275, @ryantxu
- FileUpload: Make component accessible by keyboard navigation. #47497, @tolzhabayev
- Formatting: Make SI number formats more robust. #50117, @kaydelaney
- Graph: Deprecate Graph (old) and make it no longer a visualization option for new panels. #48034, @torkelo
- IconButton: IconButtons are now correctly aligned in Safari. #48759, @ashharrison90
- Logger: Enable new logging format by default. #47584, @ying-jeanne
- Loki: Add more query patterns. #50248, @ivanahuckova
- Loki: Enable new visual query builder by default. #48346, @ivanahuckova
- Loki: use the same dataframe-format for both live and normal queries. #47153, @gabor
- OAuth: Make allowed email domain case insensitive. #49252, @Jguer
- Panels: Use the No value option when showing the no data message. #47675, @torkelo
- Plugins: Remove plugin list panel. #46914, @tolzhabayev
- Query History: Enable new query history by default. #49407, @ifrost
- QueryEditorRow: Show query errors next to query in a consistent way across Grafana. #47613, @torkelo
- SAML: Implement Name Templates for assertion_attribute_name option. #48022, @mmandrus
- Service accounts: Do not display service accounts assigned to team. #48995, @eleijonmarck
- Settings: Use Grafana Azure SDK to pass Azure env vars for external plugins. #48954, @kostrse
- Shortcuts: Add shortcut to show shortcuts to the list of shortcuts. #48395, @ivanahuckova
- Traces Panel: Add new Traces Panel visualization. #47534, @joey-grafana
- Traces: Filter by service/span name and operation in Tempo and Jaeger. #48209, @joey-grafana
- Transformations: Allow more complex regex expressions in
Rename by regex
. #48179, @ashharrison90 - grafana/ui: Add default type=“button” to
Bug fixes
- Alerting: Fix database unavailable removes rules from scheduler. #49874, @grobinson-grafana
- AzureMonitor: Fix auto-selection of time-grain for metrics. #49278, @aangelisc
- DataSources: Fixes issue with expressions not being queried. #50446, @JoaoSilvaGrafana
- GraphNG: Fix thresholds by color not following data update. #48571, @zoltanbedi
- Jaeger: Update operations dropdown. #49329, @joey-grafana
- Login: Fix mismatching label on auth_module in user list. #49177, @Jguer
- Playlists: Save button now correctly creates a new playlist. #50381, @ashharrison90
- RBAC: Fix migrations running in the wrong order causing inheritance problem in enterprise. #50452, @gamab
- RBAC: Fix migrations running into the wrong order. (Enterprise)
- ServiceAccounts: Add identifiable token prefix to service account tokens. #49011, @Jguer
- Traces: Fix missing CopyButton on KeyValueTables and overlapping of panels. #49271, @svennergr
Breaking changes
The @grafana/ui
package helper function selectOptionInTest
used in frontend tests has been removed as it caused testing libraries to be bundled in the production code of Grafana. If you were using this helper function in your tests please update your code accordingly:
// before
import { selectOptionInTest } from '@grafana/ui';
// ...test usage
await selectOptionInTest(selectEl, 'Option 2');
// after
import { select } from 'react-select-event';
// ...test usage
await select(selectEl, 'Option 2', { container: document.body });
Issue #50442
Removed deprecated checkHealth
prop from the @grafana/e2e
addDataSource
config. Previously this value defaulted to false
, and has not been used in end-to-end tests since Grafana 8.0.3. Issue #50296
Removes the deprecated LegacyBaseMap
, LegacyValueMapping
, LegacyValueMap
, and LegacyRangeMap
types, and getMappedValue
function from grafana-data. Migration is as follows:
Old | New |
---|---|
LegacyBaseMap | MappingType |
LegacyValueMapping | ValueMapping |
LegacyValueMap | ValueMap |
LegacyRangeMap | RangeMap |
getMappedValue | getValueMappingResult |
This change fixes a bug in Grafana where intermittent failure of database, network between Grafana and the database, or error in querying the database would cause all alert rules to be unscheduled in Grafana. Following this change scheduled alert rules are not updated unless the query is successful.
The get_alert_rules_duration_seconds
metric has been renamed to schedule_query_alert_rules_duration_seconds
. Issue #49874
Any secret (data sources credential, alert manager credential, etc, etc) created or modified with Grafana v9.0 won’t be decryptable from any previous version (by default) because the way encrypted secrets are stored into the database has changed. Although secrets created or modified with previous versions will still be decryptable by Grafana v9.0.
If required, although generally discouraged, the
disableEnvelopeEncryption
feature toggle can be enabled to keep envelope encryption disabled once updating to Grafana v9.0.In case of need to rollback to an earlier version of Grafana (i.e. Grafana v8.x) for any reason, after being created or modified any secret with Grafana v9.0, the
envelopeEncryption
feature toggle will need to be enabled to keep backwards compatibility (only fromv8.3.x
a bit unstable, from8.5.x
stable).As a final attempt to deal with issues related with the aforementioned situations, the
grafana-cli admin secrets-migration rollback
command has been designed to move back all the Grafana secrets encrypted with envelope encryption to legacy encryption. So, after running that command it should be safe to disable envelope encryption and/or roll back to a previous version of Grafana.Alternatively or complementarily to all the points above, backing up the Grafana database before updating could be a good idea to prevent disasters (although the risk of getting some secrets corrupted only applies to those updates/created with after updating to Grafana v9.0). Issue #49301
According to the dynamic labels documentation, you can use up to five dynamic values per label. There’s currently no such restriction in the alias pattern system, so if more than 5 patterns are being used the GetMetricData API will return an error.
Dynamic labels only allow ${LABEL} to be used once per query. There’s no such restriction in the alias pattern system, so in case more than 1 is being used the GetMetricData API will return an error.
When no alias is provided by the user, Grafana will no longer fallback with custom rules for naming the legend.
In case a search expression is being used and no data is returned, Grafana will no longer expand dimension values, for instance when using a multi-valued template variable or star wildcard
*
in the dimension value field. Ref https://github.com/grafana/grafana/issues/20729Time series might be displayed in a different order. Using for example the dynamic label
${PROP('MetricName')}
, might have the consequence that the time series are returned in a different order compared to when the alias pattern{{metric}}
is used
Issue #49173
In Elasticsearch, browser access mode was deprecated in grafana 7.4.0 and removed in 9.0.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue #49014
Environment variables passed from Grafana to external Azure plugins have been renamed:
AZURE_CLOUD
renamed toGFAZPL_AZURE_CLOUD
AZURE_MANAGED_IDENTITY_ENABLED
renamed toGFAZPL_MANAGED_IDENTITY_ENABLED
AZURE_MANAGED_IDENTITY_CLIENT_ID
renamed toGFAZPL_MANAGED_IDENTITY_CLIENT_ID
There are no known plugins which were relying on these variables. Moving forward plugins should read Azure settings only via Grafana Azure SDK which properly handles old and new environment variables. Issue #48954
Removes support for for ElasticSearch versions after their end-of-life, currently versions < 7.10.0. To continue to use ElasticSearch data source, upgrade ElasticSearch to version 7.10.0+. Issue #48715
Application Insights and Insight Analytics queries in Azure Monitor were deprecated in Grafana 8.0 and finally removed in 9.0. Deprecated queries will no longer be executed. Please refer to the documentation for more information about this change.
Issue #48328
grafana/ui: Button now specifies a default type=“button”
The Button
component provided by @grafana/ui now specifies a default type="button"
when no type is provided. In previous versions, if the attribute was not specified for buttons associated with a <form>
the default value was submit
per the specification
You can preserve the old behavior by explicitly setting the type attribute: <Button type="submit" />
Github Issue #41863. Issue #48183
The Rename by regex
transformation has been improved to allow global patterns of the form /<stringToReplace>/g
. Depending on the regex match used, this may cause some transformations to behave slightly differently. You can guarantee the same behaviour as before by wrapping the match
string in forward slashes (/
), e.g. (.*)
would become /(.*)/
Issue #48179
<Select />
menus will now portal to the document body by default. This is to give more consistent behaviour when positioning and overlaying. If you were setting menuShouldPortal={true}
before you can safely remove that prop and behaviour will be the same. If you weren’t explicitly setting that prop, there should be no visible changes in behaviour but your tests may need updating. Please see the original PR (https://github.com/grafana/grafana/pull/36398) for migration guides. If you were setting menuShouldPortal={false}
this will continue to prevent the menu from portalling.
Issue #48176
Grafana alerting endpoint prefixed with api/v1/rule/test
that tests a rule against a Corte/Loki data source now expects the data source UID as a path parameter instead of the data source numeric identifier. Issue #48070
Grafana alerting endpoints prefixed with api/prometheus/
that proxy requests to a Cortex/Loki data source now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue #48052
Grafana alerting endpoints prefixed with api/ruler/
that proxy requests to a Cortex/Loki data source now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue #48046
Grafana alerting endpoints prefixed with api/alertmanager/
that proxy requests to an Alertmanager now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue #47978
The format of log messages have been updated, lvl
is now level
and eror
and dbug
has been replaced with error
and debug
. The precision of timestamps has been increased. To smooth the transition, it is possible to opt-out of the new log format by enabling the feature toggle oldlog
. This option will be removed in a future minor release. Issue #47584
In the Loki data source, the dataframe format used to represent Loki logs-data has been changed to a more efficient format. The query-result is represented by a single dataframe with a “labels” column, instead of the separate dataframes for every labels-value. When displaying such data in explore, or in a logs-panel in the dashboard will continue to work without changes, but if the data was loaded into a different dashboard-panel, or Transforms were used, adjustments may be necessary. For example, if you used the “labels to fields” transformation with the logs data, please switch to the “extract fields” transformation. Issue #47153
Deprecations
setExploreQueryField
, setExploreMetricsQueryField
and setExploreLogsQueryField
are now deprecated and will be removed in a future release. If you need to set a different query editor for Explore, conditionally render based on props.app
in your regular query editor. Please refer to https://grafana.com/docs/grafana/latest/developers/plugins/add-support-for-explore-queries/ for more information.
Issue #48701
Plugin development fixes & changes
- Chore: Remove react-testing-lib from bundles. #50442, @jackw
- Select: Portal menu by default. #48176, @ashharrison90