How to track status code of logic apps - azure

I want to track status code of a entire logic app instead of particular action status code using expression.
Status Code would be mention in tracked properties of a logic app.
Any help?

You can check status using below expression code
#int(actionOutputs('ActionName').statusCode)
Then you can check that code using condition like in below picture
If You have any more questions related to feel free to ask

you can track entire logic app staus using Operations Management Suite (OMS) and Log Analytics
its give you entire logic app in details status please check below link
Please check for OMS details

Stay tuned. In a couple of days, I will be publishing an article on how to know the status of a running Logic App. Will update this Answer once it's posted.
And it's here:
Knowing the State of Your Logic App Process

Related

ADF activity succeeded does not move on to the next activity

I have a Web activity that performs a GET operation to an endpoint. I have set it up to do something On Failure (which works just fine) and another set of action upon Success. But this last part gets skipped entirely even though the output of the Web action is Succeeded.
Here is shown the succeeded status and my config
enter image description here
I tried removing and re-adding the On Success connector, but yielded no different results.
Based on your flow, it would never proceed ahead:
Because as per your logic to proceed to the Set run time, Web activity 1 AND Web activity 2 should be success but that can never be the case since web activity 2 can be a success only if web activity 1 has failed thereby not proceeding further.
The below blog explains how to handle this :
https://datasharkx.wordpress.com/2021/08/19/error-logging-and-the-art-of-avoiding-redundant-activities-in-azure-data-factory/
Both dependencies of set runtime status cannot end as succeeded. You need to use a combination of skipped/completed states: https://learn.microsoft.com/en-us/azure/data-factory/tutorial-pipeline-failure-error-handling
From the pipeline image , I think it should move on with success .
Can you please cross check what is status code of web activity and is it returning something back ? Is the status code be 2xx ? If I were you could have tried to check with the "Upon Completion" option and see it works .

Can Logic Apps Monitor a large number of calendars effectively?

PROBLEM
We want to track changes in user calendars, but are concerned with how often we'd need to check 2000+ user calendars (Outlook).
Would the process of monitoring over 2000 user calendars present a problem for our network?
WORKFLOW
Trigger (Check for calendar change) -> ACTION (Http: update a DB)
The Trigger below checks a calendar every 2 seconds. Is there a trigger that behaves like a "subscription" object where it simply handles a change notification?
For the question about how often to check the calendar events, it depends on your requirement. In my opinion, if you set check event every 2 seconds(it's a little bit more frequent), you'd better check if your logic app set as run in parallel. You can click the ... button of the trigger and click "Settings". Then check if it is same to below screenshot.
For your question about is there a trigger that behaves like a "subscription". I'm afraid it doesn't exist a trigger which can implement this requirement in logic app. We can also check if any backend api can implement it, we can see the graph api document.
The example in above screenshot is for mailFolders, but it's same with events. We can see it is necessary to specify a user(like me) or a group before the /events. So I don't think we can monitor the subscription events. You can raise a post on Azure feedback page to suggest developer add this feature.

Retrieve Azure AppInsights Live Metrics through API

There is an one year old question How can I retrieve through an API *Live Metrics* of Microsoft Application Insights about is it possible to pull LiveMetrics data that appInsights generate for the application trough some API
Right now i don't see anything live related in the official documentation - https://dev.applicationinsights.io/reference . And the answer for old question was also that there is no any way to get them.
But maybe someone knows if AppInsights team plans were changed in this year and they are working on that API?
It might be really useful to pull that data in realtime through API to own alerting\metrics system to process data from different microservices\applications and display them in aggregated way in realtime.
As example we can build something like OpServer has but based on different applications and their AppInsights data .
As right now there is no any way to get it
Note: I work in Application Insights team at Microsoft.
LiveMetrics data is not persistently stored anywhere, and there is no API to retrieve it. The data is collected only when someone is actively on the Live Metrics portal page. The moment browser window is closed, data is gone as well.
If your goal is to get metrics/other in real-time, then you can do that by implementing own ITelemetryProcessor. Most people use ITelemetryProcessor to "filter" out unwanted telemetry. But that is not a rule. All telemetry passes through TelemetryProcessor, and you can chose to filter the data or do something else with it. In your case you want to send it instantly to some real-time service. In fact, LiveMetrics (internally known as QuickPulse) is implemented as a TelemetryProcessor. (https://github.com/microsoft/ApplicationInsights-dotnet/blob/develop/WEB/Src/PerformanceCollector/Perf.Shared/QuickPulseTelemetryProcessor.cs#L158)
General doc about TelemetryProcessor:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#create-a-telemetry-processor-c

No Custom Events in Application Insights

Trying to create custom event in Application Insights but it doesn't show up on Azure Portal. All other events like requests, dependencies, exception are visible.
I have tried in dotnet core and can see following in debug log, but still no event in portal, even custom event table is empty:
Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights.Dev.<instrumentkey>.Event","time":"2019-12-05T19:16:34.1373921Z","iKey":"<instrument key>","tags":{"ai.application.ver":"1.0.0.0","ai.cloud.roleInstance":"<role>","ai.session.id":"<session>","ai.user.id":"<user>","ai.operation.id":"<operation>","ai.operation.parentId":"|<some ids>","ai.operation.name":"GET /auth/login","ai.location.ip":"::1","ai.internal.sdkVersion":"dotnetc:2.11.0-21474","ai.internal.nodeName":"<subscription>"},"data":{"baseType":"EventData","baseData":{"ver":2,"name":"SAML_Authentication_Initiated","properties":{"DeveloperMode":"true","AspNetCoreEnvironment":"Local"}}}}
Tried from javascript as well, can see following successful post request in browser console:
POST https://dc.services.visualstudio.com/v2/track
[{"time":"2019-12-05T19:00:21.781Z","iKey":"<instrumentkey>","name":"Microsoft.ApplicationInsights.<instrumentkey>.Event","tags":{"ai.user.id":"<user>","ai.session.id":"<session>","ai.device.id":"browser","ai.device.type":"Browser","ai.operation.name":"/public","ai.operation.id":"<operationid>","ai.internal.sdkVersion":"javascript:2.3.1"},"data":{"baseType":"EventData","baseData":{"ver":2,"name":"CustomEvent","properties":{},"measurements":{}}}}]
Response
{"itemsReceived":1,"itemsAccepted":1,"errors":[],"appId":"<application id>"}
Not sure how much time Azure needs to process custom event or should I create support ticket or something is wrong at my end.
Application insights usually takes 3-5 minutes before data begins appearing in the portal, see the Note section of this official doc.
If you worry about the data is missing, you can use Flush() method.
And if it always takes more than 5 minutes before data appearing in portal, you should consider opening a support ticket to get professional help.

Send message to azure queue Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException

I'm trying to follow along with this tutorial https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-multi-tier-app-using-service-bus-queues/ on azure queues but I opted for using an MVC app instead of the web role. I have everything working up to step 9 of the create a web role where it says you should now be able to hit submit and watch the message count increase of your queue on page.
Instead I get An exception of type 'Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException' occurred in Microsoft.ServiceBus.dll but was not handled in user code
Additional information: 40400: Endpoint not found.
on the step 8 line when it send the message to the queue. It detects the queue as being there or it wouldn't skip over the check for is it created so I have to think it's some kind of access issue.
Can someone please assist me?
So funny enough I had all the code correct as per the tutorial but after checking the error definition metadata it says that entity not found usually means it can't find the queue. So as a shot in the dark I looked at this line
OrdersQueueClient = messagingFactory.CreateQueueClient(
"OrdersQueue");
and guessed that maybe the OrdersQueue was actually supposed to match the name of my queue which I overlooked during my first go through. So if you get entity not found make sure you check your connection string and queue name in the azure portal. Hope this is helpful.

Resources