Releases: dynatrace-oss/intellij-idea-dql
v1.5.0
Features
- Small UI improvements:
- DQL fragment selected during the query execution will now have a green border instead of a selection background
- Adding data toolbar for DQL execution results opened as a new editor tab
- Adding an option to change the DQL execution results column order and visibility
- Adding predefined timeframes to the DQL execution toolbar (user can still define a custom one)
- The DQL execution result will show an empty cell for a boolean column that had a
nullvalue (instead of the
unchecked checkbox). This change helps to differentiate betweenfalseandnullvalues. - All executed DQL queries will be grouped in the
Servicestab. The root group allows the user to easily access the
most common settings related to DQL execution. All queries will be additionally grouped by the tenant they were
executed with, allowing the user to easily find the query they are looking for in case of using multiple connected
tenants. - Double-clicking the executed DQL query in the
Servicestab will now either open the related file (if possible),
or open a new DQL query console with the execution context. - Switched to a new Inlay provider. The user can now change inlay settings in
Settings>Editor>Inlay hints>
Other>DQL. - Added an option to toggle validating the DQL query on Dynatrace tenant after each change to the file. Previously
only available globally in the plugin's settings, now the option will appear on the DQL Execution Toolbar and allows
the user to easily toggle the validation for each file separately.
- The "Show DQL query" option when executing DQL will now try to show the parsed query instead of the raw one, if
possible. - Adding support for "Expression DQL" file (with
.dqlexprextension), which allows to define a DQL expression without
the command context.
Such expression are commonly used in as-a-code DQL queries or in OpenPipeline configurations.- An example file
file.dqlexpr:matchesValue(field, "value") and not matchesValue(field, "otherValue"). - All code style & highlighting settings will be inherited from the DQL language.
- All suitable DQL inspections will be applied to the expression, allowing the user to validate them.
- Code completion and hover documentation are also supported.
- An example file
- Adding support for the "Partial DQL" file type (with
.dqlpartextension). This language works similar to
the previous.partial.dqlfiles, but allows for an easier separation from the normal DQL file.- Added a quick fix to migrate from the old
.partial.dqlsuffix to the new.dqlpartextension. - Works exactly like a normal DQL file, but allows to use non-starting commands like
filterorsortas the first
statement in the query, without causing an error. - An example
file.dqlpartfile:filter field > 10 | sort field desc - Support for
.partial.dqlfiles will be removed in the future, so it's recommended to migrate to the new extension
as soon as possible.
- Added a quick fix to migrate from the old
- Breaking: Changing the approach to the default Dynatrace tenant used for connections - it will be the first tenant
specified in the list (previously the user needed to specifically select the default one). Please update the tenants
order if you wish to change the default tenant. - Created Wiki pages with documentation for the plugin features
- DQL now supports complex sorting expressions (for example,
sort abs(field) > 10 desc) - DQL now supports
/* language=X */comments in strings - Added missing quick fixes for inspections:
- Dropping DQL commands and functions for unknown & experimental expressions
- Renaming the DQL file to
.dqlpartwhen an invalid command context is detected (only for.dqlfiles) - Renaming the DQL file to
.dqlexprwhen the DQL file contains an expression without the command context
- Adding a Dynatrace Query Console view that allows the user to execute DQL queries without opening a DQL file.
You can open the console via theTools->Services->Dynatrace Query Consolemenu or by clicking the dedicated
button in theServicestab. - Updated DQL functions & commands database
Bug fixes
- Creating an empty DQL variable using the
$type: dqlsyntax will now create a multiline comment instead of causing an
error. - When modifying or deleting a Dynatrace tenant that was already used, files using it will require the user to select
a new tenant. - Using periods (
-1yfor years,-1qfor quarters, or-1wfor weeks) in relative timeframes will now work properly.
v1.4.0
Features
- DQL now supports HEX representations (for example
0x1A3F) for numbers - Autocompleting aliases for commands in DPL (for example, both short notation
INTand the long oneINTEGERwill be
shown during the autocompletion). Added the missing aliasBOOLfor theBOOLEANcommand. - DPL now supports line (
//) and block (/* */) comments. - DPL now supports SI number (scientific notation, for example (
1e23)) and HEX representations (for example,
0x1A3F). - DPL now supports "meta" expressions that allow converting the found value into a different type, for example:
(('t' <true>:is_found) | ('f' <false>:is_found))will converttintotrueandfintofalse. Added code
style & highlighting settings for such expressions. - When a part of DQL query is selected when executed, the selected fragment will be shown as the default option.
- The DQL execution metadata now appears as a tab in the service panel instead of a separate tab.
- Adding an option to open DQL results as a new tab after executing the query.
- Improved the DQL execution errors panel. The plugin will now show more details about the reason for an unsuccessful
execution. - Reworked hover documentation for both DQL and DPL. The documentation pop-up will now show more details about
expression, their parameters & types or possible values. The UI for both languages docs has been unified. - Gutter icon for executing DQL queries now appears also on DQL subqueries. Replacing the plugin setting
to toggle gutter icons visibility with a dedicated IntelliJ view to manage all gutter icons in the project
(Editor->General->Gutter icons). - Gutter icon for injected DQL fragments will show the DQL execution management toolbar after clicking the action
button, allowing the user to overwrite the query configuration for the fragment.
Bug fixes
- [#87] Avoiding outdated document modifications during injected fragments reformat action
- DPL configuration expression will now be properly indented on the left side of the expression
v1.3.0
Features
-
Major rework for the DQL execution
- Executing DQLs no longer requires the user to create a Run Configuration - each file will have its own context
stored in memory. The user can still create a run configuration to save settings inside IntelliJ project. If they
do, the initial configuration for the file will be loaded from the correlated run configuration. - Adding a DQL toolbar at the top of each DQL file (similar to
.sqlfiles). The toolbar allows the user to set up
the Dynatrace context used for the file (to run, verify & autocomplete the query). For injected DQL fragments, the
gutter icon will be shown, allowing the user to execute the query. Both are optional and can be enabled/disabled
in the plugin's settings. - The user can now show the executed DQL fragment and switch between the JSON and table mode to show the execution
result. - Allowing the user to execute a smaller DQL fragment via text selection and nested DQL queries. In such cases
a popup menu will be shown to the user allowing to select which part of the DQL file should be executed.
- Executing DQLs no longer requires the user to create a Run Configuration - each file will have its own context
-
Autocompleting parameter values in all suitable places (for example, in nested expressions of different types)
-
Added autocompleting string quotes in suitable places
-
Adding support for scientific notation numbers in DQL (for example,
1.3e20) -
Adding support for calculating the expressions data types for supported operators (if possible, for example:
long+
long) -
Added support for fields named via the
aliasparameter. Added an intention to replacealiaswith
assigned expression (=) -
Replacing manual inspections with automatically generated based on the DQL JSON definition
-
Added support for known Dynatrace Dashboards variables (
$variable) replacement for live Notebooks autocompletion
and inspections -
Adding support for replacing DQL variables with DQL query fragments (for example:
now() - 4h). To limit the risk of
code injections, the fragment must be explicitly set up using the object with the$type: dqlproperty:{ "variableName": { "$type": "dql", "dql": "now() - 4h" } }If the
dqlproperty is not a string, the whole object will be parsed as DQL object. -
When the plugin encounters any issues during the DQL query verification or autocompletion (connecting to the Dynatrace
tenant), an error balloon notification will be shown to the user containing the error details. Previously it was just
silently ignored by printing the error in IntelliJ logs.
v1.2.0
Features
- Reworked DQL engine to support a better JSON format with the language definition
- Added more inspections related to:
- nested negations in conditions (
not (not true)could be simplified to justtrue) - negated filtering conditions (
filter not truecould be replaced withfilterOut true) - parameter value types (subqueries, fields identifier etc.)
- disjointed variadic parameters definitions
- migration from
fetch metric.seriesintometricscommand
- nested negations in conditions (
- DPL will now be injected within all supported DQL function strings
- Added support for experimental DQL features (to be enabled in plugin's tool settings)
- Added search operator
~code style settings - Added intentions to DQL:
- Splitting and joining consecutive
filterandfilterOutcommands
- Splitting and joining consecutive
Bug fixes
- Field accessor (for example,
field[0]) will now be properly indented
v1.1.0
Features
- Added support for DQL comments style settings
- Added support for Smartscape functions to DQL
- Added support for other JetBrains tools (like WebStorm)
- Added support for a
bucketparameter inside DQLfetchandtimeseriescommands - Added support for Dynatrace Pattern Language files (
.dpl)- The support is also automatically added to the DQL
parsecommand - Customizable syntax highlighting
- Local code inspections with quick fixes if possible
- Customizable code style support — enforcing indents, line breaking and spaces around elements
- Advanced code completion
- Hover documentation
- Useful intentions for managing DPL expressions
- The support is also automatically added to the DQL
v1.0.4
v1.0.3
Bug fixes
- #7: Fixing the
ClassCastException: PsiPlainTextFileImpl cannot be cast to class pl.thedeem.intellij.dql.DQLFile
error that occurred when injecting DQL into other types of files like Markdown (DQL blocks) or Java
(/* language=DQL */injections).
Other
- Improving error handling for Dynatrace REST API calls. The user will now see more details for errors like an invalid
url or an unknown HTML response. Errors will now also be logged, which will be helpful when supporting users
v1.0.2
v1.0.1
- Fixing the
Cannot invoke "java.util.Set.iterator()" because the return value of "pl.thedeem.intellij.dql.definition.DQLOperationTarget.getOperatorType()" is null
error
v1.0.0
Added
- Initial version of the plugin
- Adding support for Dynatrace Query Language files (
.dql):- Customizable syntax highlighting
- Local code inspections with quick fixes if possible
- Customizable code style support - enforcing indents, line breaking and spaces around elements
- Advanced code completion
- Hover documentation for commands, parameters, and functions
- Added an option to connect to a Dynatrace tenant, which allows to:
- perform live validations on all DQL files (meaning detecting the same issues as in Dynatrace Notebooks)
- execute DQL queries and show results as a table directly in IntelliJ IDEA
- autocomplete DQL fields
- Partial files support
NAME.partial.dql:- disables live validations and inspections related to query completeness (like missing the data source command or
starting with the|symbol) - very helpful for projects containing a lot of dynamically joined DQL queries
- disables live validations and inspections related to query completeness (like missing the data source command or
- Variables support for DQL queries:
- special support for DQL queries stored for Dynatrace Dashboards which allows the user to define global variables
that are automatically replaced within queries - the plugin adds support for
dql-variables.jsonfile that contains the static placeholder value that will replace
the variable - the file is loaded in a hierarchical order: from the same directory, then to the parent one, etc.
- the file supports specifying
record(JSON object),array(JSON array),string,boolean,number, and
nulltypes.
- special support for DQL queries stored for Dynatrace Dashboards which allows the user to define global variables