| name | dt-js-runtime |
| description | Dynatrace server-side JS runtime — function contract, runtime limits, Web APIs, Node.js modules, fetch with credential vault, and the @dynatrace-sdk/* catalog. |
| license | Apache-2.0 |
Dynatrace JavaScript Runtime
The Dynatrace JS runtime is a server-side AppEngine sandbox that executes JavaScript/TypeScript.
Function contract
Every entry point must export a default async function:
export default async function () {
return result;
}
ES module syntax required. TypeScript accepted (type annotations, interfaces, generics). No other export shape is supported.
References
Start here, then load only the file you need.
Running a function with dtctl
Use dtctl exec function to run JS runtime code without deploying an app.
# Run inline code
dtctl exec function --code 'export default async function() { return "hello" }'
# Run from file
dtctl exec function -f script.js
# Pass JSON input — accessed as event.payload inside the function
dtctl exec function -f script.js --payload '{"key":"value"}'
The function may accept an optional event parameter:
export default async function(event) {
const { payload } = event;
return payload;
}
Load the dynatrace-control skill for authentication setup, context switching, and the full exec function reference.