Differentiate web app and function app logging

Rahul Balayya (LTIMINDTREE LIMITED) 60 Reputation points Microsoft Vendor
2024-09-13T18:15:23.57+00:00

I have query where customer created automation using an XDR tool to alert them when new web app is created. This is based on logs, they used 'Create website log'.

But this log is generated for function app as well, therefore, they receive function app names as well in the result report.

How to differentiate between, web app and function app creation logs.

Any help will be much appreciated.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,315 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,092 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,902 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 12,011 Reputation points
    2024-09-14T02:47:46.56+00:00

    Hello Rahul Balayya (LTIMINDTREE LIMITED),

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to know how to differentiate web app and function app logs.

    From a developer and IT support perspectives, you can differentiate between web app and function app creation logs by their attributes.

    1. The source of the logs, web app logs could be found under AppServiceWebLogs or similar categories and Function App Logs could be found under FunctionAppLogs
    2. web app logs include info such as siteName, resourceGroup, and subscriptionId and function app logs will include attributes like FunctionName, FunctionInvocationId, and HostInstanceId.
    3. Also, their event names are different such as Microsoft.Web/sites/write for web app and Microsoft.Web/sites/functions/write for function app logs.
    4. By their category you should also be able to differentiate them with AppServiceWebLogs, AppServiceAuditLogs included in web app and FunctionAppLogs, FunctionExecutionLogs included in function app logs.

    Read more here for clarification on each log:

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


1 additional answer

Sort by: Most helpful
  1. hossein jalilian 8,080 Reputation points
    2024-09-13T23:09:44.5366667+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    You can use a few approaches:

    Function apps have a different resource type than web apps. You can filter or check for this in the logs:

    • Web Apps: Microsoft.Web/sites
    • Function Apps: Microsoft.Web/sites/functions

    Function apps typically use different SKUs than web apps. Look for:

    • Function Apps: Y1 (Consumption plan), EP1/EP2/EP3 (Premium plan)
    • Web Apps: Various SKUs like F1, B1, S1, P1V2 etc.

    Function apps are often associated with resources like:

    • Storage accounts (required for function apps)
    • App Insights resources configured for functions

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.