dt-js-runtime

v2026.09.24

Dynatrace server-side JS runtime — function contract, runtime limits, Web APIs, Node.js modules, fetch with credential vault, and the @dynatrace-sdk/* catalog.

GitHub
安装命令
npx skhub add dynatrace/dt-js-runtime
Markdown
SKILL.md

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.

FileWhen to load
references/limits-and-restrictions.mdTimeout / memory / I/O quotas; what's forbidden (eval, WebSocket, sockets, filesystem)
references/apis-and-modules.mdWhich Web APIs and Node.js compat modules are available (fetch, crypto, streams, buffer, …)
references/fetch.mdCalling internal /platform/... APIs or external URLs, credential vault, outbound allowlist
references/sdk.mdAny @dynatrace-sdk/* package — the index routes you to the right per-SDK file

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 — the parsed object is the function's argument
dtctl exec function -f script.js --payload '{"key":"value"}'

The function may accept an optional parameter. --payload is parsed and passed as that argument directly — it is not wrapped in an event.payload field:

export default async function(payload) {
  // with --payload '{"key":"value"}', payload is {"key": "value"}
  return payload.key;
}

Load the dynatrace-control skill for authentication setup, context switching, and the full exec function reference.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

Apache-2.0

源路径

skills/dt-js-runtime

默认分支

main

最新提交

47528b0

Tree SHA

a8fd302