How to create custom DevOps workitem using azure ApplicationInsights Alerts(custom-log search) and Azure functionApp

Continuation of this flow - https://learn.microsoft.com/en-us/answers/questions/968858/azure-alertscustom-log-search-how-to-get-custom-di.html
I am new to this kind of stuff,
I have configured Alert(Custom-log) in Application-Insights, alert got fired when my API throws error or exception.
In Action-groups, i have configured Action-type as webhook and passed functionApp url into webhook. In Azure functionApp i have written all logics to create workitem in DevOps boards - this was the overall flow
In my case when i test the functionApp url along with Alert payload requestbody from the POSTMAN,it was working fine and workitem has been created in DevOps boards but the same when i run through the Alerts,workitem is not even creating in DevOps.
any best way to achieve this or alternate method
Hi @Ryan Hill , yes i have configured custom log-query alert to my azure resource. i double checked all the configurations and alert rule got fired, as i mentioned above in Action-group type i have configured webhook and passed my functionapp url into it. even the payload(req) of alert is showing as expectedin functionapp monitor section.
So, in your function app, the request body has the payload of the alert but it's not creating the expected ADO item? I know you said you've tested the payload using Postman, and it works. What kind of logging have you added to function app?
Given the information you've provided, it seems like something isn't processing correctly in the function app. I've had a similar issue had to include additional
console.log()
to nail the issue down.I have been used C# function in Azure functionApp so i added log.LogInformation().
Have you been able to resolve you issue? What have the logs shown?
I couldnt resolve this issue, in logs i am getting actual payload of alert
What happens in your function app after it receives the payload?
Normally as and when the functionapp triggers, it will create workitem in devops but i waited over an hours. it fails to create.
Apologies for the delayed response @Chethan Parashuram . What I meant by
...was do you see your
console.log()
writing out the expected output? It sounds like the issue might be in your function app but it's difficult to make that distinction without any of the built-in diagnostic information from the function app.Sign in to comment
Activity