Problem Statement:
When you work with Power Platform, you can leverage many different components and resources to satisfy a business requirement. On the one hand, that seems interesting as you have many options to solve a problem, but on the other hand, these many different components might make it hard for you or the support team later, when troubleshooting is needed. For example in Dataverse, whenever you find out there is something wrong with a record in a table, you can’t easily figure out whether you should check a Cloud Flow, your classic Workflow, a Plugin, your Javascript code, Azure Logic Apps, an external system that calls API, etc.
That would be even harder to recognize when there are many instances of a component type such as Flows, working on the same Table, and handling different logic and business requirements.
Solution (Intentional Logging):
Even though you have different types of logging functionalities available to you in Dataverse such as Audit Log, Plugin Trace Log, or Azure Application Insights, for the problem I explained, none of them can come to the rescue alone. By using Audit Log, you can hardly understand what component was making the changes, because it shows the logs based on the user who made the change. Plugin Trace Log is only helpful for professional developers and it is limited only to plugins. Application Insights is also an advanced resource and is mostly used for monitoring the healthiness of the whole environment not a specific solution in detail.
However, the good news is that you can implement and standardize your way of logging, which I call Intentional Logging. Indeed, it is a simple but very helpful solution to this problem, and if you implement it, it will save you lots of time and energy troubleshooting the problems afterward.
A simple example
Let’s assume we have implemented a system for a fictional company called Bizchitect Recruiters. Their business is to find employees for their customers.
Customers can send emails with attachments to submit their job offers. Then, recruiters will review the job offer and if everything is fine, they will publish it to the Bizchitect Recruiters job portal.
To help the recruiters, we have leveraged AI Builder together with a Power Automate Cloud Flow. The role of this flow is to create the Job Offer record and extract some information such as the Description and budget range from the attached document.
As you can see in the following picture, Miriam opened a job offer record created from the email sent by Thomas. However, she realized that the Description and Budget range were empty. Therefore, she reported it to the support team.
Members of the Support team have more access rights than Miriam. As the following picture shows, they can open the Admin form and see the Error in the Timeline. The subject and description show there is something wrong.
Now, the support agent can open the log record to see more information. Additionally, they can click on the More Details button to open the Flow run instance and investigate what was wrong, which is shown in the next picture.
By clicking on the More Details, the Flow run is opened in a new tab. As you can see in the following picture, there is something wrong with the “Extract information from Job Offer pdf” action in the cloud flow. Now, they find the problem and are able to fix it.
Conclusion
As you can see, with Intentional Logging, the support agent is guided directly to the point of failure and can resolve the issue a lot faster.
Here are some of the advantages of this kind of logging:
- A standard way of logging for everyone. Whenever a problem happens, everyone knows where to look for the root cause.
- Directly guide the agent from the point of issue to the point of failure.
- Most of the time, the point of issue is a record. Without knowing the knowledge of the architecture of the system it would not be easy to guess, where can be the point of failure. In the example I showed in this post, the agent didn’t need to know there is a Cloud flow that is responsible for creating the job offer. The log itself will guide them.
- Don’t need special knowledge to use it.
- Independent from the type of customization.
- It doesn’t matter, what kind of customization you have done. You can use Intentional Logging from JavaScript, plugins, and any other components.
In this post, I tried to show the concept and the outcome of implementing Intentional Logging. In my next post, I show you how you can implement it in your environment.
Please put your comments below or share your ideas in my LinkedIn post here.
Pingback: Intentional logging – Part 4 – Utilizing Log Flow - bizchitect