Visual Studio Code Extension for creating Dynatrace AppsThis extension helps developers accelerate their work by creating, testing, and debugging Dynatrace apps. Overview | Requirements | Installation | Building an app using the Dynatrace App Toolkit | Querying data from within extension | Support and Feedback | License OverviewBuild smarter and faster for the Dynatrace platform: The Visual Studio Code Extension "Dynatrace Apps" helps developers create, test, and debug Dynatrace apps. The extension supports the following functionalities: RequirementsBefore you start, be sure you meet the following requirements:
InstallationYou can install the extension from the Microsoft Visual Code Marketplace or directly from the extensions tab inside your Visual Studio Code IDE. Building an app using the Dynatrace App ToolkitThe Dynatrace App Developer Extension wraps important functionality from the Dynatrace App Toolkit, such as configuring or starting the server, building and deploying apps or generating app functions. Configure your appYou can define all necessary options from the app manifest using the provided Test your new app without (re)deploymentUsing the built-in Dynatrace development server you can quickly review changes to your app by reloading the browser instead of deploying a new app version. You can start the development servers, which runs on Building and deploying appsSelecting Stay up to date with your dependenciesWhen selecting Generate app functionsApp functions represent the backend, including all the business logic, of a Dynatrace app. They're used for requirements such as accessing third party APIs, heavy data processing and manipulation or capsuling functionality that need elevated access rights. You can create a new app function by clicking on Once the wizard is finished, it creates a file in the Querying data from within extensionThe Dynatrace extension enables you to query live data stored in Grail directly in VS Code using the Dynatrace Query Language (DQL). Setting up query supportFirst, you need to create a After the new file has been created (for example The status bar displays the currently logged on user when the connection is established: Your project is now ready to query live data from your environment. Writing DQL queriesThe Dynatrace Query Language (DQL) is a powerful tool to explore, filter, and aggregate data stored in Dynatrace. To query data from within the IDE, you need to open the file created in the previous step (
When you start typing, the autocompletion will suggest available DQL commands. You can always preview the query result by clicking the After selecting a timeframe… …the query will be sent to your Dynatrace environment and display the result in a new editor window: You can also create multiple queries to trigger them individually or use within TypeScript (see below). To do so, you need to add a name for each of them:
Calling dynamic queries from within your appWith this extension you can also easily create TypeScript functions to dynamically query data from within your Dynatrace app. Each query is exposed by its given name. You can also add parameters to create dynamic queries by adding a
Once this is done, you can then import and call this function from within your app using the following code:
Please note: Permissions 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, include the query scope in your [ Support and FeedbackTo get support or share your feedback, please head over to our Developer Community. LicenseDynatrace Apps is licensed under the Apache 2.0 License. You may obtain a copy of the license at http://www.apache.org/licenses/LICENSE-2.0 |