We are considering the use of App Functions to provide standardised and simplified approach to certain datasets, however the test platform that I’ve set up (simple app and notebook module) isn’t working. Most of this basic setup is either taken from the docs or the helpers.
The app was created using the app creator and has the following details:
AppId = my.data.builder
and the App Function (again created through the app creator) is as basic as…
export default function () {
return "This Worked";
}
… with a name of “getDashboardData”
The notebook JavaScript module has the following script
import { functions } from '@dynatrace-sdk/adhoc-utils';
const response = await functions.call('my.data.builder', 'getDashboardData', {}).then((res) => res.text());
However, we I run this I get a “Execution crashed” exception and details of…
{
"error": {
"code": 540,
"message": "Execution crashed.",
"details": {
"logs": "Error: Function getDashboardData within the app my.data.builder failed\n at file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:30:13\n at eventLoopTick (ext:core/01_core.js:177:7)\n at async Object.call (file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:22:20)\n at async file:///script.ts:3:18\n",
"type": "UNCAUGHT_EXCEPTION",
"message": "Uncaught (in promise) Error: Function getDashboardData within the app my.data.builder failed",
"details": {
"lineNumber": 30,
"startColumn": 13,
"stack": "Error: Function getDashboardData within the app my.data.builder failed\n at file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:30:13\n at eventLoopTick (ext:core/01_core.js:177:7)\n at async Object.call (file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:22:20)\n at async file:///script.ts:3:18"
}
}
},
"packageVersions": {
"@dynatrace-sdk/adhoc-utils": "1.0.2"
}
}
Clearly, I’ve missed something somewhere - would you be able to point me in the right direction please?
Thanks