Skip to content

dt-js-runtime

dynatrace1.4K installs

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

Install

npx skills add https://github.com/dynatrace/dynatrace-for-ai --skill dt-js-runtime
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.

File When to load
references/limits-and-restrictions.md Timeout / memory / I/O quotas; what's forbidden (eval, WebSocket, sockets, filesystem)
references/apis-and-modules.md Which Web APIs and Node.js compat modules are available (fetch, crypto, streams, buffer, …)
references/fetch.md Calling internal /platform/... APIs or external URLs, credential vault, outbound allowlist
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.

# 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.

Related skills

dt-dql-essentialsdynatrace2.5KCore DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents syntax errors and makes queries faster, more efficient, and cheaper (less data scanned = lower query consumption/cost per run). Covers fetch commands, data models, field namespaces, time alignment, entity/smartscape patterns, metric discovery, and performance/cost optimization (filter early, bucket filters, short time ranges, field selection, sampling, cardinality). Trdt-app-dashboardsdynatrace2.4KWork with Dynatrace dashboards - create, modify, query, and analyze dashboard JSON including tiles, layouts, DQL queries, variables, and visualizations.dt-obs-logsdynatrace2.3KLog querying, filtering, pattern analysis, and error rate calculation. Use when searching application or infrastructure logs, analyzing error patterns, or correlating log data. Trigger: "show error logs", "search logs for keyword", "log error rate", "recent errors", "logs from last hour", "find log entries", "top error messages", "log patterns", "parse JSON logs", "logs by process group", "log trends over time", "log entry counts per minute". Do NOT use for explaining existing queries, product ddt-obs-problemsdynatrace2.3KDAVIS problem analysis including root cause identification, impact assessment, and correlation with other telemetry. Use when querying or investigating detected problems. Trigger: "active problems", "root cause analysis", "problem impact", "affected users", "list problems", "P-12345 details", "recurring problems", "problem history", "problem trending", "blast radius", "which entity caused the problem", "problems affecting Kubernetes", "problems by service". Do NOT use for explaining existing que

← All skills

Search skills and MCP servers

Search across 31,816 skills and MCPs