---
title: "Cognite Data Fusion data source changelog for Grafana"
description: "Cognite Data Fusion datasource. Cognite Data Fusion data source plugin for Grafana by Cognite. Available in Grafana Cloud and self-managed Grafana."
---

> This is the Markdown version of https://grafana.com/grafana/plugins/cognitedata-datasource/changelog/

# Cognite Data Fusion - Change log

# Releases

This article documents the ongoing improvements we're making to the **Cognite Data Source for Grafana**.

## 4.7.0 - November 6th, 2026

### Deprecations

- The asset-centric features are deprecated, following CDF's deprecation of the asset-centric APIs, which retire on December 31, 2027. The **Time series search**, **Time series from asset**, **Time series custom query**, **Events** and **Relationships** tabs, the **Assets** variable tab and event annotations now carry a **Deprecated** chip and a warning that names their Core Data Model replacement. The asset-centric group in the data source settings is labelled **Deprecated** instead of **legacy**. Nothing stops working yet: the toggles, saved queries and dashboards behave as before. See [Deprecated and retired features](https://docs.cognite.com/cdf/deprecated).
- **Relationships** moves into the asset-centric group in the data source settings and now follows its master toggle, like the other asset-centric tabs: turning on the Core Data Model features turns it off. Saved Relationships queries keep their tab and keep running.
- The **Templates** and **Extraction Pipelines** tabs are labelled **Deprecated** instead of **Preview**. In the data source settings they sit under **Other**, marked **Deprecated**.

### Features

- **Records** moves from alpha to beta and is now on by default: a data source gets the tab unless its settings were saved with the **Records** toggle off. The toggle still turns it off.
- **Gap filling** on the **Time series** and **GraphQL** tabs: aggregates can now cover intervals that have no data points. CDF interpolates across gaps in the raw data up to a limit and carries the last value forward for that limit after the last data point; longer gaps stay empty. The limit is either **Fixed** (for example `4h`) or a multiple of the granularity (**× granularity**), so it follows an auto granularity as the time range changes. A badge shows the limit sent, and a fixed limit shorter than the granularity is raised to it, with a warning, instead of failing the query.
- **Granularity** is chosen the way gap filling's limit is, on the **Time series** and **GraphQL** tabs and the time series search, from asset and custom query tabs: **Auto** or **Fixed**. Auto follows the time range, in **Standard** (as before) or with **Fewer points**: intervals about four times wider, so a quarter as many points are fetched and drawn and a dashboard with many time series loads faster. Fixed takes a value such as `12h`, pre-filled with the granularity in effect, and flags one CDF would reject. A badge shows what Auto resolves to. The Records interval picker offers Auto · fewer points too. Saved queries are unchanged.
- **Time series**: the aggregation list follows the selected series' type, shown as a chip next to the series. It is grouped (the type's own aggregates, then those every type has) and describes each aggregate, and the label now sits on a row of its own at the bottom, as it also does on the time series search, from asset and custom query tabs. **String** series' raw and latest values come back as text, readable in the table and state timeline panels. Numeric series gain the status aggregates: **Count (good / uncertain / bad)** and **Duration (good / uncertain / bad)**, the durations in milliseconds. The type is looked up when the query runs, so saved and provisioned queries are covered, and an aggregation the series' type does not accept fails the query with the list of those that work.
- **Time series**: the tab, previously **Time Series**, is named as in the CDF documentation and laid out in grouped rows, like the Records tab: the view and the time series (with its type chip), then **Data points**, read as **Aggregate** (with the aggregation, granularity and gap filling), **Raw** or **Latest**, in place of the Latest value switch and the None aggregation, then the **Activities** overlay with its view and **Times** (actual or scheduled) beside the switch, then the target unit and the label. The label, on this tab and the time series search, from asset and custom query tabs, is applied when the field loses focus instead of re-running the query on every keystroke. The **GraphQL** tab reads its data points with the same controls, so it can also fetch only the latest value. Saved queries are unchanged.
- **Time series**: **string** time series, which could only be read raw or as their latest value, can now be aggregated with Interpolation, Count and the status aggregates. Interpolated values come back as text, readable in the table and state timeline panels.
- **Time series**: **state** time series are supported. Raw states, the latest state and Interpolation keep each state's code and label it from the time series' state set, so the state timeline panel shows the labels in the set's order. **State duration**, **State count** and **State transitions** return one time series per state, named with a `{{state}}` label token or with the state appended. **Most time in state** gives the state held longest in each interval, leaving intervals without data empty. A **State set** button next to the time series lists its states: code, label and description. Count and the status aggregates work as on other time series.
- **GraphQL**: a **Query type** chooses what the panel fetches for the rows its query returns: the data points of **Numeric** (the default, so saved panels are unchanged), **String** or **State** time series, or **Instances**, the rows alone without data points. The aggregation list follows the type, so every aggregation offered works for every time series plotted; rows of other types are skipped, and a warning on the query row names them. String and state time series are handled like on the **Time series** tab, including the `{{state}}` label token. The **Examples** dialog shows how to filter on a time series' type and when to use each query type.
- **Activities**: the tab is laid out in grouped rows, like the Time series, Records and GraphQL tabs: the activity view; what the activities are **related to** (assets, equipment or time series), the view and space the instances are searched in, and the instances; which activities are **shown** (those active in the dashboard time range, as before, or all of them); then **Sort by** and **Columns** with the same pickers as Records, each property with its type. A new query shows every property of the view, then the instance properties (space, externalId, createdTime, lastUpdatedTime), which the pickers list last, marked; saved queries keep their columns.
- **Synthetic time series (Beta)**: a new tab computes synthetic time series from Core Data Model time series. Add **variables** that each stand for one time series, picked by name, or for the time series that match a filter on the view's properties, such as `name^='PT_', type='numeric'`. Dashboard variables work in filters without quotes: `name=$tag` matches any selected value, `assets!=$asset` leaves out the time series of the selected assets, and `=` and `!=` also take lists. Each variable has its own aggregate and unit. The **expression** combines the variables by name, for example `A * 2` or `avg(B) - A`, and CDF computes it. String time series work inside `map()`, which turns their values into numbers, with Raw data points. One variable can match several time series and gives one result for each; the others must match one time series, or be combined into one with `avg()`, `sum()`, `min()` or `max()`. A chip on each filter row shows how many time series it matches. **Filter syntax** and **Expression syntax** explain how to write both, and **Request preview** shows the requests sent to CDF. Both editors highlight what you type, suggest variables, functions, the view's properties and dashboard variables, and underline mistakes: a syntax error, a variable the expression uses but no row defines, or a property the view doesn't have. On by default; the **Synthetic time series** toggle turns it off per data source. The deprecated **Time series custom query** tab now points to it.
- The Core Data Model tabs say what went wrong where it went wrong. A view, space, record view or unit list that can't be loaded shows the reason under its field, and a failed time series search shows it in the dropdown. Before, the dropdown was simply empty. Text fields such as **Label** and **Limit** also apply on Enter, not only when you leave them. Dropdown placeholders too long for their field end in an ellipsis. The **Label** tooltip reads the same on every tab, and the **Synthetic time series** tab uses the same **Data points** control as the **Time series** tab.
- **GraphQL**: the query editor underlines mistakes as you type: syntax errors, and fields or arguments the data model doesn't have. Completions show whether they are a field, an argument or a value, and **Shift+Enter** saves and runs the query.
- Errors and warnings follow Grafana's own path. A failed query shows its error on the query row, on the panel and in Explore. Warnings, such as a capped number of time series or skipped ones, show as a warning on the panel, so people who only view the dashboard see them too. Error messages read as CDF wrote them, without an `[ERROR]` prefix. Failures that used to be logged only in the browser console now show up as well. Examples are a view, unit catalog or state set that can't be read, activities that fail to load, and a GraphQL schema that can't be fetched.
- Tooltips, placeholders and messages on the Core Data Model tabs read more plainly and name things the same way: "time series" is always two words, the search box says **Search time series by name or description**, and messages say what to do next.

### Bug fixes

- Error and warning messages, keywords and links in the query help, and the **Assets** variable query field no longer depend on CSS classes that Grafana 12 removed, so they are styled again on Grafana 12.
- **Time series**: picking another time series kept the previous one's target unit, so the query failed when the new series measured something else, or had no unit at all. The target unit is now kept only when the new series measures the same quantity.
- **GraphQL**: an error or warning for one of the panel's series, a failed datapoints request for example, never reached the query row, so the series was missing without explanation. Errors and warnings from the panel's series are now shown on the row, each once.
- **Time series aggregates**: when the time range did not start on a whole interval (a range from 10:43 with a 1h granularity, say), the first interval was dropped, so series started blank until the next one. An interval that overlaps the range is now shown.
- Data modeling requests are now tried once more after a temporary failure (a timeout, or a 502, 503 or 504 from the server). Rate limited requests are retried as before.

### Other

- The plugin no longer ships a Go backend. It was scaffolding that never handled a query, so the plugin is now frontend-only, as every query already ran in the browser. Queries, settings and dashboards are unchanged. With no Go code shipped, the Go vulnerabilities `govulncheck` reports for 4.6.0 (GO-2026-6809, GO-2026-6860, GO-2026-6866) no longer apply.

## 4.6.0 - October 14th, 2026

### Breaking changes

- The minimum supported Grafana version is now 10.4.7 (previously 10.0.0). Grafana 10.0.0–10.4.6 is no longer supported; the GraphQL editor is built on `@grafana/plugin-ui`, which requires it.

### Features

- **GraphQL**: the panel tab is rebuilt on Grafana's editor layout. The query sits beside a **Response** pane, and **Test query** sends the query as it will be sent when it runs, interpolation included, and shows the untouched response — so what a query returns can be checked without saving anything. An **Examples** dialog replaces the page of documentation that used to sit under the editor.
- **GraphQL**: a new panel query opens on the core data model with a query that runs as-is — the first 10 time series. Saved queries keep their own model and query.
- **GraphQL**: the panel tab now plots every row, or nested field, that the data model's schema says is a `CogniteTimeSeries` (or a type extending it) — selecting `space` and `externalId` is enough. Selecting `type` is no longer required; when it is selected, rows that are not `numeric` are skipped as before. Aliased fields (`ts: timeSeries { … }`) are recognised by their alias.
- **GraphQL**: the panel tab has a **Label** field naming each series from the response, interpolating any selected field with `{{field}}` — `{{name}} @ {{space}}`, say. Its tooltip lists the fields the current query offers, and a series reached through a relation can also use fields of the row it hangs off. Left empty, series keep the name they had. A field the response does not carry renders as `:field`, matching the Time Series tab's labels.
- **GraphQL variables can carry whole instances.** Select `space` and `externalId` on the same object in the query (the rows themselves, or one nested field), then choose the **Instance ID** value field; the variable then emits a JSON instance reference that can filter on a direct relation, single- or multi-valued.
- **Instance references work inside GraphQL queries.** In both the panel tab and a variable's query, `${asset}` (or `$asset`, `[[asset]]`) is written as a GraphQL instance argument (`{space: "…", externalId: "…"}`, or a list for a multi-value variable, **All** included), and `${asset.space}` / `${asset.externalId}` give one part of it. Variables holding anything else interpolate exactly as before.
- **The GraphQL panel tab and the GraphQL variable editor are now one editor.** Data model, version, query and response are laid out identically, explained by the same tooltips, and built from one shared component, so a fix to either reaches both. The dashboard-variable tab is renamed from **Data Modeling** to **GraphQL** to match.
- **Dashboard variables**: a new GraphQL variable opens on the core data model with a query that runs as-is — the first 10 assets, since a variable is usually picking assets. Saved variables keep their own model and query.
- **Dashboard variables**: an optional **Display text** field chooses which field the variable picker shows, independently of the value the variable carries. Left unset, the picker shows the value itself, so what the user sees is exactly what the variable emits.
- **Dashboard variables**: each tab follows its feature toggle, as the panel tabs do: **Assets** is offered when asset-centric features are on, **GraphQL** when the GraphQL feature is on. A variable already saved on either tab keeps that tab even when the toggle is off, so existing dashboards stay editable, and saved variables keep resolving regardless of the toggles.
- Variable queries now run through Grafana's current `CustomVariableSupport` API. Saved variables are unaffected.
- **Records (Alpha)**: a new query tab for reading records from streams, released as an alpha: it is off by default, is turned on per datasource with the **Records** toggle under the Core Data Model features, and may change before Beta. Pick a record view and its records come back as rows, with selectable columns, sorting and a result limit. Filters cover every property of the view: a direct relation gets a searchable instance picker when its view names a target, and filter values accept dashboard variables, including a variable holding instance references. Records are read from the dashboard time range, or from the whole stream when the time window is **None** (not offered on immutable streams, which require one). **Request preview** shows the exact request sent to CDF, dashboard variables filled in, ready to copy and replay.
- **Records**: an **Aggregate** mode returns server-side statistics instead of rows: up to four **Group by** levels (time histograms and unique values) and up to five metrics (count, average, min, max and sum). With a time histogram the result is one time series per group; without one it is a table.
- **Records**: unit conversion, to a unit system or per property, for properties whose view declares a unit. Columns and series name the unit their values are in, which can be switched off.
- **Records**: a **Custom** time window, bounded by expressions over `{{startTime}}`, `{{endTime}}`, `{{now}}` and the stream's `{{maxFilteringInterval}}`, for example `{{endTime}} - {{maxFilteringInterval}}`. Several queries can then each read one slice of a stream whose limit is shorter than the dashboard range.

### Bug fixes

- A GraphQL variable whose selected field was an object (such as `instanceId { space externalId }`) resolved to the literal string `[object Object]`. Object fields holding an instance reference now resolve correctly, and a failed query — GraphQL errors in the response, or the request itself failing — now fails the variable with the error message instead of leaving it silently empty.
- **Time Series**: a label token written with spaces inside the braces (`{{ name }}`) was rendered as an unknown field. Whitespace is now ignored, as it is in every other label.
- **GraphQL**: typing in the panel tab's **Label** or **Granularity** field re-ran the whole query on every keystroke. Both are now applied when the field loses focus.
- **GraphQL**: a dashboard variable used in the panel tab's **Label** was never interpolated, unlike every other tab's label. Interpolation is skipped when no label is set, which every query starts out as.
- **GraphQL**: a data model whose schema could not be introspected made the panel tab throw while building autocomplete. A failed introspection now simply leaves the editor without suggestions.
- **GraphQL**: an edit the parser rejects is reported beside the editor, and **Test query** waits until it is fixed; previously the panel kept running the last valid query with no sign that the text on screen was not it.
- **Dashboard variables**: opening the **GraphQL** tab on a variable saved as an assets query overwrote the asset expression with the GraphQL text, losing it. Each tab now keeps its own query, so switching between them — and saving from either — preserves both.
- **Dashboard variables**: an incomplete edit no longer clears a working variable, and a refused save now says why instead of appearing to succeed.
- **Dashboard variables**: reopening a saved GraphQL variable left the **Version** dropdown empty until the data model was picked again. Versions are now loaded for the saved model as the editor opens.
- **Dashboard variables**: choosing a data model or a version is saved straight away, rather than only when some other field happened to lose focus.
- **Dashboard variables**: the value-field list offered paths prefixed with the query's root field (`listCogniteAsset.name`), which never matched a result row and silently fell back to another field. It now offers the fields as they appear on a row (`name`, `instanceId.space`), and no longer offers pagination fields such as `hasNextPage`, which describe the page rather than a row.
- An error or warning shown under a query now clears when the query runs again, so it always describes the latest run. Before, it stayed on screen until the query was edited, even after a time range change had fixed the cause.
- The query editor's tab bar no longer ends in an extra, unnamed tab with nothing behind it.
- A query run from Explore could fail with "HTTP header is larger than 8192 bytes". Explore keeps the whole query in the page URL, and Grafana forwarded that URL to CDF as the `Referer` header, so a long query could push the request's headers past CDF's size limit. The plugin's routes now send an empty `Referer` instead.
- Closing a query editor subscribed its warning listener again instead of removing it, so listeners piled up each time an editor was opened and closed, and closed editors kept receiving warnings. Each editor now removes both its error and warning listeners when it closes, and follows a change of query letter (refId) without resubscribing.
- The backend is now built with Go 1.27.2, `grafana-plugin-sdk-go` v0.297.0 (`grpc` v1.84.0) and `golang.org/x/net` v0.61.0, which fix vulnerabilities in the Go standard library (`net/http`, `crypto/tls`, `html/template`, `net/textproto`) and in `x/net` that Grafana's plugin validator reported.

## 4.5.2 - August 25th, 2026

### Features

- CogniteTimeSeries labels now resolve `{{unit}}` against the unit the data points are actually returned in: the query's **Target Unit** when one is selected, otherwise the time series' storage unit
- All `CogniteUnit` properties are available on the token, e.g. `{{unit.symbol}}`, `{{unit.name}}`, `{{unit.description}}`, `{{unit.quantity}}`, `{{unit.externalId}}`
- A bare `{{unit}}` serializes the full resolved unit, so the properties available for dot notation are discoverable straight from the label
- The `CogniteUnit` catalog is fetched and indexed once per connection and shared between the Target Unit selector and label interpolation, so unit tokens don't add a request per query

### Bug fixes

- The unit catalog fetch now follows pagination cursors, so catalogs with more than 1000 units are fully available in the Target Unit selector and in labels

## 4.5.1 - May 4th, 2026

### Features

- Added support for mixed CogniteTimeSeries types (numeric, string, and state) in the CDM query editor
- Time series type is now displayed as a chip in the selection dropdown
- Aggregates selector is disabled for string type time series
- State time series shows a warning (support to be added in a future release)
- Added dynamic label interpolation for CogniteTimeSeries queries: the Label field now supports `{{property}}` tokens resolved against the selected instance's view properties at query time
- `{{space}}` and `{{externalId}}` tokens are always available; nested paths like `{{property.foo}}` are supported

### Bug fixes

- Tightened unit validation: only structured `unit` direct relations are treated as resolvable storage units; free-text `sourceUnit` values are no longer surfaced in the Target Unit field
- Storage unit is now displayed as a badge next to the Target Unit selector instead of inline text next to the search field

## 4.5.0 - April 27th, 2026

### Features

- Added **Activities** query editor tab for querying CogniteActivity records by resource type (Asset, Equipment, TimeSeries)
- Added CogniteActivity annotations overlay on CogniteTimeSeries charts, displayed as shaded regions with start/end times
- Added automatic numeric time series detection in the Data Models (GraphQL) tab, auto-triggering the CDF datapoints API for matching results
- Overhauled datasource config editor: reorganized into **Connection** and **Features** tabs, CDM features now enabled by default for new datasources, CDM and asset-centric (legacy) toggles are mutually exclusive
- Base URL field now strips `http(s)://` prefixes and trailing slashes automatically to prevent misconfigured proxy URLs
- Query editor dropdowns (CDM Time Series and Activities) now load options lazily on menu open
- Relationships feature is now off by default for new datasources

### Bug fixes

- Fixed broken Cognite documentation URLs in annotations editor, query help, variable query editor, and shared constants
- Improved UX copy and tooltip text across config editor and query editors for clarity and consistency

### Security

- Updated lodash to v4.18.1 to address CVE-2025-13465
- Updated webpack to v5.104.1 to address CVE-2025-68458

## 4.4.0 - November 12th, 2025

### Features

- Added CogniteTimeSeries Search Tab for improved time series discovery and selection
- Reorganized feature flags UI with master toggles and improved query editor experience
- Added GraphQL variables support with tabbed interface for enhanced data model querying capabilities

### Bug fixes

- Updated plugin dependencies to address security vulnerabilities and compatibility issues

## 4.3.0 - April 24th, 2025

### Features

- Updated plugin GUI components to accomodate for Grafana v12 changes
- Preliminary work to enable backend data source in the future

### Bug fixes

- Upgraded plugin dependencies

## 4.2.1 - November 28th, 2024

### Bug fixes

- Upgrade plugin dependencies to fix CVEs

## 4.2.0 - June 17th, 2024

### Features

- Adds time zone support for aggregated time series, the user can select the timezone using the Grafana time range options.

## 4.1.3 - May 7th, 2024

### Bug fixes

- Fixed performance issue with parser which occurs when a fairly long custom time series query is used.

## 4.1.2 - March 14th, 2024

### Bug fixes

- Fixed an issue with Events resource timestamp columns where it was previously displayed in epoch format and now it is displayed in human-readable format

## 4.1.1 - February 14th, 2024

### Bug fixes

- Fixed an issue with the custom query where floats with more than 7 digits after the decimal point were causing syntax error

## 4.1.0 - February 7th, 2024

### Features

- Added new time series property `unitExternalId`
- Added support to filter time series by `unitExternalId` and `unitQuantity` in custom queries
- Added support to query data points with unit conversion in custom queries
- Small UI improvement to the query field in the custom query tab

### Bug fixes

- Patched plugin dependencies to fix deprecation errors

## 4.0.1 - November 7th, 2023

### Bug fixes

- Patched regressions introduced after the migration to React:

  - Events table `activeAtTime` filter is now working as before
  - Annotations filters are applied correctly as before
  - Added back hints and examples for annotation query

- Multiple dependencies have been updated to fix security vulnerabilities

## 4.0.0 - October 12th, 2023

### Features

- Migrate Annotation editor from Angular to React
- Bumped minimum Grafana version requirement to v10
- Events are returned in dataframe format

## 3.1.0 - May 10th, 2023

### Features

- Added support for the new version of CDF Data Models (GraphQL)
- Added an option to sort Events table

## 3.0.1 - April 3rd, 2023

- Patched plugin dependencies
- Fixed the wording for the CDF host paramether in the plugin configuration

## 3.0.0 - November 21st, 2022

- The connector dependencies has been updated and the connector now requires Grafana v8 or later.
- [Flexible Data Modelling](https://hub.cognite.com/groups/flexible-data-modeling-early-adopter-208) is now added as a preview feature. You need enable it on the data source settings. The plugin will visualize tables and time series which has been modelled in Cognite's new Flexible Data Model
- [Extraction Pipelines](https://docs.cognite.com/cdf/integration/guides/interfaces/about_integrations) is added as a preview feature. You can now see the latest status of your extraction pipelines and runs inside Grafana.
- Advanced filtering of events now also supports aggregates.
- Variables created with an asset-query can now return `externalId` and `name` as value in addition to `id`. This is useful when using a variable inside FDM graphQl query.

## 2.6.0 - August 4th, 2022

### Kubernetes grafana operator support

- The connector now supports being used with the Kubernetes [Grafana operator](https://github.com/grafana-operator/grafana-operator) as the [GrafanaDataSource CRD](https://github.com/grafana-operator/grafana-operator/blob/master/documentation/datasources.md). In the operator you specify the Cognite project in `defaultProject` parameter and the API URL as the `clusterUrl` parameter. In the operator you can specify a data source using the syntax below:

```
datasources:
  - access: proxy
    editable: false
    isDefault: true
    jsonData:
      clusterUrl: westeurope-1.cognitedata.com # other examples are api.cognitedata.com, az-eastus-1.cognitedata.com etc
      defaultProject: <cdf-project>
      oauthPassThru: true
    name: CDF
    type: cognitedata-datasource
name: cdf.yaml
```

### Advanced filter support for events (alpha)

- Advanced filtering support for events have been added as separate input box in the events tab. Enable this in the data source settings.
- [API documentation](https://pr-ark-codegen-1444.specs.preview.cogniteapp.com/v1.json.html#operation/advancedListEvents)

### Relationships updates

- All drop downs in the relationships tab are now sorted and searchable

## 2.5.0 - June 1, 2022

### Relationships support

- The connector now supports the CDF relationships resource type. Read more about relationships at [Relationships documentation](https://docs.cognite.com/dev/concepts/resource_types/relationships).
- With relationships support you can now fetch time series based on relationships in the "Time series from asset" tab. Relationships can be filtered on data set, labels and active relationships based on the time filter selected in Grafana.
- A new relationships tab has been added which can be used to utilize Grafana's Node Graph visualization plugin, or a new (alpha) custom visualization plugin which can be found at [cognite-grafana-relationships-visualization](https://github.com/cognitedata/cognite-grafana-relationships-visualization)

### Templates support (preview)

- A new templates tab has been added which support the CDF templates feature (preview). Enable this in the data source settings.
- Using templates with Grafana will allow you to dynamically scale your dashboards when adding equipment.
- Documentation: https\://docs.cognite.com/dev/concepts/resource_types/templates

## 2.4.0 - August 20, 2021

### Features

- OAuth 2.0 client credentials grant flow to authenticate and authorize against CDF.

## 2.3.0 - June 1, 2021

### Features

- Ability to link variables so that the value of one variable can be used as an input to another.

## 2.2.0 - April 6, 2021

### Features

- Tabular representation of events data.
- Event annotation query shows unfinished events by default.
- Support for OAuth authentication with CDF.
- Option to fetch only the latest data point for the time series.

## 2.1.1 - November 23, 2020

### Bug fixes:

- Support variables in `time series by asset` query. In version 2.1.0 `$variable` used as an `Asset tag` worked for earlier created dashboards, but it was impossible to create a new panel with the same capability.

## 2.1.0 - November 19, 2020

- The data source requires Grafana version `7.0.6` or above.
- Time series are now saved to dashboards by their `externalId` where possible. This allows you to switch between CDF projects that contain time series with matching `externalIds`.
- Support for [synthetic time series alignment](https://docs.cognite.com/dev/concepts/resource_types/synthetic_timeseries.html#alignment).
- Rewrote data source GUI to React.
- Updated CDF logo to match light/dark theme.

## 2.0.1 - August 25, 2020

### Bug fixes:

- **\[Custom query]** Option to display legend label as a plain text instead of expression

  Example for query: `ts{id=1} + ts{id=2} + 1`:

  - User label `custom name` results in `custom name` label. (No specific timeseries referenced in the label)
  - User label `{{name}}` results in `timeseries_name_1 + timeseries_name_2 + 1` label. (This works the same way as before)

- **\[Custom query]** Improved error handling

  - HTTP 500 errors messages are visible from the GUI

- **\[Custom query]** Default granularity falls back to 1 second if shorter value is provided

  - Previously, selecting a time span less than 10 minutes resulted in a HTTP 400 error.

## 2.0.0 - June 29, 2020

### General improvements

- A new query language inspired by PromQL and compatible with synthetic time series in CDF. [Learn more](https://docs.cognite.com/cdf/dashboards/guides/grafana/timeseries.html#custom-queries).
- Support for all filtering capabilities available in [CDF API v1](https://docs.cognite.com/api/v1/) for the respective resource types (assets, events, times series).
- Any future **filtering** capabilities added to CDF API v1 will be **automatically supported** by the data source (filters are passed directly to CDF).
- Query expressions resulting in errors now **displays error messages** in the UI.
- Regular expressions filtering can be used as part of the **Query** expression. The **Filter** field has been removed.
- Supports CDF [API v1](https://docs.cognite.com/dev/API_versioning.html#current-api-versions), with no dependency to older API versions.
- [New documentation section](https://docs.cognite.com/cdf/dashboards/guides/grafana/getting_started.html) for the connector, covering installation and administration, upgrades, feature documentation and getting started information.
- Compatibility with Grafana 7.0. Learn more about the new capabilities [here](https://grafana.com/blog/2020/05/18/grafana-v7.0-released-new-plugin-architecture-visualizations-transformations-native-trace-support-and-more/?isource=hp).

### Time series and custom queries

- You can now access time series that don't have the `legacyName` attribute populated with the data source.

- Setting `Root Asset` in the **Custom query** tab is no longer required. This filter has been removed from the UI and is now available as part of a custom query expression. For example: `ts{rootAssetIds=[12335453, 3455566]}`.

- Custom query aggregation requests are less likely to trigger rate limiting in CDF API.

- Functions:

  - Support for **string time series** through the new `map` function allows you to convert string values to numeric values which can then be plotted by Grafana. For example: `map(ts{externalId='pump_29'}, ['OPEN', 'CLOSED'], [1, 0], -1)`.
  - Use the `on_error` function to gain control over query calculations resolving with errors, such as division by 0. The function allows you to set a default value for individual data points that resolved with errors. Without the `on_error` function, the chart shows empty space in those places. Example: `on_error(1/ts{externalId='canBeZero'}, 0)`.
  - Variable length functions: `max(x1, x2, ...)`, `min(...)`, `avg(...)`.
  - The `power` function has been renamed to `pow`.
  - These functions are no longer supported: `acos`, `asin`, `atan`, `ceil`, `celing`, `cot`, `degrees`, `floor`, `log`, `log2`, `log10`, `radians`, `sign`, `tan`, `atan2`, `mod`, `truncate`, `rand`, `crc32`, `conv`, `div`.

- These aggregates are no longer supported by custom queries: `max`, `min`, `count`, `sum`, `continuousVariance`, `discreteVariance`, `totalVariation`.

- Short names for aggregation functions are no longer supported. Use full names instead: `average`, `interpolation`, `stepInterpolation`.

- The `timeseries{options}` function has been renamed to `ts{options}`.

- Filtering:

  - New options:`isString=false`, `externalId='my_id'`, `id=123`, `externalIdPrefix='my_'`
  - Relate to asset tree with: `assetSubtreeIds=[{id=754173880412890},{externalId="23-TE-96148"}]`, `assetIds=[123, 234]`, `assetExternalIds=['pump_1', 'pump_2']`, `rootAssetIds=[123, 234]`
  - New range filters for create and updated time: `createdTime={min=0, max= 1593018651}`, `lastUpdatedTime={min=1493018651, max= 1593018651}`
  - Select time series based on dataSet membership: `dataSetIds=[{externalId='Prediction Model A'},{id=123}]`
  - `path` is no longer supported
  - See the full list of [supported filters](https://docs.cognite.com/api/v1/#operation/listTimeSeries) for the `ts{}` expression.

### Annotations

- New filters: `assetExternalIds`, `rootAssetIds`, `dataSetIds`, `externalIdPrefix`, `source`.
- Find active events in range with the `activeAtTime` filter. If `endTime` is null, the event is active from `startTime` onwards. The `activeAtTime` filter will match all events that are active at some point from `min` to `max`. Example: `activeAtTime={min=1591018651, max= 1593018651}`.
- `description` supports only regular expression operators `=~`, `!~`, and `!=`.
- `minStartTime`/`maxStartTime` has been replaced by the `startTime={min=0, max= 1593018651}` filter.
- `minEndTime`/`maxEndTime` has been replaced by the `endTime={min=0, max= 1593018651}` filter, enabling you to also filter for events without the `endTime` set: `endTime={isNull=true}`.
- `minCreatedTime`/`maxCreatedTime` has been replaced by the `createdTime={min=0, max= 1593018651}` filter.
- `minLastUpdatedTime`/`maxLastUpdatedTime` has been replaced by the `lastUpdatedTime={min=0, max= 1593018651}` filter.
- `assetSubtrees` has been replaced by the `assetSubtreeIds=[{id=754173880412890},{externalId="23-TE-96148"}]` filter which introduces support for `Id`/`ExternalId` input.
- These filters are no longer supported: `sort`, `dir`, `limit`, `offset`, `sourceId`.
- See the full list of [supported filters](https://docs.cognite.com/api/v1/#operation/advancedListEvents) for the `events{}` expression.

### Templating

- New filters: `parentIds`, `parentExternalIds`, `rootIds`, `dataSetIds`, `externalIdPrefix`, `root`.
- The `description` field supports only regular expression operators `=~`, `!~`, and `!=`.
- Select assets based on **label**: `labels={contains={externalId="pump"}}`, `labels={containsAny=[{externalId="pump_type_A"},{externalId="pump_type_B"}]}`, `labels={containsAll=[{externalId="pump"},{externalId="rust_detected"}]}`
- `assetSubtrees` replaced by the `assetSubtreeIds=[{id=754173880412890},{externalId="23-TE-96148"}]` filter which introduces support for `Id`/`ExternalId` inputs.
- `minCreatedTime`/`maxCreatedTime` has been replaced by the `createdTime={min=0, max= 1593018651}` filter.
- `minLastUpdatedTime`/`maxLastUpdatedTime` has been replaced by the `lastUpdatedTime={min=1592222651, max= 1593018651}` filters.
- These options are no longer supported: `query`, `sort`, `dir`, `offset`, `boostname`, `path`, `depth`, `sourceId`.
- See the full list of [supported filters](https://docs.cognite.com/api/v1/#operation/listAssets) for the `assets{}` expression.

### Other

The **Cognite Data Source for Grafana 2.0.0** is compatible with CDF [API v1](https://docs.cognite.com/dev/API_versioning.html#current-api-versions).

Cognite Data Source for **Grafana 2.0.0 is not backward compatible** with dashboards created using older versions of the connector. Follow the steps in the [**upgrade guide**](https://docs.cognite.com/cdf/dashboards/guides/grafana/upgrade.html) to upgrade your existing installation.

## 1.0.1 - May 27, 2019

- Rename Cognite Data Platform to Cognite Data Fusion.
- Allowing for templating variables to be used anywhere in custom queries.
- Allowing for the base url to be modified when adding a new data source.

### Other

The **Cognite Data Source for Grafana 1.0.1** is compatible with CDF [API 0.5](https://docs.cognite.com/dev/API_versioning.html#current-api-versions).

## 1.0.0 - March 26, 2019

- Fixing templating so that repeated panels/rows work properly.

- Changing checkboxes to Grafana checkboxes and adding **Select All** option.

- Fixing data source configuration to verify the project name.

- **Breaking change**: `function=` inside of `timeseries{ ... }` no longer works for custom queries. Instead, functions are now applied outside of `timeseries{}[]` such as:

  - `(timeseries{description=~".*TEMP.*"}[avg] - 32) * 5/9`
  - `sum(timeseries{name=~".*VALUE"}[count,1d])`
  - `max(timeseries{metadata.on="True"}[count,5m]) - min(timeseries{metadata.on="True"}[count,5m])`

### Other

The **Cognite Data Source for Grafana 1.0.0** is compatible with CDF [API 0.5](https://docs.cognite.com/dev/API_versioning.html#current-api-versions)
