Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Dynatrace AppsNew to Visual Studio Code? Get it now.
Dynatrace Apps

Dynatrace Apps

Dynatrace

|
3,042 installs
| (11) | Free
Extension to the Dynatrace App Toolkit for a more convenient developer experience.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Visual Studio Code Extension for creating Dynatrace Apps

This extension helps developers accelerate their work by creating, testing, and debugging Dynatrace apps.

Version Installs Downloads Ratings

Overview | Requirements | Installation | Building an app using the Dynatrace App Toolkit | Querying data from within extension | Support and Feedback | License

Overview

Build 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:

  • Authentication
  • Building an app using the Dynatrace App Toolkit
    • Configure your app
    • Test your new app without (re)deployment
    • Building and deploying apps
    • Stay up to date with your dependencies
    • Generate app functions
  • Querying data from within the extension
    • Writing queries
    • Calling dynamic queries from withing your app

Requirements

Before you start, be sure you meet the following requirements:

  • Visual Studio Code version 1.85.0 or higher.
  • A VS Code Dynatrace app project containing an app.config.json configuration file in the root directory.
  • A Dynatrace account and user: If you're new to Dynatrace, go to our website to learn more about our offering and sign up for a free trial.

Installation

You can install the extension from the Microsoft Visual Code Marketplace or directly from the extensions tab inside your Visual Studio Code IDE.

Authentication

The Dynatrace App Developer Extension requires two authentication tokens:

App Token

For development operations like starting the development server and executing app functions. This token needs the permission app-engine:functions:run, which must be defined in both app.config.json and your user permissions.

CLI Token

For deployment and DQL (Dynatrace Query Language) operations. This token requires the following permissions in your user settings:

  • app-engine:apps:install for deployment and publishing
  • For all DQL operations (verification, autocomplete, and execution) you need to have at least one of:
    • storage:logs:read
    • storage:events:read
    • storage:metrics:read
    • storage:bizevents:read
    • storage:spans:read
    • storage:entities:read
    • storage:system:read

Building an app using the Dynatrace App Toolkit

The 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 app

You can define all necessary options from the app manifest using the provided Configure app functionality. This includes meta data such as app ID or app name as well as scopes or content security policies.

AppConfiguration

Test your new app without (re)deployment

Using 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 localhost, from the command panel in the sidebar. Browse the documentation to investigate additional options of the server.

Building and deploying apps

Selecting Build app runs the npx dt-app build script to create the app bundle and run validation checks. Have a look at the documentation to explore additional build options Clicking on Deploy app performs a build and deploys the app to your connected development environment.

Stay up to date with your dependencies

When selecting Update dependencies, the extensions runs the npx update command to check if there are any new Dynatrace packages available on npm, and allows to install them.

CommandPanel

Generate app functions

App 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 Generate app function and enter a name. After that a script is executed, which creates a file in the api directory of your app and exposes the new function in the respective App Function section.

Once the wizard is finished, it creates a file in the api directory of your app and exposes the new function in the respective “App Function” section. From there, it can be easily tested using mocked parameters.

Dynatrace Apps Terminal Generate Function Output

Querying data from within the extension

Writing DQL queries

The 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 create and open a file with a .dql postfix (logQuery.dql) and insert your query. Below, you can see an example DQL statement that shows the first 100 log entries:

fetch logs
| limit 100

When you start typing, the autocompletion will suggest available DQL commands.

basic dql query

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:

@name("GetLogs")
fetch logs
| limit 100

@name("GetSevereLogs")
fetch logs
| filter loglevel == "SEVERE"

Calling dynamic queries from within your app

With 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 @param('fieldname', 'defaultValue') annotation.

use query in code

Parameter Data Types

Typically, parameters are handled as strings and incorporated into the DQL query by substituting the placeholders.

Number
@name('getLogsNumber')
@param('number', '100')
fetch logs | limit {{number}}
String
@name('getLogsForIP')
@param('ip', '192.168.0.1:3300')
fetch logs | filter contains(content, "{{ip}}")
String Array
@name('getLogsPGs')
@param('processGroupsArray', '"PROCESS_GROUP-1234", "PROCESS_GROUP-5678"')
fetch logs
...
| fieldsAdd pgs = array({{processGroupsArray}})
| filter in(pgs, dt.entity.process_group)
Number Array
@name('numberArray')
@param('numberFilterArr', '4,5,6,7')
data record(val = 2), record(val = 3), record(val = 5)
| fieldsAdd numbers = array({{numberFilterArr}})
| filter in(numbers, val)

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 [app.config.json].

Support and Feedback

To get support or share your feedback, please head over to our Developer Community.

License

Dynatrace 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

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft