Question
How is function usage calculated for Segment Functions, and what factors contribute to the total execution time shown on the Usage page?
Product
Twilio Segment
Environment
Segment Console
Answer
Function usage is calculated based on the total execution time required for all active functions to process events. Execution time includes all processing steps, such as mapping, transformations, and any requests made to external APIs. Requests to external APIs can significantly increase execution time.
The total execution time for all active functions is accumulated over the course of a month. You can view your current execution time on the Functions tab of the Usage page in each workspace. Notifications are sent when usage reaches 75%, 90%, and 100% of the allotted execution time.
Additional Information
- Monitoring execution time can help manage usage and avoid overages. Consider optimizing function logic and minimizing external API requests to reduce total execution time.
- You can read more about functions usage on the Segment Functions Usage Limits documentation page.
- For details on improving the speed of external API requests, refer to the Improving Speed of External Requests section.