Troubleshoot app functions
Code written in app functions, Dynatrace Workflows, or Dynatrace Notebooks is executed within the Dynatrace JavaScript runtime. This page provides an overview of issues you might encounter while developing functions and suggested solutions.
Serialization errors
JSON serialization errors ("Failed to serialize result to JSON") might occur when returning a value from a function.
Whenever an app function returns a value, the runtime internally calls
JSON.stringify
to convert the given value to a JSON representation. Therefore, the same
limitations
also apply when returning a value from a function:
- The returned value must not contain a circular reference.
- The returned value must not be or contain a
BigInt
. Refer to the MDN documentation on how to useBigInt
within JSON for a workaround.
Still have questions?
Find answers in the Dynatrace Community