I'm new to Application Insights Alerts and think I may have misconfigured something. I need to be alerted when an Azure Function fails to execute.
Setup App Insights Alert
Alert triggered 3x in the past week
No failure conditions have existed on this Function since 12/2/2020
How do I correlate an App Insights alert with its corresponding log file?
Seems like this should be a "one-click thing" but I must be missing it somewhere.
EDIT 1: Here is the exceptions
table. Same findings; no fails since 12/2.
EDIT 2: Here is the dependencies
table. Nothing found in last 30d.
EDIT 3: Per the recommendation on another post, I changed the alert from the out-of-the-box Metric
to a Custom log search
.
- I left the original alert (that failed for no reason) in place alongside the new one.
- The original one just failed again for no reason
Details:
- Alert emails say:
- Start 2021-01-06 8:22 UTC
- End 2021-01-06 11:22 UTC
- Function Monitor shows Function ran SUCCESSFULLY at:
- 2021-01-06 08:13:21.368 UTC
- 2021-01-06 08:13:21.372 UTC
- Detailed logs show the function ran successfully
At this point, I'm going to say the Metric
version of alerts should be discarded. What ever its logic is based on has created false positives for me a number of times now.
Stick to the custom log search
exceptions
table anddependencies
table in azure portal -> application insights -> logs, to see if any errors there? – Ivan Yang