Azure Functions live event stream is not working - azure

I have deployed a new Azure Functions based on the template - HttpTrigger-CSharp.
It works fine whenever i invoke it from the webUI or from Postman.
However, the live event stream is not working as expected. I don't see any statistics being populated in the live event stream - everything is zero.
Is there anything which need to be done / configuration / etc?
Thanks,
Aries

According to this, "there is a known issue that may cause your data to fail to be populated. If you experience this, you may need to close the browser tab containing the live event stream and then click live event stream again to allow it to properly populate your event stream data".
As for the question, no this works out of the box, if it doesn't try closing the browser, opening Azure Portal, then navigating to the Function blade, click Monitor, wait for it to fully load, and then click Live event stream.
Also, this may not work, if you've created your function recently, just try to wait 5 minutes and try again.

Related

Azure Monitor Data Collector API Powershell sample doesn't work

I tried to use the PowerShell sample https://learn.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api#powershell-sample without any changes.
It completes with status 200 (OK) and correctly creates a new table with LogType (MyRecordType) within the Custom Logs in the portal (Log Analytics Workspace->Logs).
However, the events that are submitted don't turn up there - there are always "No results from the last 24 hours". Also, within the new table, none of the custom properties are created.
Has anybody observed a similar problem? (Some people seem to be using the C# code successfully.) Thanks!
Crazy... on the next day, all the events had turned up in the Log Analytics workspace. Even new events that I generated turned up immediately.
It seems this was a glitch just on that day. Well, the API is in "preview"...

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.

Azure Media Service - No compatible source found for this media

I'm trying to use Azure Media Services to live stream an IP cam through OBS.
So I'll try to describe my setup.
I added a new Media Service via the Azure Portal.
It has it's own storage account.
Still in the portal in that Media Service I choose 'Browse Channels'.
Here I create a new channel, I tried Live Encoding and Pass Through. I get the same result with both.
So the channel is created, I wait until it is started and I open that blade of the channel.
I copy the Primary Injest endpoint and copy that in the settings of OBS, as a stream key I use the name of the channel/account (I picked the same name for both) and start streaming from OBS.
I then click more in the top right of the blade and pick 'Watch preview'.
A new blade opens with a player with an error in it.
When I copy the playback url and open it in VLC it plays correctly for roughly 30 seconds.
Now if I add a new Program back in the Channel Blade it adds it, and starts it up. When started I open the Program Blade and get a loading screen which doesn't end. Looking in the network tab of the developer tools, no errors are present and no open requests.
When I refresh the page I sometimes get the following:
I don't like the red icon but okay. I click the locator and get this:
Clicking the blue box opens a new Blade with a generic error:
With the following error in the dev console:
When trying to open the url from the Locator Blade or the Program Blade in VLC it doesn't open.
I once had the problems I'm having now, but a couple of days later they were resolved without action from my side.
Now I'm having the same problems again.
I tried recreating everything from scratch, but I get the same errors.
From the comment, it seems that all the problems were solved now.
Here is just my experience which may answer your question. I used to have the same issue, and finally I found that I need to start the stream endpoint. At least one stream endpoint needs to be started before we can provide a video streaming service.
If you want to preview the live stream, you need to start the stream endpoint too, as all the stream content will be delivered from stream endpoints.
Update:
You can start a stream endpoint on the portal:
Navigate to your azure media service resource.
Click the "Streaming endpoints" label.
Then you will see all the streaming endpoints you have.
Choose one endpoint, and you can start or stop it in the showing page.

powerbi not refreshing in time

I am having the same issues with powerBI ,seems the automatic refresh its failing ,i currently have to click refresh to see new data coming in ,i have configure the the tumblingwindow part e.g tumblingwindow(second,3),done the live to dashboard are the any other settings/factors i have to set for the automatic refresh to work.(its a console app that selects data from database and sends each row to event hubs from event hubs to stream analytics then output is powerBi ).i am assuming the is time restrictions depending on throughput but how do i really calculate the time for tumblingwindow i should set ,i have tried the equation entitycount*60*60/throughput = seconds still no success.
below is a code but still the events take time to reach powerBi even after tumblingwindow(second,3) ,i could stop my application running then delete the dataset from powerbi ,but then the dataset will reappear
EventData data = new EventData(Encoding.UTF8.GetBytes(serializedobjects));
eventHubClient.SendAsync(data);
Overall workflow you describe seems fine and tumbling window size should not cause the data to never show up. You will have to debug this issue, with following steps
Goto Azure portal, inputs page for the stream analytics job and get a "sample". Does it return you any samples?
Goto Monitoring page in azure portal and check if input events and output events are greater than zero. If you see input events but don't see output events, you are likely hitting an error writing to output.
Also check if operation logs has any errors for this job.
Above steps should tell you if something is wrong with event format or the output.
Are you pinning the individual live tile to the dashboard or the entire report? Pinning the entire report does not appear to work.
If you pin the single tile containing the data you want, does that refresh in real time?

UILocalnotification is not appearing when the application is in the background

I have a monotouch application which has a timer and gets the data from the server.
Once the data is received i want to show the notification on the status bar.
It wrks fine when the app is in foreground. When the app is in background ,neither the timer nor the notification works
Please help me in rectifying this issue.
getting you app to run in the background is easy, add App registers for location updates in the info.plist, create a CLlocation singleton register for significant location change and you are done, your app will be resurrected every time there is a significant location change
When an iOS app transitions to the suspended (i. e. backgrounded) state, it stops its timers and disables locl notifications (and does some more memory optimization-related actions). A possible solution (JB only) to display user alerts while your app is in the background is to run a server (true unix server which is not bothered by an app getting backgrounded!) and use the undocumented CFUserNotificationDisplayAlert() function (just google it).
Your best chance is to extend the lifetime of your app by a little bit, by requesting a grace period in the background. As long as you receive this message during this time frame, you will be able to post the notification.
You do this by calling UIApplication.BeginBackgroundTask. This will let you run for a little bit, and the method you pass will be invoked shortly before your grace period runs out.
When you have an App with registers for location updates it seems to always run in the background to a certain extent, as you get significan location changes and you get the enter/exit regions, so you app is running code or is being waken up to run code... the problem is that the UILocalnotification doesn't trigger a sound and alert consitently ( but all the calls are displayed in the notification center... ) The big problem here is that the significan location changes, and the enter/exit regions are useless if you can not notify your user reliably.... is CFUserNotificationDisplayAlert() the only solution to trigger an alert to the user... ? does it work ? will your app be rejected if you use it ?
I got this working as follows :(Not a good design, but a working one)
Addded location support in info.plist, create a clocation manager and kept on requsting the location services. On the same loop schedule the UIlocalnotification .
It works perfectly. :)
NOTE : One issue is that it will give the user a propmpt as "This app uses your location, Do you want o allow"

Resources