Your companion for building Dynatrace Apps
Dynatrace Apps Visual Studio Code extension helps you to speed up Dynatrace app development.
The extension can be installed from the Microsoft Visual Code Marketplace or directly from the extensions tab inside your VSCode IDE.
For full DQL support, create a
After the new file has been created, you need to open the newly created file (for example
The extension now connects to the environment specified in the
Your project is now ready to query live DQL data from your environment.
Writing DQL queries
The Dynatrace Query Language (DQL) provides a powerful way to query, filter, and aggregate data. You can get started using this functionality in your IDE by creating your first query in the file we previously created in the last step (
To support you in writing queries, the IDE's autocompletion will suggest possible DQL commands. You can preview the query result by selecting the
In the next step, you can select the timeframe for the preview query.
After you have selected your timeframe, it triggers the query to your environment and the result will be displayed in a new editor window:
Write multiple queries
Using DQL queries in TypeScript
To make DQL queries easily re-usable in your code, the extension automatically generates a TypeScript function for each query based on the given name.
The extension has all permissions to query DQL data, so the preview function returns data immediately. When you use the generated typescript function for this query, make sure to include the query scope in your
To use the queries with parameters, you can add a
You can then import and call the generated function in your app code:
For further information, please refer to the Dynatrace Developer Portal.