Skip to content

Commit

Permalink
Remove all the telemetry
Browse files Browse the repository at this point in the history
Now we won't have the Application Insights binaries embedded into the
SDK.
  • Loading branch information
ForNeVeR committed Nov 15, 2019
1 parent a45b63a commit aa64176
Show file tree
Hide file tree
Showing 42 changed files with 17 additions and 1,142 deletions.
56 changes: 14 additions & 42 deletions ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,20 @@ Team Explorer Everywhere Plugin for Eclipse incorporates third party material fr
9. Apache Velocity version 1.6.2 (https://github.com/apache/velocity-engine)
10. Apache Xerces Java version 2.8.0 (https://github.com/apache/xerces2-j)
11. Apache XmlSchema version 1.4.4 (http://ws.apache.org/xmlschema/index.html)
12. Application Insights-Java (https://github.com/Microsoft/ApplicationInsights-Java)
13. EMMA version 2 (https://sourceforge.net/projects/emma/files/emma-release/)
14. Google Guava version 12.0.1 (https://github.com/google/guava)
15. HSQLDB version 1.8.0 (https://sourceforge.net/projects/hsqldb/files/hsqldb/)
16. Jackson Core version 2.4.1 (https://github.com/FasterXML/jackson-core)
17. JSch version 0.1.44 (https://github.com/is/jsch)
18. JSR-305 version 1.3.9 (http://jsr-305.googlecode.com/svn/trunk/)
19. JUnit version 3.8.2, 4.8.1 (https://sourceforge.net/projects/junit/files/junit/)
20. JUnit version 4.8.2 (https://github.com/junit-team/junit)
21. ProGuard version 4.3 (https://sourceforge.net/projects/proguard/files/proguard/)
22. Stax2 version 3.0.1 (https://github.com/FasterXML/stax2-api)
23. SWTBot version 2.0.0, 2.0.5 (https://github.com/eclipse/swtbot)
24. Taglets version 2.0.3 (http://taglets.sourceforge.net/development/index.html)
25. Woodstox version 4.0.3 (https://github.com/FasterXML/woodstox)
26. WSDL4J version 1.6.2 (https://sourceforge.net/projects/wsdl4j/files/WSDL4J/)
12. EMMA version 2 (https://sourceforge.net/projects/emma/files/emma-release/)
13. Google Guava version 12.0.1 (https://github.com/google/guava)
14. HSQLDB version 1.8.0 (https://sourceforge.net/projects/hsqldb/files/hsqldb/)
15. Jackson Core version 2.4.1 (https://github.com/FasterXML/jackson-core)
16. JSch version 0.1.44 (https://github.com/is/jsch)
17. JSR-305 version 1.3.9 (http://jsr-305.googlecode.com/svn/trunk/)
18. JUnit version 3.8.2, 4.8.1 (https://sourceforge.net/projects/junit/files/junit/)
19. JUnit version 4.8.2 (https://github.com/junit-team/junit)
20. ProGuard version 4.3 (https://sourceforge.net/projects/proguard/files/proguard/)
21. Stax2 version 3.0.1 (https://github.com/FasterXML/stax2-api)
22. SWTBot version 2.0.0, 2.0.5 (https://github.com/eclipse/swtbot)
23. Taglets version 2.0.3 (http://taglets.sourceforge.net/development/index.html)
24. Woodstox version 4.0.3 (https://github.com/FasterXML/woodstox)
25. WSDL4J version 1.6.2 (https://sourceforge.net/projects/wsdl4j/files/WSDL4J/)


%% Annotation Detector NOTICES, INFORMATION, AND LICENSE BEGIN HERE
Expand Down Expand Up @@ -2306,33 +2305,6 @@ The Apache Software Foundation (http://www.apache.org/).
=========================================
END OF Apache XmlSchema NOTICES, INFORMATION, AND LICENSE

%% Application Insights-Java NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
ApplicationInsights-Java
Copyright (c) Microsoft Corporation
All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the ""Software""), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

=========================================
END OF Application Insights-Java NOTICES, INFORMATION, AND LICENSE

%% EMMA NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
If this version of Team Explorer Everywhere Plugin for Eclipse includes EMMA you are receiving a copy of EMMA in source code form along with Team Explorer Everywhere Plugin for Eclipse.
Expand Down
8 changes: 1 addition & 7 deletions build/build-2-init.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,7 @@
<macro.version.generate-properties-file file="${dir.global.build.output.plugins}/com.microsoft.tfs.core/src/com.microsoft.tfs.core-version.properties" />
</target>

<target name="remove_telemetry_files" if="${release.build}">
<echo message="[TFSBuildStep] Remove dev telemetry instrumentation property file for release build" />
<!-- Remove any dev properties that might already exist in this file to force default settings. -->
<delete file="${dir.global.build.output.plugins}/com.microsoft.tfs.core/src/com.microsoft.tfs.core-telemetry.properties" />
</target>

<target name="build_2_init" depends="clean_output_directory,copy_source_files,generate_version_files,remove_telemetry_files">
<target name="build_2_init" depends="clean_output_directory,copy_source_files,generate_version_files">
<echo message="[TFSBuildStep] Initialization stage complete" />
</target>

Expand Down
3 changes: 0 additions & 3 deletions build/modules/sdk/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@
<zipfileset includes="**"
excludes="META-INF/LICENSE META-INF/NOTICE"
src="${dir.binaries}/${name.dist-directory.sdk}/redist/lib/log4j-1.2.14.jar" />
<zipfileset includes="**"
excludes="commons-logging.properties META-INF/MSFTSIG.RSA META-INF/MSFTSIG.SF"
src="${dir.binaries}/${name.dist-directory.sdk}/redist/lib/applicationinsights-core-1.0.4.jar" />
<zipfileset includes="**"
excludes="META-INF/maven/**"
src="${dir.binaries}/${name.dist-directory.sdk}/redist/lib/annotation-detector-3.0.4.jar" />
Expand Down
14 changes: 1 addition & 13 deletions source/com.microsoft.tfs.client.clc/scripts/clc-launcher
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,10 @@ fi

# Standard CLC resources. Site-wide check-in policies can be dropped in
# the lib directory.
#
# 3/25/2015 Workaround added:
# Make sure that AppInsights SDK is the last in CLASS_PATH,
# otherwise it will destroy CLC logging.
#
# Can be removed after (and if) the issue is fixed in AppInsights.

AI_JAR=
for LIBRARY_JAR in "$BASE_DIRECTORY"/lib/*.jar ; do
if expr "$LIBRARY_JAR" : ".*/applicationinsights[^/]*" > /dev/null; then
AI_JAR="$LIBRARY_JAR"
else
CLC_CLASSPATH="$CLC_CLASSPATH:$LIBRARY_JAR"
fi
CLC_CLASSPATH="$CLC_CLASSPATH:$LIBRARY_JAR"
done
CLC_CLASSPATH="$CLC_CLASSPATH:$AI_JAR"

# Convert to Windows-style classpath
if [ "$PLATFORM" = "cygwin" ] ; then
Expand Down
15 changes: 1 addition & 14 deletions source/com.microsoft.tfs.client.clc/scripts/clc-launcher.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,10 @@ for %%i in ("%SETTINGS_DIRECTORY%policies\*.jar") do set CLC_CLASSPATH=!CLC_CLAS

rem Standard CLC resources. Site-wide check-in policies can be dropped in
rem the lib directory.
rem
rem 3/25/2015 Workaround added:
rem Make sure that AppInsights SDK is the last in class path,
rem otherwise it will destroy CLC logging.
rem Can be removed after (and if) the issue is fixed in AppINsights

set AI_JAR=
for %%i in ("%BASE_DIRECTORY%lib\*.jar") do (
for /F "tokens=1 delims=- " %%j in ("%%~ni") do (
if /I "%%j" == "applicationinsights" (
set AI_JAR="%%i"
) else (
set CLC_CLASSPATH=!CLC_CLASSPATH!;"%%i"
)
)
set CLC_CLASSPATH=!CLC_CLASSPATH!;"%%i"
)
set CLC_CLASSPATH=%CLC_CLASSPATH%;%AI_JAR%

setlocal DISABLEDELAYEDEXPANSION

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.microsoft.tfs.client.clc.options.shared.OptionExitCode;
import com.microsoft.tfs.client.clc.options.shared.OptionHelp;
import com.microsoft.tfs.client.clc.options.shared.OptionOutputSeparator;
import com.microsoft.tfs.client.clc.telemetry.CLCTelemetryHelper;
import com.microsoft.tfs.console.application.AbstractConsoleApplication;
import com.microsoft.tfs.console.display.ConsoleDisplay;
import com.microsoft.tfs.console.display.Display;
Expand Down Expand Up @@ -146,13 +145,7 @@ public int run(final String[] args) {
*/
ProductInformation.initialize(ProductName.CLC);

// We need to check for the no telemetry flag before we send any
// telemetry to the server
CLCTelemetryHelper.checkNoTelemetryProperty();

CLCTelemetryHelper.sendSessionBegins();
final int ret = run(args, false);
CLCTelemetryHelper.sendSessionEnds();

return ret;
}
Expand Down Expand Up @@ -339,8 +332,6 @@ private int run(final String[] args, final boolean recursiveCall) {
* Same as above but returned by some low level Core or Common
* classes, e.g. HttpHost.
*/
CLCTelemetryHelper.sendException(e);

final String messageFormat = Messages.getString("Application.AnArgumentErrorOccurredFormat"); //$NON-NLS-1$
final String message = MessageFormat.format(messageFormat, e.getLocalizedMessage());
display.printErrorLine(message);
Expand Down Expand Up @@ -405,16 +396,12 @@ private int run(final String[] args, final boolean recursiveCall) {
* The most basic core exception class. All lower level (SOAP)
* exceptions are wrapped in these.
*/
CLCTelemetryHelper.sendException(e);

final String messageFormat = Messages.getString("Application.AnErrorOccurredFormat"); //$NON-NLS-1$
final String message = MessageFormat.format(messageFormat, e.getLocalizedMessage());
log.error(message, e);
display.printErrorLine(message);
ret = ExitCode.FAILURE;
} catch (final Throwable e) {
CLCTelemetryHelper.sendException(new Exception("Unexpected exception.", e)); //$NON-NLS-1$

log.error("Unexpected exception: ", e); //$NON-NLS-1$
}

Expand All @@ -430,7 +417,6 @@ private int run(final String[] args, final boolean recursiveCall) {
display.printLine(""); //$NON-NLS-1$
}

CLCTelemetryHelper.sendCommandFinishedEvent(c, ret);
log.debug("Leaving CLC application"); //$NON-NLS-1$

return ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@ public abstract class EnvironmentVariables {
*/
public static final String NO_SUMMARY = "TFSVC_NOSUMMARY"; //$NON-NLS-1$

/**
* When set to any value, disables the sending of telemetry values.
* <p>
* IntelliJ uses this environment variable when calling the CLC.
*/
public static final String NO_TELEMETRY = "TF_NOTELEMETRY"; //$NON-NLS-1$

/**
* This environment variable is only used on Mac OS. When set to False, No
* or N PersistanceCredentialsManager will be used to store credentials
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;

import com.microsoft.tfs.client.common.ui.framework.telemetry.ClientTelemetryHelper;
import com.microsoft.tfs.client.common.ui.teambuild.editors.BuildExplorer;
import com.microsoft.tfs.core.clients.build.IBuildDetail;
import com.microsoft.tfs.core.clients.build.IQueuedBuild;
Expand Down Expand Up @@ -78,7 +77,6 @@ protected void onSelectionChanged(final IAction action, final ISelection selecti

@Override
public void run(final IAction action) {
ClientTelemetryHelper.sendRunActionEvent(this);
doRun(action);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Export-Package: com.microsoft.tfs.client.common.ui,
com.microsoft.tfs.client.common.ui.framework.sizing,
com.microsoft.tfs.client.common.ui.framework.table,
com.microsoft.tfs.client.common.ui.framework.table.tooltip,
com.microsoft.tfs.client.common.ui.framework.telemetry,
com.microsoft.tfs.client.common.ui.framework.tooltip,
com.microsoft.tfs.client.common.ui.framework.tree,
com.microsoft.tfs.client.common.ui.framework.validation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import com.microsoft.tfs.client.common.repository.TFSRepository;
import com.microsoft.tfs.client.common.ui.framework.action.SelectionProviderAction;
import com.microsoft.tfs.client.common.ui.framework.telemetry.ClientTelemetryHelper;
import com.microsoft.tfs.core.clients.versioncontrol.PropertyConstants;
import com.microsoft.tfs.core.clients.versioncontrol.PropertyUtils;
import com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Change;
Expand Down Expand Up @@ -44,8 +43,6 @@ public final void doRun() {
throw new IllegalStateException(message);
}

ClientTelemetryHelper.sendRunActionEvent(this);

doRun(repository);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.microsoft.tfs.client.common.commands.TFSCommand;
import com.microsoft.tfs.client.common.ui.Messages;
import com.microsoft.tfs.client.common.ui.config.UIClientConnectionAdvisor;
import com.microsoft.tfs.client.common.ui.framework.telemetry.ClientTelemetryHelper;
import com.microsoft.tfs.core.TFSConfigurationServer;
import com.microsoft.tfs.core.TFSConnection;
import com.microsoft.tfs.core.TFSTeamProjectCollection;
Expand Down Expand Up @@ -209,10 +208,6 @@ protected IStatus doRun(final IProgressMonitor progressMonitor) throws Exception

Check.notNull(connection, "connection"); //$NON-NLS-1$

final Map<String, String> properties = new HashMap<String, String>();
ClientTelemetryHelper.addContextProperties(properties, connection);
ClientTelemetryHelper.sendCommandFinishedEvent(this, Status.OK_STATUS, properties);

if (connection instanceof TFSTeamProjectCollection) {
/*
* Try to get the TFS2010+ Configuration Server from this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import com.microsoft.tfs.client.common.ui.framework.helper.SWTUtil;
import com.microsoft.tfs.client.common.ui.framework.helper.SelectionUtils;
import com.microsoft.tfs.client.common.ui.framework.layout.GridDataBuilder;
import com.microsoft.tfs.client.common.ui.framework.telemetry.ClientTelemetryHelper;
import com.microsoft.tfs.core.clients.workitem.query.qe.WIQLOperators;
import com.microsoft.tfs.util.CollatorFactory;
import com.microsoft.tfs.util.MRUSet;
Expand Down Expand Up @@ -136,8 +135,6 @@ public void widgetDisposed(final DisposeEvent e) {

@Override
public int open() {
ClientTelemetryHelper.sendDialogOpened(this, getTelemetryProperties());

final int ret = super.open();

// Put the focus back on the text box every time
Expand All @@ -146,17 +143,6 @@ public int open() {
return ret;
}

/**
* Returns a set of dialog specific telemetry properties that should be sent
* into the DialogOpened telemetry event. The default set of properties is
* empty. Derived dialogs may override this method. *
*
* @return
*/
protected Map<String, String> getTelemetryProperties() {
return new HashMap<String, String>();
}

/**
* Call to automatically size the popup and its shell to its content.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.microsoft.tfs.client.common.ui.framework.helper.SWTUtil;
import com.microsoft.tfs.client.common.ui.framework.layout.GridDataBuilder;
import com.microsoft.tfs.client.common.ui.prefs.UIPreferenceConstants;
import com.microsoft.tfs.core.telemetry.TfsTelemetryConstants;

public class OAuth2DeviceFlowCallbackDialog extends BaseDialog {
private static final Log log = LogFactory.getLog(OAuth2DeviceFlowCallbackDialog.class);
Expand Down Expand Up @@ -102,18 +101,6 @@ public void linkActivated(final HyperlinkEvent e) {

}

/**
* {@inheritDoc}
*/
@Override
protected Map<String, String> getTelemetryProperties() {
Map<String, String> properties = super.getTelemetryProperties();
properties.put(
TfsTelemetryConstants.OAUTH_USER_AGENT_PROVIDER,
System.getProperty(UIPreferenceConstants.USER_AGENT_PROVIDER_PROPERTY));
return properties;
}

/**
* {@inheritDoc}
*/
Expand Down
Loading

0 comments on commit aa64176

Please sign in to comment.