22 Nov 2023 04:57 PM - last edited on 12 Dec 2023 03:44 PM by Ana_Kuzmenchuk
Hi,
I trying to use the dtrum API. However, it is not working even after configuring the Dynatrace folder on the typeRoots section under the compilerOptions of the tsconfig.json.
Any idea how to solve this issue?
08 Aug 2024 08:23 AM
Hi,
Firstly, it’s important to note that the dtrum.d.ts file is only a types file and does not contain any actual logic. This means that simply configuring the Dynatrace folder in the typeRoots section under compilerOptions of your tsconfig.json won’t make the API work on its own.
To ensure the dtrum API functions correctly, you should validate that the RUM JavaScript snippet is running properly in your environment. This is crucial as this snippet is responsible for the actual implementation of the dtrum API.
Additionally, for a robust implementation, it’s a good practice to treat the dtrum API as optional in your JavaScript code. This way, your application can gracefully handle scenarios where the API might not be available.
More related documentation: https://docs.dynatrace.com/docs/platform-modules/digital-experience/web-applications/additional-conf...
I hope this helps!