dt-js-runtime
Dynatrace/dynatrace-for-ai/skills/dt-js-runtime/SKILL.md
Dynatrace server-side JS runtime — function contract, runtime limits, Web APIs, Node.js modules, fetch with credential vault, and the @dynatrace-sdk/* catalog.
Skill161 starsChanged 23 days ago
What's in it
- Dynatrace JavaScript Runtime
- Function contract
- References
- Running a function with dtctl
---
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:
```js
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.
| File | When to load |
|------|-------------|
| [references/limits-and-restrictions.md](references/limits-and-restrictions.md) | Timeout / memory / I/O quotas; what's forbidden (`eval`, WebSocket, sockets, filesystem) |
| [references/apis-and-modules.md](references/apis-and-modules.md) | Which Web APIs and Node.js compat modules are available (fetch, crypto, streams, buffer, …) |
| [references/fetch.md](references/fetch.md) | Calling internal `/platform/...` APIs or external URLs, credential vault, outbound allowlist |
| [references/sdk.md](references/sdk.md) | Any `@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.
```dtctl
# 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:
```js
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.
More agent context in Dynatrace/dynatrace-for-ai
35 other files this repository gives its agents.
CLAUDE.md
llms.txt
Skill
- dt-alertingskills/dt-alerting/SKILL.md
- dt-app-dashboardsskills/dt-app-dashboards/SKILL.md
- dt-app-notebooksskills/dt-app-notebooks/SKILL.md
- dt-dql-essentialsskills/dt-dql-essentials/SKILL.md
- dt-migrationskills/dt-migration/SKILL.md
- dt-obs-analyticsskills/dt-obs-analytics/SKILL.md
- dt-obs-awsskills/dt-obs-aws/SKILL.md
- dt-obs-azureskills/dt-obs-azure/SKILL.md
- dt-obs-compliance-assistantskills/dt-obs-compliance-assistant/SKILL.md
- dt-obs-ext-monitorsskills/dt-obs-ext-monitors/SKILL.md
- dt-obs-frontendsskills/dt-obs-frontends/SKILL.md
- dt-obs-gcpskills/dt-obs-gcp/SKILL.md
- dt-obs-genaiskills/dt-obs-genai/SKILL.md
- dt-obs-hostsskills/dt-obs-hosts/SKILL.md
- dt-obs-kubernetesskills/dt-obs-kubernetes/SKILL.md
- dt-obs-log-semantic-mappingskills/dt-obs-log-semantic-mapping/SKILL.md
- dt-obs-logsskills/dt-obs-logs/SKILL.md
- dt-obs-network-devicesskills/dt-obs-network-devices/SKILL.md
- dt-obs-network-flowsskills/dt-obs-network-flows/SKILL.md
- dt-obs-predictive-analyticsskills/dt-obs-predictive-analytics/SKILL.md
- dt-obs-problemsskills/dt-obs-problems/SKILL.md
- dt-obs-servicesskills/dt-obs-services/SKILL.md
- dt-obs-tracingskills/dt-obs-tracing/SKILL.md
- dt-platform-costsskills/dt-platform-costs/SKILL.md
- dt-sec-contextualizationskills/dt-sec-contextualization/SKILL.md
- dt-sec-insightsskills/dt-sec-insights/SKILL.md
- dt-sec-ioc-huntingskills/dt-sec-ioc-hunting/SKILL.md
- dt-sec-semantic-mappingskills/dt-sec-semantic-mapping/SKILL.md
- dt-setup-androidskills/dt-setup-android/SKILL.md
- dt-setup-flutterskills/dt-setup-flutter/SKILL.md
- dt-setup-iosskills/dt-setup-ios/SKILL.md
- dt-setup-oneagentskills/dt-setup-oneagent/SKILL.md
- dt-setup-react-nativeskills/dt-setup-react-native/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

