Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.92k stars 440 forks source link

Function Monitor Logs tab not showing any error logs #9239

Open lucyzhang929 opened 1 year ago

lucyzhang929 commented 1 year ago

Error logs from SQL Trigger are not showing up in the function Monitor Logs tab. The function's Monitor Logs tab is empty even though I can see the logs in App Insights and in the function app's Log Stream.

Investigative information

Please provide the following:

Repro steps

Provide the steps required to reproduce the problem:

  1. Create a function with a SQL Trigger
  2. Deploy function
  3. Navigate to the function's Monitor Logs tab

Expected behavior

Errors show up in the Monitor Logs tab

Actual behavior

Monitor Logs tab is empty

Known workarounds

When I navigate to my function app's Log Stream, I can see the errors: 2023-04-27T15:53:51Z [Error] Failed to check for changes in table 'dbo.Products' due to exception: Microsoft.Data.SqlClient.SqlException. Exception message: The VIEW CHANGE TRACKING permission was denied on the object 'Products', database 'test', schema 'dbo'.

Once I fix the issue and go back to the Monitor Logs tab, I can see execution logs: 2023-04-27T16:10:02Z [Information] Executing 'ProductsTrigger' (Reason='New change detected on table '[dbo].[Products]' at 2023-04-27T16:10:02.1196180Z.', Id=f0e4d388-6b56-4f53-aa44-9a3cb31d1a7f) 2023-04-27T16:10:02Z [Information] SQL Changes: [{"Operation":1,"Item":{"ProductId":91,"Name":"new name2345","Cost":3}}] 2023-04-27T16:10:02Z [Information] Executed 'ProductsTrigger' (Succeeded, Id=f0e4d388-6b56-4f53-aa44-9a3cb31d1a7f, Duration=0ms)

diptanu143 commented 3 months ago

you said "Once I fix the issue " - what is the fix you did ?