I'm trying to look at the logs for my Azure function, In the Monitor view, I can just click the link under the Date column for the logs for a certain run. But this is only for the last 20 invocation. For the older log how can I get it?
After clicking the Run query in Application Insight link above, I arrived to a page with a table with the log entry, but I don't know how to open the actual logs!
If you want to access to the logs of an execution of your function app prior to those top twenty and you don't know so much how to query in Application Insights. There is an alternative using pre made queries available at monitor tab of your function.
Go to "Run query in application insights" to find the specific execution you are looking for.
This will auto generate for you the same query that filled the above grid. Here you just need to change the
timestamp
where condition to match our needs.
For example a specific date and time range:
"where timestamp between (todatetime('2022-10-01T00:00:00Z')..todatetime('2022-10-01T23:59:59Z'))"
With this change just run the query and identify function run you want to get full logs and get its
operation_Id
and invocationId
values.
Go to monitor view again, select any execution and then "Run query in Application Insights"
Now you only need to replace
operation_Id
and invocationId
values with those you got at step 1 and run again the query to get full log of that specific execution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With