Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Filter user agent by dekstop OS version




We’re interested in which versions of desktop OS our users are running so we can make sensible decisions about support and end of support that are particular to our market.

This information can be pulled out of the user agent string.

Is it possible for me to get the raw logs for a period and munge myself?

Or if not - are there features in the near term backlog to see OS version as a field?



Hi @james_pipe,

A very interesting use case, and I think we can help. My advice would be to add the user-agent string from the header using a custom attribute that parses out that OS version for you. Here’s a doc on how to add custom attributes to your Transactions:

If you were a PHP user, which it looks like you aren’t, you could use the updated agent config to automatically extract the user-agent string in its entirety. On .NET, however, there are a variety of attributes that you can configure your agent to collect on transaction events without having to change your source code:

The closest thing to what you’re asking about within those is the request referrer URL, which isn’t going to help in this case.

So my thought would be for you to add the OS version as a custom attribute on Transactions, and then to enable capture_attributes for PageViews in your newrelic.config file so that the same attributes that are captured on any server Transaction are also captured for the PageView event. Hope this helps!


Thanks hshapiro, sorry it’s taken so long for me to check back on this. I’ll read through and have a go.



What about this?

SELECT count(*)  FROM PageView facet userAgentOS SINCE 1 week ago

or if you want to get fancier, you could modify this query I wrote trying to break down IE users to see how many of them were using an unsupported version (pre-9), a supported version (9 or 10) or a semi-supported version (11)

percentage(count(userAgentVersion), WHERE userAgentName='IE' and userAgentVersion  in ('6', '7', '8')) as 'IE 6/7/8',	
percentage(count(userAgentVersion), WHERE userAgentName='IE' and userAgentVersion in ('9','10')) as 'IE 9/10 ',	
percentage(count(userAgentVersion), WHERE userAgentName='IE' and userAgentVersion = '11') as 'IE 11'
FROM PageView WHERE userAgentName = 'IE' SINCE 1 week ago


@phanley I think @james_pipe is looking for the Desktop OS Version (e.g., OS X 10.7, Windows 8.1, etc.) rather than the userAgentVersion (which returns the version number for the Browser that the user is using).


This would be helpful for us as well. In particular around security decisions. Can you please just add a userOsVersion like you do with Mobile?


Hi @zdrummond - I have sent your request on to our product management team. :slight_smile:


+1 for this feature from me too! Any news of when/if it might be implemented?



I’ve gone ahead and submitted a feature request on your behalf for our product managers. Unfortunately, I don’t have an update on when or if this feature request will be implemented at this time.


Hi - Do we know when this feature will be added in new relic? This has been opened for a few years and its important.



@todd.berry.3 You can query for UserAgentOs, however right now there is no option for OS Version. I’ll get your +1 added to this feature idea.


+1 for this feature - we wouldn’t have to do all the necessary instrumentation on our end!


+1 for this feature - it is a huge need for us and probably a lot of customers.


Thanks for the +1 @pierre.baron - I’ve just added that here on our side. :smiley: