Azure Maps requests monitoring - azure

Does anybody knows, what metric is shown in Azure Maps usage diagrams?
This is what diagram looks like, and number of request in the charts significantly differs from my traffic amounts. It seems like 10-15 requests in the graph per each visitor on the site.
I suppose that charts showing amount of map-tiles loaded, where each tile load is considered as a request.
Update
The question is about using JavaScript maps control

Map loads in map control is tracked as Map tile API requests where each API request renders one tile. On Azure portal on the Azure maps usage page you can click on "Apply splitting" button and group the usage by "API name" to confirm your assumption.

It's hard to give an accurate answer without more context but usage (along with availability) itself is the metric in the graph. You can also apply filters on the graph based on API Names, API categories, Response codes etc. and it'll show you the count of requests for that specific api(s). I'm guessing you might be using the Get Map Tile API in which case each tile load is a separate request and will be counted as such on the dashboard.
If that doesn't answer you question please add more context as to what api(s) are you using and i can try and answer more accurately.

Related

Custom tags applied to Azure web app pages in Azure Application Insights

Use case: Categorizing page views in an Azure web app for analytics reporting
Using Azure Application Insights, I can see a list of pages in an Azure web app and its number of views in the past X days.
The web app is a documentation website. I would like to categorize each page with a tag like install-info or api-doc or intro-material, etc. The goal is that I can easily see information like "X number of page views were around install information" or "API pages received 25% of traffic," etc.
Currently I am exporting a table of each page and its number of views. Then I manually categorize each page in Excel. There are hundreds of pages. I would love to export a table that included a third column showing the page's custom tag.
Looking at Microsoft documentation, it sounds like this is possible with custom coding and the API, but I would like a simpler strategy if one exists, as I am not a sophisticated coder.
If there are alternative methods of achieving my goal than the solution I'm asking about in this question, I would be grateful to know.
Thank you.
If I understood you correctly, you want to add an extra tag(column) for different kind of url, right?
If that's the case, you can take use of case and extend statement of kusto.
Here is an sample code:
pageViews
| where name contains "WebApplication5"
| extend mytags = case(
//here, I'm using name for each condition, you can use other field as per your need.
name=="Home Page - WebApplication5","index page",
name=="Privacy Policy - WebApplication5","privacy page",
"others"
)
| project name,mytags
Then export the result. The test result is as below:
Please feel free to modify this code to meet your requirement, and also let me know if you still have more issues about that.

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

Performance tile showing different records for same method

Currently in Performance tile in Insight we have performance detail for the application request.
If we have an API like:
GET /order/{orderId}
so, for this kind of request, it showing as different request and matrix is also different for different orderId.
But for the owner point of view, this is a same request and needs to have shown under one request for all call for this method.
For the above mentioned API, if we have the request coming as:-
/order/1
/order/2
/order/3
Then in Azure portal, under performance tile for Application insight, it consider this as different operations and hence show stats individually for each unique request.
But as per the developer, this is a single API and needs to monitor as single operation.
How to achieve this in Azure portal?
In the Performance tab, you have the ability to add filters for your results but in your scenario I would:
Click on View in Logs (Analytics)
Select Requests
Add an appropriate contains statement: | where operation_Name contains "GET /order"
At this point the Overall line contains the total Duration Average and Count shown in the Performance tab, as well as percentile information for all orders.

Azure maps excessive hits

Currently I use azure maps fuzzy search ( https://learn.microsoft.com/en-us/rest/api/maps/search/getsearchfuzzy )
So when I do a search using GET https://atlas.microsoft.com/search/fuzzy/json?subscription-key={subscription-key}&api-version=1.0&query=1600 Pennsylvania ave Washington DC 20500 I get several results, including POI and Point Address.
This event is triggered off of an onblur event from an address change.
Last month we got billed for 5,000,000 hits from Azure when we didn't have near that many. That number should have been closer to 6000.
Is that because I am using the fuzzy search or what? I can't seem to find any information on why our hits would have been so high.
The delta seems absurdly high (6000 vs 5,000,000). Are all those 5,000,000 calls, Search Fuzzy API calls?
Can't say much without looking at the actual code but if the behavior is that in your app the "user adds an address in a form field" and when the "user finishes adding the address and clicks outside that address box (onBlur event fires)" and calls Azure Maps Search Fuzzy API - that would be one call (irrespective of it returning multiple/different categories of addresses POIs, Point Addresses etc.) - [Unless you are using the API in the "predictive" mode (param typeahead = true) and calling the API everytime the user enters a character]
I would try and check the number of calls going out to Azure Maps using any network capture tool (Fiddler/Browser n/w capture) and if they look okay then check the Azure Maps metrics for "Search Fuzzy API" in the Azure Portal to see if they look ok.
But if you are only making an explicit call to the API manually once the user finishes adding/editing the address then I don't see a reason why that call won't be recorded as 1 call on the Azure Maps side.

Paging in Azure AD graph client

We need a way to get users based on page index and page size so that we will not load all the users every time.
I have gone through with the Azure Graph Client documentation here http://blogs.msdn.com/b/aadgraphteam/archive/2014/12/12/announcing-azure-ad-graph-api-client-library-2-0.aspx
There is a way to iterate forward/backward but, i didn't found a way to get the users based on page index(i.e: i want to get users from 10-20 in the list if i pass parameters page index=2 and page size=10).
If we go with forward/backward paging, then i have to iterate through each page to find the next set of records, which I don’t want to do that.
Any help would be appreciated.
In order to accomplish the kind of pagination you're looking for, Azure AD Graph API need to support both $top and $skip OData operators. However kooking at Supported Queries, Filters, and Paging Options in Azure AD Graph API, while $top is supported but $skip isn't thus I don't believe it is possible to accomplish pagination they way you want to.
It does support $top and $skiptoken which can be used for navigating back & forth but will not serve the scenario you're looking to implement.
Sorry, currently this is not possible via the Graph Client. What you are looking for is similar to a query of a database, where you can selectively control the return set. Azure Graph does not have this capability. When you make a query, the result is returned one page at a time. You pass your token each time you are requesting the next page in the return set. There exist no way that actually tracks page 1, 2, 3... and so forth of the return set, thus, no way to say bypass pages 1 and 2 to go directly to page 3. The only capability available is next page and previous page. There is no page index maintained that can be queried. You get the your results one page at a time.
As said by MMTT here: https://social.msdn.microsoft.com/Forums/en-US/199bbf92-642a-4bcc-add4-f8023a7684e2/paging-in-azure-ad-graph-client?forum=WindowsAzureAD

Resources