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.

๐Ÿ“˜

Return to FAQs

See related from Metering and Event Ingestion: