The semantic conventions for FaaS spans could be extended with an attribute to indicate function cold starts, i.e., the first execution of an uninitialized function.
This way, the number and rate of cold starts can be tracked and the latency of cold and warm function executions can be compared. This is also commonly reported by commercial APM solutions for FaaS and allows for optimizing execution performance and potentially also cost.
A cold start could, for example, be determined by setting a flag in the initialization routine that is cleared after the first function execution.
The semantic conventions for FaaS spans could be extended with an attribute to indicate function cold starts, i.e., the first execution of an uninitialized function.
This way, the number and rate of cold starts can be tracked and the latency of cold and warm function executions can be compared. This is also commonly reported by commercial APM solutions for FaaS and allows for optimizing execution performance and potentially also cost.
A cold start could, for example, be determined by setting a flag in the initialization routine that is cleared after the first function execution.