1
votes

I am trying to figure out how to filter or even view more the entries that show up in azure portal under function/monitor tab. I have like a log of 1000 records out of which only 20 are showing, I dont know how to configure what you want to see under monitor tab. Like right now it shows 20 logs, if I want to see 40 how can I set that? If I want to remove all log entries, I can do that?

Also when I open application insights, the query set up there is pretty confusing are their any good articles on how to learn the structure of query.

I basically only want to see the details of errors both in monitor and in application insights but dont know how to configure that.

Attaching a pictures, How can I only see errors in first picture and remove all log and start all over again. Second picture how can I learn the query language used, I want to see exceptions that come in logs, how can I see those Monitor tab in azure portal Application insight how to query

1
Can you please attach a few screenshots to illustrate what you're referring to?ZakiMa
@ZakiMa for sure.. Attached them now. Thank you for your help.Sarah
Thank you @Sarah. Please refer to George's answer below =)ZakiMa

1 Answers

4
votes

The Monitor tab in the Function page, as far as I know it's a preview interface. It's for easy browsing latest logs. And if you want to custom logs output, you have to go to Application Insights to define the query.

As for your requirements, it's easy to define. You just need add the limits for your query. One is increase take to 40 or with | limit 40 . And add a limit with | where success == "False". Then the query will be like the below pic shows.

enter image description here

And further more details about how to write the query, you could refer to this tutorial:Get started with Azure Monitor log queries.

Update: The Shortestquery about exception could be:exceptions | where cloud_RoleName =~ 'georgecfunction' and operation_Name == 'TimerTrigger1' | order by timestamp desc and set the custom Time range.

Or you just set like this exceptions | extend itemType = iif(itemType == 'exception',itemType,"") | where (itemType == 'exception' and (timestamp >= datetime(2019-05-19T01:13:00.000Z) and timestamp <= datetime(2019-06-18T01:13:00.000Z))) | where cloud_RoleName =~ 'georgecfunction' and operation_Name == 'TimerTrigger1' | order by timestamp desc

enter image description here