Azure function invocation logs are missing sometimes

Liyakath Mohamed Ibrahim 0 Reputation points
2025-03-17T13:46:30.8+00:00

Azure function logs are missing for some invocations of the function.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,917 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Khadeer Ali 5,990 Reputation points Microsoft External Staff Moderator
    2025-03-18T11:55:33.36+00:00

    @Liyakath Mohamed Ibrahim ,

    Thanks for reaching out. Missing logs for Azure Function invocations can be due to several factors. One common reason is the sampling configuration in Application Insights, which is enabled by default. If the sampling rate is too low, some logs may be dropped. Check the actual sampling rate with an Analytics query to see if the TelemetrySavedPercentage is less than 100 for any telemetry type, indicating sampling is affecting log availability.

    Additionally, ensure your function app is correctly configured. Verify the diagnostics in the Azure portal to confirm that the Application Insights connection settings are properly set up and that sampling is configured as intended. It's also recommended to ensure your function app is running on version 4 or higher for better log tracking.

    If your function app is integrated with a virtual network, ensure the necessary ports are open for outgoing traffic, as this can also impact log generation.

    Below are the reference documents on the same

    https://learn.microsoft.com/en-us/troubleshoot/azure/azure-functions/monitoring/functions-monitoring-appinsightslogs#logs-are-missing-or-partial

    https://learn.microsoft.com/en-us/troubleshoot/azure/azure-functions/monitoring/functions-monitoring-appinsightslogs
    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for "Was this answer helpful." And if you have any further questions, let us know.

    0 comments No comments

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.