Build & Deploy
- Build โ Create production bundle
npx dt-app build - Deploy โ Upload to your Dynatrace environment
npx dt-app deploy - Install โ Users install from Dynatrace Hub and grant scopes
๐ก Bump version in app.config.json before each deploy. Dynatrace stores multiple versions.
App Settings for Secrets
Never hardcode API keys. Use app settings:
import { settingsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const settings = await settingsClient.getSettingsObjects({
schemaIds: "app:my.app:settings"
});
const apiKey = settings.items[0].value.apiKey;
Pre-Deploy Checklist
| Check | Why |
|---|---|
| โ Scopes declared in app.config.json | Missing scopes = API calls fail silently |
| โ No hardcoded secrets | Source code is visible to all app users |
| โ Version bumped | Same version = deploy rejected |
| โ Error handling on DQL queries | Queries can timeout or return empty |
| โ Loading states for async ops | Users see blank screen without them |
โ
Tested with dt-app dev | Catches runtime errors before deploy |
โ ๏ธ After deploy, users need to install your app from the Dynatrace Hub and grant the requested scopes.
๐ง Quick Check
What command deploys your app to Dynatrace?
What's Next
Module 12 โ Boss Fight: build a complete 3-page app from scratch.