JavaScript runtime
The app functions you create for your app run within the Dynatrace JavaScript runtime. This page documents available JavaScript objects, WebAPIs, and packages of the SDK for TypeScript the runtime provides to write app functions.
SDK for TypeScript
The SDK for TypeScript can be used to access Dynatrace platform services and Dynatrace AppEngine functionality.
Standard built-in objects
The Dynatrace JavaScript runtime supports all standard JavaScript built-ins and the ECMAScript Internationalization API. For a list of available objects, visit the standard built-objects documentation on MDN (Mozilla Developer Network).
Web APIs
Web APIs are fundamental building blocks when writing web applications. Below is a list of all the APIs and interfaces (object types) available within the Dynatrace JavaScript runtime. To learn more about these APIs, visit Web API docs on MDN.
Deprecated properties of Web APIs might not be supported.
AbortController
AbortSignal
atob
Blob
btoa
ByteLengthQueuingStrategy
clearInterval
clearTimeout
CompressionStream
(currently only supported in deployed apps, not in local development)console
CountQueuingStrategy
Crypto
crypto
CryptoKey
CustomEvent
DecompressionStream
(currently only supported in deployed apps, not in local development)DOMException
ErrorEvent
Event
EventTarget
fetch
File
FileReader
FormData
Headers
Location
location
Navigator
navigator
Performance
performance
PerformanceEntry
PerformanceMark
PerformanceMeasure
ProgressEvent
PromiseRejectionEvent
ReadableByteStreamController
ReadableStream
ReadableStreamBYOBReader
ReadableStreamBYOBRequest
ReadableStreamDefaultController
ReadableStreamDefaultReader
reportError
Request
Response
setInterval
setTimeout
structuredClone
SubtleCrypto
TextDecoder
TextDecoderStream
TextEncoder
TextEncoderStream
TransformStream
TransformStreamDefaultController
URL
URLPattern
URLSearchParams
Window
window
WritableStream
WritableStreamDefaultController
WritableStreamDefaultWriter
Node.js compatibility
The Dynatrace JavaScript runtime provides a compatibility layer for Node.js to improve compatibility with third-party npm packages.
Node.js compatibility is subject to limitations, and third-party packages that rely on operations such as TCP (Transmission Control Protocol)/UDP (User Datagram Protocol) socket or file system access aren't supported. Built-in modules in the compatibility layer might miss certain functionality from their Node.js counterparts.
Most functionality exposed in the Node.js compatibility layer is also available via Web APIs.
We recommend using Web APIs such as fetch
instead of Node.js modules like http
where possible.
Available modules
The following built-in Node.js modules are available. Note that the list of limitations is non-exhaustive and subject to changes in the future.
Module | Description | Limitations |
---|---|---|
assert/strict ,assert | Node.js assertions | |
buffer | Node.js-specific extensions to Uint8Array | |
console | Logging capabilities (e.g. console.log ) | |
crypto | Cryptographic functionality such as hashing and encryption | Certain algorithms, custom certificates and Diffie-Hellman key exchanges aren't supported |
events | Utilities around event emitters and listeners | |
http | HTTP server and client functionality over plain text | Creating an HTTP server isn't supported |
https | HTTP server and client functionality over TLS (Transport Layer Security) | Creating an HTTP server isn't supported |
path | Utilities for working with file and directory paths | |
perf_hooks | Performance measurement APIs | Some functionality isn't implemented:
|
querystring | Utilities for parsing and formatting URL query strings | |
stream ,stream/consumers ,stream/promises | APIs for streaming data | |
stream/web | An implementation of the WHATWG Streams Standard | |
string_decoder | APIs for decoding UTF-8 and UTF-16 data from streams | Unsupported encodings:
|
timers ,timers/promises | API for scheduling functions to be called in the future | |
url | Utilities for URL resolution and parsing | |
util | Various utilities for application development | |
zlib | Compression and decompression utilities | Brotli compression isn't implemented |
Stubbed modules
You can import the following modules to ensure compatibility with specific third-party packages, but all exposed functions throw errors when called.
Module | Description |
---|---|
process | Provides information about the current process |
fs ,fs/promises | File system operations |