[jbosstools-issues] [JBoss JIRA] (JBIDE-13990) Linux usage stats hardcoded to x86 so no data collected for x86_64

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Thu Apr 11 14:24:55 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-13990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766588#comment-12766588 ] 

Andre Dietisheim edited comment on JBIDE-13990 at 4/11/13 2:23 PM:
-------------------------------------------------------------------

The parameters for the user-agent strings are built in the following way:

https://github.com/jbosstools/jbosstools-base/blob/master/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/EclipseUserAgent.java#L76

{code:title=org.jboss.tools.usage.googleanalytics.eclipse.EclipseUserAgent}
return MessageFormat.format(
	getUserAgentPattern(getOS())
	, productId
	, productVersion
	, getOSVersion()
	, getBrowserLanguage()
);
{code}

Thus {2} is *getOSVersion()* aka *System.getProperty("os.version")*. On my system (fc16) this returns: "3.6.11-4.fc16.x86_64" and that would result in the following user-agent:

{code}
{0}/{1} (X11; U; Linux 3.6.11-4.fc16.x86_64; {3})
{code}

I did not test it yet, but I'm not sure if that would get detected correctly by GA. Furthermore this shows that fedora includes the architecture into the kernel version. Is this the case for all linux distro or should we better rely on *System.getProperty("os.arch")* - which has the other drawback to report the JVM arch (and not the OS arch)? May be need a mixture of all these to get the most reliable report in all eventualities?
                
      was (Author: adietish):
    The parameters for the user-agent strings are built in the following way:

https://github.com/jbosstools/jbosstools-base/blob/master/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/EclipseUserAgent.java#L76

{code:title=org.jboss.tools.usage.googleanalytics.eclipse.EclipseUserAgent}
return MessageFormat.format(
	getUserAgentPattern(getOS())
	, productId
	, productVersion
	, getOSVersion()
	, getBrowserLanguage()
);
{code}

Thus {2} is *getOSVersion()* aka *System.getProperty("os.version")*. On my system (fc16) this returns: "3.6.11-4.fc16.x86_64" and that would result in the following user-agent:

{code}
{0}/{1} (X11; U; Linux 3.6.11-4.fc16.x86_64; {3})
{code}

I did not test it yet, but I'm not sure if that would get detected correctly by GA. Furthermore this shows that fedora includes the architecture into the kernel version. Is this the case for all linux distro or should we better rely on *System.getProperty("os.arch") - which has the other drawback to report the JVM arch (and not the OS arch)? May be need a mixture of all these to get the most reliable report in all eventualities?
                  
> Linux usage stats hardcoded to x86 so no data collected for x86_64
> ------------------------------------------------------------------
>
>                 Key: JBIDE-13990
>                 URL: https://issues.jboss.org/browse/JBIDE-13990
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: usage
>    Affects Versions: 4.0.1.Final, 4.1.0.Alpha2
>            Reporter: Nick Boldt
>            Assignee: Andre Dietisheim
>
> [~maxandersen] found this bug today when looking at why we have no 64-bit Linux usage data:
> {code:title=https://github.com/jbosstools/jbosstools-base/blob/master/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/EclipseUserAgent.java#L35}
> 	private static final String USERAGENT_LINUX = "{0}/{1} (X11; U; Linux i686; {3})"; //$NON-NLS-1$
> {code}
> Suggestion: we should replace i686 with \{2\}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list