Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telemetry #381

Merged
merged 13 commits into from
Aug 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Build/Common.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,9 @@

<Copy SourceFiles="@(DebugSymbolsProjectOutputGroupOutput->'%(FinalOutputPath)')"
DestinationFolder="$(CopyOutputsToPath)Symbols" />

<Copy SourceFiles="@(OutputBinariesToSign -> '$(OutputPath)%(filename)%(extension)')"
DestinationFolder="$(CopyOutputsToPath)UnsignedBinaries"
Condition="'@(OutputBinariesToSign)' != ''"/>
</Target>
</Project>
Binary file modified Nodejs/.nuget/NuGet.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions Nodejs/Common/Telemetry/TelemetryEvents.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the License.
//
//*********************************************************//

namespace Microsoft.NodejsTools.Telemetry {
/// <summary>
/// Telemetry event names
/// </summary>
internal static class TelemetryEvents {
public const string ProjectImported = "ProjectImported";
}
}
24 changes: 24 additions & 0 deletions Nodejs/Common/Telemetry/TelemetryProperties.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the License.
//
//*********************************************************//

namespace Microsoft.NodejsTools.Telemetry {
/// <summary>
/// Property names for telemetry events
/// </summary>
internal static class TelemetryProperties {
public const string ProjectGuid = "ProjectGuid";
}
}
2 changes: 1 addition & 1 deletion Nodejs/NodejsTools.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22823.1
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nodejs", "Product\Nodejs\Nodejs.csproj", "{32EC5259-98DA-40CA-9E2D-1B1B2E966F88}"
ProjectSection(ProjectDependencies) = postProject
Expand Down
9 changes: 7 additions & 2 deletions Nodejs/Prerequisites/DisableSkipVerification.reg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Profiling,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.ProjectWizard,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.TestAdapter,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.VsLogger,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.WebRole,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\NodeTests,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Nodejs.AzurePublishing.Tests.UI,B03F5F7F11D50A3A]
Expand All @@ -32,6 +31,10 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.Nodejs,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI.Nodejs,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.11.0,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.12.0,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.14.0,B03F5F7F11D50A3A]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\AnalysisDriver,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\DebuggerTests,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\DebuggerUITests,B03F5F7F11D50A3A]
Expand All @@ -46,7 +49,6 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Profiling,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.ProjectWizard,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.TestAdapter,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.VsLogger,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.WebRole,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\NodeTests,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Nodejs.AzurePublishing.Tests.UI,B03F5F7F11D50A3A]
Expand All @@ -64,3 +66,6 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\TestUtilities.Nodejs,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\TestUtilities.UI,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\TestUtilities.UI.Nodejs,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.11.0,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.12.0,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.14.0,B03F5F7F11D50A3A]
4 changes: 3 additions & 1 deletion Nodejs/Prerequisites/DisableSkipVerificationX86.reg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Profiling,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.ProjectWizard,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.TestAdapter,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.VsLogger,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.WebRole,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\NodeTests,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Nodejs.AzurePublishing.Tests.UI,B03F5F7F11D50A3A]
Expand All @@ -32,3 +31,6 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.Nodejs,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI.Nodejs,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.11.0,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.12.0,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.14.0,B03F5F7F11D50A3A]
9 changes: 7 additions & 2 deletions Nodejs/Prerequisites/EnableSkipVerification.reg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Profiling,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.ProjectWizard,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.TestAdapter,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.VsLogger,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.WebRole,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\NodeTests,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Nodejs.AzurePublishing.Tests.UI,B03F5F7F11D50A3A]
Expand All @@ -32,6 +31,10 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.Nodejs,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI.Nodejs,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.11.0,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.12.0,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.14.0,B03F5F7F11D50A3A]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\AnalysisDriver,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\DebuggerTests,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\DebuggerUITests,B03F5F7F11D50A3A]
Expand All @@ -46,7 +49,6 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Profiling,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.ProjectWizard,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.TestAdapter,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.VsLogger,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.WebRole,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\NodeTests,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Nodejs.AzurePublishing.Tests.UI,B03F5F7F11D50A3A]
Expand All @@ -64,3 +66,6 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\TestUtilities.Nodejs,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\TestUtilities.UI,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\TestUtilities.UI.Nodejs,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.11.0,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.12.0,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.14.0,B03F5F7F11D50A3A]
4 changes: 3 additions & 1 deletion Nodejs/Prerequisites/EnableSkipVerificationX86.reg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Profiling,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.ProjectWizard,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.TestAdapter,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.VsLogger,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.WebRole,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\NodeTests,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Nodejs.AzurePublishing.Tests.UI,B03F5F7F11D50A3A]
Expand All @@ -32,3 +31,6 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.Nodejs,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\TestUtilities.UI.Nodejs,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.11.0,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.12.0,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Telemetry.14.0,B03F5F7F11D50A3A]
4 changes: 3 additions & 1 deletion Nodejs/Prerequisites/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ var assemblies = [
'Microsoft.NodejsTools.WebRole',
'Microsoft.NodejsTools.Npm',
'Microsoft.NodejsTools.PressAnyKey',
'Microsoft.NodejsTools.VsLogger'
'Microsoft.NodejsTools.Telemetry.11.0',
'Microsoft.NodejsTools.Telemetry.12.0',
'Microsoft.NodejsTools.Telemetry.14.0'
].sort();

var files = [
Expand Down
30 changes: 30 additions & 0 deletions Nodejs/Product/Nodejs/Nodejs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
<Reference Include="Microsoft.Build.Utilities.$(MicrosoftBuildAssemblyVersionSuffix), Version=$(MicrosoftBuildAssemblyVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.JScript" />
<Reference Include="Microsoft.NodejsTools.Telemetry">
<HintPath>..\..\Common\Telemetry\Microsoft.NodejsTools.Telemetry.$(VSTarget).dll</HintPath>
</Reference>
<Reference Include="microsoft.msxml, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
Expand Down Expand Up @@ -176,6 +179,9 @@
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<OutputBinariesToSign Include="Microsoft.NodejsTools.Telemetry.$(VSTarget).dll" />
</ItemGroup>
<Choose>
<!--
VS 2015's devenv.config.exe contains a bindingRedirect for Newtonsoft.Json
Expand Down Expand Up @@ -691,6 +697,13 @@
<Compile Include="NodejsPackage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<TelemetryFiles Include="..\..\Common\Telemetry\*.cs" />
<Compile Include="@(TelemetryFiles)">
<Link>Telemetry\%(TelemetryFiles.FileName).cs</Link>
<Visible>true</Visible>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Commands\DiagnosticsForm.resx">
<DependentUpon>DiagnosticsForm.cs</DependentUpon>
Expand Down Expand Up @@ -925,6 +938,23 @@
<ZipProject Include="ProjectTemplates\AddWebSiteAzureExpressApp\Preview.png" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\Preview.png" />
<ZipProject Include="ProjectTemplates\NodejsConsoleApp\Preview.png" />
<Content Include="..\..\Common\Telemetry\Microsoft.NodejsTools.Telemetry.$(VSTarget).dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
<VSIXSubPath>.</VSIXSubPath>
</Content>
<Content Include="..\..\packages\Microsoft.ApplicationInsights.1.2.0\lib\net45\Microsoft.ApplicationInsights.dll" Condition="'$(VSTarget)' == '11.0' Or '$(VSTarget)' == '12.0'">
<Link>Microsoft.ApplicationInsights.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
<VSIXSubPath>.</VSIXSubPath>
</Content>
<Content Include="..\..\packages\Microsoft.ApplicationInsights.PersistenceChannel.1.2.0\lib\net45\Microsoft.ApplicationInsights.PersistenceChannel.dll" Condition="'$(VSTarget)' == '11.0' Or '$(VSTarget)' == '12.0'">
<Link>Microsoft.ApplicationInsights.PersistenceChannel.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
<VSIXSubPath>.</VSIXSubPath>
</Content>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be conditional for VS versions?

<Content Include="Credits.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
Expand Down
21 changes: 20 additions & 1 deletion Nodejs/Product/Nodejs/NodejsPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
using Microsoft.NodejsTools.Options;
using Microsoft.NodejsTools.Project;
using Microsoft.NodejsTools.Repl;
using Microsoft.NodejsTools.Telemetry;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.Debugger.Interop;
Expand Down Expand Up @@ -108,6 +109,7 @@ internal sealed partial class NodejsPackage : CommonPackage {
private LanguagePreferences _langPrefs;
internal VsProjectAnalyzer _analyzer;
private NodejsToolsLogger _logger;
private ITelemetryLogger _telemetryLogger;

/// <summary>
/// Default constructor of the package.
Expand Down Expand Up @@ -236,7 +238,9 @@ protected override void Initialize() {
IntellisenseOptionsPage.AnalysisLogMaximumChanged += IntellisenseOptionsPage_AnalysisLogMaximumChanged;

InitializeLogging();


InitializeTelemetry();

// The variable is inherited by child processes backing Test Explorer, and is used in
// the NTVS test discoverer and test executor to connect back to VS.
Environment.SetEnvironmentVariable(NodejsConstants.NodeToolsProcessIdEnvironmentVariable, Process.GetCurrentProcess().Id.ToString());
Expand All @@ -256,6 +260,15 @@ private void InitializeLogging() {
_logger.LogEvent(NodejsToolsLogEvent.AnalysisLevel, IntellisenseOptionsPage.AnalysisLevel);
}

private void InitializeTelemetry() {
var thisAssembly = typeof(NodejsPackage).Assembly;

// Get telemetry logger
_telemetryLogger = TelemetrySetup.Instance.GetLogger(thisAssembly);

TelemetrySetup.Instance.LogPackageLoad(_telemetryLogger, Guid.Parse(Guids.NodejsPackageString), thisAssembly, Application.ProductVersion);
}

public new IComponentModel ComponentModel {
get {
return this.GetComponentModel();
Expand All @@ -268,6 +281,12 @@ internal NodejsToolsLogger Logger {
}
}

internal ITelemetryLogger TelemetryLogger {
get {
return _telemetryLogger;
}
}

/// <summary>
/// Makes the debugger context available - this enables our debugger when we're installed into
/// a SKU which doesn't support every installed debugger.
Expand Down
Loading