dynatrace/dynatrace-for-ai

dt-js-runtime

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

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/dynatrace/dynatrace-for-ai --skill dt-js-runtime

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

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.

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.

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.

Powiązane zadania

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
dynatrace
Społeczność

dt-alerting

End-to-end Dynatrace alerting lifecycle — anomaly detector setup and model selection (static threshold, adaptive baseline, seasonal baseline), alert event storage in Grail, problem grouping and denoising by root cause analysis, and workflow-based notification routing (email, Slack, ServiceNow, webhook). Use when configuring alerting, choosing between detector types, querying alert event history, understanding why alerts merged into a problem, or setting up problem-triggered notifications.

instalacje
3
GitHub Stars
166
Aktualizacja
1 paź
dynatrace
Społeczność

dt-app-dashboards

Work with Dynatrace dashboards - create, modify, query, and analyze dashboard JSON including tiles, layouts, DQL queries, variables, and visualizations.

instalacje
3
GitHub Stars
166
Aktualizacja
1 paź
dynatrace
Społeczność

dt-app-notebooks

Work with Dynatrace notebooks - create, modify, query, and analyze notebook JSON including sections, DQL queries, and visualizations.

instalacje
3
GitHub Stars
166
Aktualizacja
1 paź
dynatrace
Społeczność

dt-dql-essentials

Core 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). Tr

instalacje
3
GitHub Stars
166
Aktualizacja
1 paź