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

Log Functions_Extension_version

Open yojagad opened this issue 3 years ago • 1 comments

We have Starting Host log that logs the Functions_extension_version. Sometimes function app can fail to startup thus we may not even have that log.

We need a more reliable way to get Functions_extension_version by doing one of the two below.

  • Adding a column
  • Simply adding another log statement that is guaranteed to show up despite failures.

cc: @pragnagopa @mathewc

yojagad avatar Jun 24 '22 21:06 yojagad

I think we could just update the early "building host" log we emit here to include the the value of environment variable FUNCTIONS_EXTENSION_VERSION. We already log HostVersion as a column, so the log line will then have both. E.g. change to "Building host: version spec: ~4, startup suppressed: 'False', configuration suppressed: 'False', startup operation id: '1a07c994-5c67-45df-a94c-e1fe3b2e252e'".

For reference the query below is an example case where we failed before we were able to log the "starting host" line that includes the version spec (this log). However the above "building host" line IS logged, because it happens before we start the host or start trying to resolve any services.

FunctionsLogs | where PreciseTimeStamp > datetime(2022-06-24 18:00) | where AppName =~ "dal-functionapp-int-westus" | where HostVersion == "3.0.13353.0" | where RoleInstance == "pd0LargeDedicatedWebWorkerRole_IN_2884" | where Pid == long(6124)

mathewc avatar Jun 24 '22 22:06 mathewc