How to measure a multi-step process using a duration meter
In some cases, customers want to meter different steps or phases of a complex process. For example, a series of API calls may be used during a new user setup process and you would like to track how long each step takes.
At first glance, you may think you need separate meters for each API call or segment of the process, but there is a more efficient way to model this using dimensions.
Create a single Duration meter and create a dimension called 'segment' where the values each represent the different segments of the process. When the process starts, the meter will send an event with value=1 and segment=firstSegment. When the next segment begins, send another event (of the same meter) with value=1 and segment=nextSegment. This process would continue until the final segment concludes, when a meter would be sent with value=0 and segment=lastSegment. Using this approach allows you to minimize the number of distinct meters to create and manage and still provides the same level of granular insight to the duration of each segment of the process as well as the total duration of the process from start to finish.
See related from Metering and Event Ingestion:
- How to track seat-based objects in Amberflo
- How to meter the number of active seats or users for a customer
- How to understand dimensions in Amberflo
- How to verify the accuracy of meter data
- How to track and bill for "high watermark" usage
- How to handle erroneous or incorrect meters sent to Amberflo
- How to find the meter-id for retrieving and deleting a specific meter
- How to delete meters that are no longer in use
- How to handle high volume high cardinality event streams