Hi @MrFlinstone ,
Thanks for reaching out to Microsoft Q&A.
Ensure that you have the correct Application Insights Instrumentation Key or Connection String set up in your application settings.
Make sure your host.json file is properly configured to log at the desired levels. For example, you have Host.Results set to Error, but if your function is logging at a lower level like Information or Debug, those logs will not appear. Try changing it to Information or Debug temporarily.
Confirm that your function is actually being invoked. Sometimes misconfigurations in triggers can lead to functions not running. You can try manually invoking the function and checking the logs again.
Utilize the Live Metrics Stream in Application Insights to monitor your function app in real time, which can be helpful to diagnose issues without waiting for logs to become available.
I have tested the same with below configuration, and it worked.
Sample code:
import azure.functions as func
import logging
app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
@app.route(route="http_trigger", auth_level=func.AuthLevel.ANONYMOUS)
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')
name = req.params.get('name')
if not name:
try:
logging.info('My apps job started-new')
req_body = req.get_json()
except ValueError:
pass
else:
name = req_body.get('name')
if name:
return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
else:
logging.info('Extra logging')
return func.HttpResponse(
"This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
status_code=200
)
host.json:
{
"version": "2.0",
"logging": {
"logLevel": {
"Host.Results": "Error",
"Function": "Trace",
"Host.Aggregator": "Trace",
"default": "Information"
},
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
}
}
I have also tried with below default host.json and it worked.
host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
}
}
LogStream:
Open LogSteam and run the function parallelly.
Connected!
2025-11-24T04:00:38Z [Verbose] Request successfully matched the route with name 'http_trigger' and template 'api/http_trigger'
2025-11-24T04:00:38Z [Information] Executing 'Functions.http_trigger' (Reason='This function was programmatically called via the host APIs.', Id=fb410169-43ec-473b-93f3-bdaa667cd070)
2025-11-24T04:00:38Z [Verbose] Sending invocation id: 'fb410169-43ec-473b-93f3-bdaa667cd070
2025-11-24T04:00:38Z [Verbose] Posting invocation id:fb410169-43ec-473b-93f3-bdaa667cd070 on workerId:e4acff6c-47bd-40fa-95cc-28353c688f98
2025-11-24T04:00:38Z [Information] Python HTTP trigger function processed a request.
2025-11-24T04:00:38Z [Information] My apps job started-new
2025-11-24T04:00:38Z [Information] Extra logging
2025-11-24T04:00:38Z [Information] Executed 'Functions.http_trigger' (Succeeded, Id=fb410169-43ec-473b-93f3-bdaa667cd070, Duration=42ms)
Hope it helps!
Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you.