azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Update functions host to emit per invocation details to metering service

Open divyagandhisethi opened this issue 2 years ago • 8 comments

We have been receiving CRIs which complain that the FunctionExecutionCount unit shown in portal for Linux ElasticPremium apps is not accurate. This is because today the platform publishes an aggregated count for the FunctionExecutionCount metric. As a repair item for these CRIs, we'll start publishing accurate execution counts from the host.

The change needs to go here - https://github.com/Azure/azure-functions-host/blob/c63da9b6baec5155fcda4a7a233a1c26ea41bee9/src/WebJobs.Script.WebHost/Diagnostics/LinuxAppServiceEventGenerator.cs#L64-L70

Instead of just publishing the timestamp, we need to also publish the execution stage for each function invocation. We have already made the corresponding change on the platform side to start consuming the new changes from the functions host. We have to wait for the platform changes to be deployed everywhere before making the change on the host side.

divyagandhisethi avatar Mar 11 '22 23:03 divyagandhisethi

Waiting for ANT 98 deployment to complete before picking work in the Host

pragnagopa avatar Mar 14 '22 18:03 pragnagopa

@divyagandhisethi - can you expand on why Host was writing time stamp until now?

cc @CooperLink

pragnagopa avatar Apr 26 '22 21:04 pragnagopa

@pragnagopa / @divyagandhisethi the PR associated with that was automatically closed. Are you still planning on executing on this? If so, so this move to sprint 123?

fabiocav avatar May 25 '22 20:05 fabiocav

@pragnagopa / @divyagandhisethi in review, there are questions about the why (more details to better understand the problem) here. Would you be able to please expand on that?

There are also questions about perf impact of this change, can you comment on that?

Thanks!

fabiocav avatar Jun 01 '22 20:06 fabiocav

Apologies missed pings on the issue here - associated PR - https://github.com/Azure/azure-functions-host/pull/8315 has the fix that is tested on private stamp - pending final verification from @divyagandhisethi

Prior to this change, logic that parsed console logs was very strict and did not allow adding more columns - associated changes on the Platform - https://msazure.visualstudio.com/One/_git/AAPT-Antares-Websites/pullrequest/5629271 have more details.

@divyagandhisethi - I am not aware of any perf impact with these changes - please confirm

pragnagopa avatar Jun 15 '22 20:06 pragnagopa

Both PRs have been merged. Closing as resolved.

fabiocav avatar Jul 27 '22 20:07 fabiocav

Re-opening as the platform fix has issues when more logs are being sent from Functions Host. Keeping this issue open until we can roll out a permanent fix.

pragnagopa avatar Sep 16 '22 16:09 pragnagopa

@CooperLink - reactivating this issue to undo the temporary mitigation that is put in place as part of the - https://github.com/Azure/azure-functions-host/pull/8760 and https://github.com/Azure/azure-functions-host/pull/8759

pragnagopa avatar Sep 16 '22 16:09 pragnagopa