How can i use Metric activities in microflows?

0
Hi, I currently find that there is a counter, guage, incremental counter activities in microflow. But, I can't find the way how to use them. I've already read the docs about metric activities. 
asked
1 answers
1

The Metric activities in Mendix microflows allow you to monitor and measure the performance of your microflows and the application. They can be useful for tracking various metrics such as execution time, counts, and other performance-related aspects. Here's a brief overview of how you can use Metric activities in Mendix microflows:

  1. Counter Activity:

    • The Counter activity is used to count occurrences of an event within a microflow.
    • To use a Counter activity, drag and drop it onto your microflow canvas.
    • Configure the properties of the Counter activity, such as the name of the counter.
    • You can increment the counter at specific points in your microflow using the "Increment" action.
  2. Gauge Activity:

    • The Gauge activity measures the execution time of a specific part of your microflow.
    • Drag and drop the Gauge activity onto the microflow canvas.
    • Configure the properties, such as the name of the gauge.
    • You can mark the start and end of the gauge section to measure the time taken for the microflow to execute that part.
  3. Incremental Counter Activity:

    • The Incremental Counter activity is similar to the Counter activity but is used to increment a counter by a specific value.
    • Add the Incremental Counter activity to your microflow.
    • Configure the properties, including the name of the counter and the value to increment by.
    • Increment the counter at specific points in your microflow.

Here's a simple example of how you might use a Counter activity in a microflow:

  1. Drag the "Counter" activity onto your microflow canvas.
  2. Configure the properties, giving it a meaningful name.
  3. In the microflow flow, use the "Increment" action of the Counter activity where you want to count an occurrence.
  4. You can later view the counter's value in the Mendix Developer Portal or programmatically retrieve it using Mendix APIs.

Remember that the metrics are usually collected and can be viewed in the Mendix Developer Portal under the "Monitor" section. If you've read the documentation and are still having issues, you may want to ensure that you are looking at the correct metrics in the Developer Portal and that the microflows containing the Metric activities are being executed.

answered