In application insights I run the following query against the requests table:
requests
| where timestamp > ago(30d)
| where resultCode contains "401"
| order by timestamp
the client_Type column contains only PC values. The API monitored is called by both PCs and mobile devices (smartphones and PDAs). I need to find out if any failed 401 calls have been made from mobile devices.
I tried googling the possible values and found this page https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/requests (which is not helpful).
What values in column client_type would indicate a mobile device? Are there any other methods to separate between PC and mobile devices?
Can this answer your question?
I assume that you wanna to know the client_Type, such as pc, iphone(ios), mobile phone(android), pad... So maybe the OS type can help to divide the clients.
requests
| where client_OS has "microsoft"
By the way, according to this doc, it seems only having 2 enum values of client_type: browser or pc?
Related
I found this app in Splunkbase called 3D Graph Network Topology Visualization (GitHub link) and I've added it to my Splunk environment.
I'm performing a simple search for a large amount of data and using this visualization tool. However, the visualization tool sometimes takes large amounts of time to load the final results. So I did some discovery.
Here is my SPL
index=test source=mysource
| dedup myaddress myneighboraddress
| stats values(vendor), count by myaddress, myneighboraddress
| table myaddress myneighboraddress count
Edit I've taken #warren suggestions (below) and updated my search. Although this does improve my search time, I don't believe the core issue was with my search.
index=test source=mysource
| fields - _raw
| fields myaddress myneighboraddress vendor
| stats values(vendor) as vendor count by myaddress, myneighboraddress
After checking the Job Inspector, I've noticed my search only takes from 1 second up to 5 seconds. However, depending on the total events I return (using the splunk head command), I noticed lengthy load times for the visualization to actually display anything. After my search is complete, and while the visualization is trying to process the graph, my browser will also bring the popup saying "Page Unresponsive: you can wait for it to becomes responsive or exit the page. Do you want to Wait?" because of how long the process is taking.
I've read the README and confirmed my chrome://gpu has "Hardware accelerated" turned on entry WebGL. Additionally, I confirmed my chrome://settings has the option "Use hardware acceleration when available" enabled. I have noticed when my search is complete, and the visualizer is trying to finish processing, my GPU will go to near 0% until everything is officially loaded in (but still choppy with dropped frame rate). I know there is a ticket for this, but it was last updated in 2020.
So my questions are:
Are there certain bench marks for hardware?
How dependent on a good GPU is the visualization to build out the graph?
Are there benchmarks on total events/nodes for the visualization results posted somewhere? I've seen the example images provided on the ReadMe that show approx 2k and 6k total events. Is anything above 10k events/nodes out of the question?
Are there any ways to speed up the initial loading of the visual results after a search has been performed?
I've performed my own benchmark tests, and would like to know if this is normal or if I'm doing something incorrect. My test is based entirely when my search is completed and right as the visualizer starts to process the graph. So I will use | head X at the end of my search (shown above) where X is my number below column 1:
head of X (total nodes)
Total seconds to load (after search completes)
20,000
42
15,000
21
10,000
12
8,000
10
6,000
7
5,000
4.7
4,000
2.5
See if this simplified version helps you at all (dedup is rarely the proper tool to use, and is almost always pointless to run before stats in the manner you're doing it):
index=test source=mysource vendor=* myaddress=* myneighboraddress=*
| fields - _raw
| fields myaddress myneighboraddress vendor
| stats count by myaddress myneighboraddress
Depending on the size of events, dropping _raw can be a huge performance improver. Likewise to only keeping the fields you care about
I removed the values(vendor) since your | table was immediately removing it
If you want it left in, do this stats line instead:
| stats values(vendor) as vendors count by myaddress myneighboraddress
Currently, it seems the simple answers (at the time of this post) are the following:
There are no benchmarks (that can be found)
Even though the GPU acceleration was enabled in my browser, its unclear benchmarks for specific GPU hardware
There are no benchmarks posted anywhere to assist it total nodes the app can display (in a reasonable time)
Unknown on how to boost loading time of the visual
I am new to implement Android notification channel in Oreo. What is the maximum number of notification channels for a single application. Can we create unlimited channels or it has some count?
As far as I know there is no limit on the number of channels an app can create. The only purpose of NotificationChannel is to give more control of notification behavior to the user. It is no way to reduce the number of notification per app.
You can read about Notification Channel in detail at Create and Display Notification on Android Oreo | With Example
There is a limit that is not documented on the number of channels you can have at the same time, but no limit on how many times you can create a channel, as long as you have deleted other channels.
The file PreferencesHelper.java contains a limit that is currently set to 50.000
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/services/core/java/com/android/server/notification/PreferencesHelper.java
And this is being used to restrict the creation of more channels when it goes over that limit, throwing the exception "Limit exceed; cannot create more channels"
Unfortunately that value is not publicly accessible, so any limit check you might want to implement will have to be hardcoded by yourself. My suggestion is to set your own limit to a number that you think starts being unreasonable, and when that is reached you run a check on your notification channels to figure out what is going on, and fix it. For example, if your app will never need more than 5 channels to be created, then setting the limit to 6 would be a good way to start.
The commit https://github.com/aosp-mirror/platform_frameworks_base/commit/f528b337dd48b7e8071269e07e610bd4a3668c75 update the max notification channel to 5.000
Coming with Android Oreo, Notification Channels are something a developer uses to break down the notifications his or her app can give to us by type. The channels are decided by the people doing the developing, and the idea is to give us a way to separate out the notifications that are important to us from the ones that aren't, then decide how they will be shown. Some apps will have a lot of different channels. Some will have just a few and some will have only one.
In versions of Android before O, a developer used what was called a priority level to decide how to show you a notification. If they felt the notification was important, they could set it to peek (show a visual indication on your screen) or make a sound, or both. If they felt it wasn't it would just be placed in the tray for you to see the next time you went through them.
Now they break things out into channels and we get to decide how each type of notification is displayed. All notifications of the same type (for example, a reply on your Twitter feed) are placed into the same channel without any other types of notification grouped with them.
As a bonus, apps that allow us to use more than one account can have channels for each combined — your personal email and work email can follow the same rules and show you things the same way no matter which accounts received the notification.
You should read this:
https://developer.android.com/guide/topics/ui/notifiers/notifications.html#ManageChannels
Example:
I want to get number of session from mobile device and non-mobile device in Yes/No format like:
Mobile Device Count
Yes 150
No 670
I tried using metric "ga:sessions" and dimension "ga:deviceCategory". But it's showing data for mobile,desktop,tablet etc.
I heard about custom dimensions but I don't know about its use. Can someone please help me on this. I am working on Google Analytics for first time.
You can use segments to isolate your data.
Segments let you isolate and analyze subsets of your Analytics data. You use the Segment builder to configure the individual filters that together constitute a Segment. You then apply Segments to your reports and dashboards so you can see that specific data.
Here are a few helpful default segments Google provides:
Mobile Traffic
Mobile and Tablet Traffic
Tablet Traffic
Tablet and Desktop Traffic
More on segments: https://support.google.com/analytics/answer/3124493?hl=en
I try to identify what data is actually collected by the default script of Google Analytics. What seems to be an easy question turns out to have no clear answer.
I know that they (for example) collect the IP-address, screen resolution, operating system and so forth ... but I simply do not find a complete list. I also have a list of all the possible dimensions and metrics that can be collected, but not for the "default" analytics script.
I ask for a list of all the data collected by default by Google Analytics.
... identify what data is actually collected by the default script .... I also have a list of all the possible dimensions and metrics that can be collected
Just to be clear, GA collects more information than what they share with Analytics consumers. While their client-side script may allow for additional data to be collected (like custom query string parameters), most of what they collect data seems to be similar on every site, regardless of what the analytics user chooses to consume (with the exception of a few configuration items such as "anonymizeIp").
Google's policies are cleverly worded to indicate that turning on "Advertising Features" doesn't necessarily change what they collect with GA, other than the fact that a new cookie might be present:
By enabling the Advertising Features, you enable Google Analytics to
collect data about your traffic via Google advertising cookies and
identifiers
Knowing what GA collects (even when you don't ask it to) is particularly important given the ambiguity around whether GA is really GDPR compliant (which includes IP addresses, cookie identifiers, and GPS locations as "personal data").
Looking at the source code
Google Analytics is a moving target, BUT there is value in having a snapshot of the identifying information about the client and browser that was being leaked to Google Analytics at a given point in time,
Even though it's a bit outdated, this analysis was done using a Manually Deobfuscated Google Analytics javascript file, snapshot taken Mar 27, 2018.
1. Data available in Document and Window Objects
Some key objects to look for in the analytics JS: DOCUMENT, WINDOW, NAVIGATOR, SCREEN, LOCATION
Here are the items that are utilized by GA (doesn't necessarily mean this data is sent back to google in a raw form).
Data Utilized | Code Snippet
------------- | ------------
Url | LOCATION.protocol + "//" + LOCATION.hostname + LOCATION.pathname + LOCATION.search
ReferringPage | DOCUMENT.referrer
PageTitle | DOCUMENT.title
HowLongIsPageVisible | DOCUMENT.visibilityState .. DOCUMENT,"visibilitychange"
DocumentSize | DOCUMENT.documentElement .clientWidth && .clientHeight
ScreenResolution | SCREEN.width SCREEN.height
ScreenColors | SCREEN.colorDepth + "-bit"
ClientSize | e = document.body; e.clientWidth && e.clientHeight
ViewportSize | ca = [documentEl.clientWidth .... : ca = [e.clientWidth .... ca.join("x")
FlashVersion | getFlashVersion
Encoding | characterSet || DOCUMENT.charset
JSONAvailable | window.JSON
JavaEnabled | NAVIGATOR.javaEnabled()
Language | NAVIGATOR.language || NAVIGATOR.browserLanguage
UserAgent | NAVIGATOR.userAgent
Timezone/LocalTime | c.getTimezoneOffset(), c.getYear(), c.getDate(), c.getHours(), c.getMinutes()
PerformanceData | WINDOW.performance || WINDOW.webkitPerformance ... loadEventStart,domainLookupEnd,domainLookupStart,connectStart,responseStart,requestStart,responseEnd,responseStart,fetchStart,domInteractive,domContentLoadedEventStart
Plugins | NAVIGATOR.plugins
SignalUserLeaving | navigator.sendBeacon() // how long the user was on the page
HistoryLength | WINDOW.history.length // number of pages viewed with this browser tab
IsTopSiteForUser | navigator.loadPurpose // "Top Sites" section of Safari
NameOfPage (JS) | WINDOW.name
IsFrame | WINDOW.top != WINDOW
IsEmbedded | WINDOW.external
RandomData | WINDOW.crypto.getRandomValues // because of the try/catch, it doesn't appear to leak anything other than random values
ScriptTags | getElementsByTagName("script"); // probably for Ads, AutoLink decorating [https://support.google.com/analytics/answer/4627488?hl=en] and cross-domain tracking [https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain]
Cookies (JS) | DOCUMENT.cookie.split(";") // limited to cookies not marked as server only
2. Data available from the QueryString and Hash
By default, GA seems to only explicitly collect querystring parameters that are documented as specific to Google Analytics. But keep in mind that they also have the entire URL available to extract this data server-side, querystring and hash included:
_ga
_gac
gclid
gclsrc
dclid
utm_id
utm_campaign
utm_source
utm_medium
utm_term
utm_content
3. Data available in the HTTP Header
They can choose to capture anything on the request header from the browser. Most notably:
Cookies (Google) | for the google analytics domain, to track the user between sites
IP Address | (parameter "anonymizeIp" claims to anonymize the IP address)
Browser w/ version |
Operating system |
Device Type |
Referer | (in this context, only the url of the page the client is currently on)
X-Forwarded-For | Is a proxy being used? And, if not used for privacy, the actual IP address
4. Other inferred data
Javascript enabled
Cookies enabled
Other identifying information they don't appear to track/utilize
Some other metrics that are readily available, but GA doesn't appear to access:
Canvas Supported
CPU Architecture
CPU Number of cores
AudioContext Supported
Bluetooth Supported
Battery Status
Memory (RAM)
Number of speakers
Number of microphones
Number of webcams
Device Orientation
Device input is Touchscreen
System Fonts
LocalStorage Data
IndexedDB Data
WebRTC Supported
WebGL Supported
WebSocket Supported
Misc Hacks
They don't appear to use any known hacks to extract additional unique user information, such as finding the video card model of the current machine using Canvas and GL. This is not too surprising, since Google can just expose any data they want in chromium/webkit.
However, their control of 70% of the browser market gives them the power to manipulate otherwise innocuous functions (like the random number generator) to leak data for user tracking, if they so desire.
Summary
What you choose to see from the Google Analytics portal does not necessarily impact what they collect.
GA helps Google determine how well a site performs for Search Ranking, and creates a User Fingerprint to track what each internet user looks at and for how long. The latter helps them select ads, which is where they make the bulk of their money. Much of the data they touch in their script doesn't get sent back in raw form, but rather, is used to create said fingerprint.
If you dig deeper you'll find plenty of literature on Google Analytics architecture.
According to the official documentation:
Google Analytics works by the inclusion of a block of JavaScript code
on pages in your website. When users to your website view a page, this
JavaScript code references a JavaScript file which then executes the
tracking operation for Analytics. The tracking operation retrieves
data about the page request through various means and sends this
information to the Analytics server via a list of parameters attached
to a single-pixel image request.
Source: How Does Google Analytics Collect Data?
Additional reading: Google Analytics Features
I think to find out what information GA collects, it is better to take a look at Google's general policy:
" We collect information to provide better services to all of our users – from figuring out basic stuff like which language you speak, to more complex things like which ads you’ll find most useful, the people who matter most to you online, or which YouTube videos you might like.
We collect information in two ways:
Information you give us. For example, many of our services require you to sign up for a Google Account. When you do, we’ll ask for personal information, like your name, email address, telephone number or credit card. If you want to take full advantage of the sharing features we offer, we might also ask you to create a publicly visible Google Profile, which may include your name and photo.
Information we get from your use of our services. We collect information about the services that you use and how you use them, like when you watch a video on YouTube, visit a website that uses our advertising services, or you view and interact with our ads and content...."
Source : http://www.google.com/policies/privacy/#infocollect
I would like to know how I would go about finding out the 'current' MNC from a UK mobile phone number?
I have given out a collection of numbers to companies, and they returned the "original MCC/MNC" & the "current MCC/MNC" codes, all checked out fine.
I would like to know how this was done in the first place? Its easy to find the original MCC/MNC codes, but I'm having trouble with the current MCC/MNC.
To obtain the current MCC / MNC (or NWC - Mobile Network Code) for a mobile number you can take a number of approaches. Based on your comment I'm going to combine a little background information also.
Getting the original MCC / MNC
This is relatively easy as long as you have a reliable source of data. The MCC is relatively simple to deal with as MCC's don't change all that often. MCC being the Mobile Country Code designated by ITU-T. MNC's are a little more tricky because they can change over time. The ITU-T also distributes these allocations and regularly publishes updates or should I say the GSMA does.
Getting current MCC / MNC
Here you have a number of factors to consider. One of them you have already mentioned. Here are some more possibilities:
Mobile porting - Transfer of a mobile phone number from one operator to another
Roaming - The mobile phone number is currently registered on a "foreign" mobile network
Both of these factors mean that just using the mobile phone number is not an option for finding out the current MCC / MNC. It is really a question of how accurate you need the information to be. And of course how much money you want to spend finding it out.
So finally to the original question. The short answer is no you do not have to be a member of ITU to have access to this information. The long answer is that you need access either to the ITU publications. As I recall the following are ways of obtaining the information you need:
GSMA (GSM Association) regularly publishes updates to NWC's (Mobile Network Codes) in document form. This together with numbering schemes for every country using GSM networks.
Neustar (http://www.neustar.biz) provides an API which you can query for the currently registered (non-roaming) mobile phone numbers. They also provide portability information which is updated at various rates depending on country and operator. Effectively they are the root of all portability information for the GSMA.
Some mobile operators for example Deutsche Telekom in Germany provide an API to obtain daily updated portability information for the whole of Germany.
Companies with SS7 connectivity (basically the GSM cloud where mobile operators interoperate) can query realtime the mobile phone numbers current network registration. This also includes whether the mobile phone number is roaming or not.
This information is priceless for many companies and GSMA rightly so ensures that only companies and people who can responsibly manage this information are allowed to obtain it.
You can use this nuget package.
Sample code:
var IsViablePhoneNumber = PhoneNumberUtil.IsViablePhoneNumber("989123456789");
var MCC_MNC = PhoneNumberUtil.GetMCCMNC("989123456789");
var Operator = PhoneNumberUtil.GetOperator("989123456789");
var Brand = PhoneNumberUtil.GetBrand("989123456789");
var OperatorStatus = PhoneNumberUtil.GetOperatorStatus(232 ,10);
var OperatorType = PhoneNumberUtil.GetOperatorType(232 ,10);