Badge: Nasty Hacker
What do you do when you have an error log in your app to keep on top of those pesky errors but your app is just so damn solid you don’t have enough error messages?
You fake it till you make it, of course.
We wanted to be able to show error log information in a dashboard so that NGO admin users can keep track of any errors occurring in the EcoCraft system.
But as our app is so robust and well built (cough), we didn’t have enough error messages logged to be meaningful. So we decided to mock up some error logs, which we could then store in our Error Log table. This is then shown on our Power BI report to help monitor application health.
We used the ✨ power of AI ✨ to generate a few hundred realistic-looking error logs, complete with error messages, error details and a stack trace, and linked to gaming sessions from when the kids play Minecraft.
To do this, used ChatGPT to generate CSV files of error logs, then imported the data using the standard model-driven app CSV import process, mapping the fields from the CSV to the Dataverse table as we went. An example of a prompt used for this:
Can you generate 200 error log records in a csv file? They should contain a player that you have already generated, and a random session number in the format 'SESSION-100000' where the 100000 is a number from 100001 to 103500. Also include a realistic error message, a realistic error details message and a realistic stack trace
[As an aside, we also used this approach to generate other data – players, teachers, parent, schools, and gaming sessions.]


This approach not only lets NGO users see the sorts of error information we capture in the system, but it allows us to leverage AI and Power BI in the process.
Using AI to generate error logs? Nasty, yes, but we’re working smarter, not harder.