24 Jul 2023 07:20 PM - edited 24 Jul 2023 07:39 PM
Hey,
While we are developing the app, we may use "console.log/error()" to log down all the logs.
After deploying the app, it is not visible to the development team for monitoring purpose.
What I am thinking of is using the logClient SDK to ingest the log the Dynatrace.
Ingest data | Dynatrace Developer
However, there are some access right control concerns as the users need to have "storage:log:write" access right so that it can ingest the log to Dynatrace.
Please advise if there is any better way to do it (both frontend React part and serverless functions part)?
Thanks!
Solved! Go to Solution.
25 Jul 2023 07:47 AM
From an access rights point of view a better way of ingesting logs is to go via the log ingest api use the token based authentication (also works with the new OAuth flow). Put all the code into an AppFunction, store the token in the credential vault (scope AppEngine) and access it via the credentialsVaultClient. By putting the logic into an AppFunction the end user doesn't need the "storage:log:write" permissions and also can't view the value of the token, but still can make use of it.
Monitoring improvements for frontend of custom apps are currently in the making, but I can't give you an ETA for that.
Best,
Sini
25 Jul 2023 12:08 PM
Hi!
I can add to the points that @sinisa_zubic mentioned. We're already working on an improved way to get the logs for monitoring purposes for App Functions. The idea is that every log will be ingested automatically.
For the frontend part, the way to go is to include Dynatrace RUM in the app. We are currently preparing documentation on how this can be done. I can give you an update as soon as this is available.
06 Nov 2023 08:14 AM - edited 06 Nov 2023 08:15 AM
I'm happy to announce that Real User Monitoring (RUM) and enhanced log capabilities are now live for Dynatrace apps and Dynatrace functions, offering richer insights and more robust troubleshooting tools. Start monitoring your custom Dynatrace app by following our straightforward setup guide at Dynatrace Developer.