Client_os is always shown as linux, browser version is correct RRS feed

  • Question

  • I run a java web application which we instrumented for azure insights.

    Data is showing in the portal, users and sessions are correct, we can see which browsers are used, but all operation systems are shown as "linux",

    I checked the Logs and in the pageview view : Client_type is always "PC" and Client_model is always "Other", Client_OS is "Linux"

    Same for request. The Client_Browser is all correct. (So I assume that the UserAgent is correctly transferred)

    What could be the problem, where do you start debugging?

    Thursday, January 24, 2019 7:40 PM

All replies

  • Hello McGinkel,

    Thanks for reaching out to us! We're investigating the issue and will get back to you shortly.

    Friday, January 25, 2019 6:17 PM
  • Hello McGinkel,

    As an attempt to reproduce the reported issue, I instrumented my java Web application configuring it to send telemetry to Application Insights and added the Javascript SDK to a web page to record browser telemetry. I tried to reach the App service from different platforms like Windows 10, iOS 12.1 and even Android 7.0, and noticed the following values registered in both the Portal, and Log Analytics:


    • client_Type => "PC"
    • client_Model => "Other"
    • client_OS => "Windows Server 2016"
    • client_Browser => "Chrome 71.0"


    • client_Type => "Browser"
    • client_Model => "Other", "iPad", "Generic Smartphone"
    • client_OS => "Windows 10", "iOS 12.1", "Android 7.0"
    • client_Browser => "Chrome 71.0", "Chrome Mobile iOS 71.0", "Chrome Mobile 71.0"

    To understand the properties of telemetry sent from Application Insights SDKs to the portal, please check the Application Insights Export Data Model.

    Meanwhile, I would also encourage you to check if:

    • the Javascript SDK is configured appropriately as described here. Please note that the script should be inserted just before the </head> tag of every page you want to track.
    • the instrumentation key to set up both your client and server telemetry is the same, so that the data will appear in the same Application Insights resource, and you'll be able to correlate events from client and server.

    Please verify the above options and let us know if it works for you. Else, please feel free to revert with questions!

    Monday, January 28, 2019 5:00 AM
  • Hi,

    Maybee to clarify my setup: I did not install the javascript library, but registered the pageviews on the server using trackPageview. (we have all the page navigation on the server anyway)

                PageViewTelemetry pageViewTelemetry = new PageViewTelemetry(simplyfiedPageName);

                String session = request.getSession().getId();



    What I find strange is that the browser and ipaddress is pickup properly, while the client_os is not.

    Monday, January 28, 2019 10:57 AM
  • Please help us with the following details:

    • How is the client_OS property being picked up?
    • Is your webapp is hosted on a Linux environment?

    Also, this doc can give you more insight into the context fields.

    Tuesday, January 29, 2019 7:07 PM
  • I never set the Client_os property myself. (I assumed it would be set based on useragent htpps header). I did notice that if i run the application as developer on my windows machine is see "Windows 10" as operation system. So it looks like the Client_os is actually the server OS.

    device type is always "PC", but device model is nicely filled with "Other", "iPad", "iPhone", "Samsung xxx"

    The application is hosted on a linux server (kubernetes)

    • Edited by McGinkel Wednesday, January 30, 2019 9:56 PM
    Wednesday, January 30, 2019 9:53 PM
  • Exactly, since you are tracking pageViews from the Server-side itself, and your server is a Linux machine, client_OS is defaulting to "Linux" always, and device type to "PC", whereas browser and IP address are rightly shown as they're set from the request headers.

    The best practice here would be to configure Javascript SDK to collect client-side telemetry.

    Another way of doing this is detailed in this Azure blog.

    Thursday, January 31, 2019 7:24 AM
  • Thanks for the time time you take to answer.

    You describe the behaviour as I reported it, but that is not what I would expect.

    Lets forget the client side javascript and focus on the requests that are captured on the server.

    Why would I see "Linux", "PC" for client OS, and have that replaced by the server OS? Why are they not picked up from the request headers? Is there any thing I can do to force this behaviour? (without duplicating code to parse the http header myself?)


    Thursday, January 31, 2019 7:55 AM