Skip to content

Commit

Permalink
Merge pull request microsoft#85 from rajkumar42/dev/janraj/telemetry
Browse files Browse the repository at this point in the history
Adding telemetry for Engine.
  • Loading branch information
gregg-miskelly committed Oct 7, 2015
2 parents 71d7f69 + 59193e2 commit 83525d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/AndroidDebugLauncher/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void IPlatformAppLauncher.SetupForDebugging(out LaunchOptions result)
if (launchErrorTelemetryResult != null)
{
Telemetry.SendLaunchError(launchErrorTelemetryResult);
Telemetry.SendLaunchError(launchErrorTelemetryResult, _targetEngine.ToString());
}
}
);
Expand Down
8 changes: 6 additions & 2 deletions src/AndroidDebugLauncher/Telemetry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using MICore;
using Microsoft.Internal.VisualStudio.Shell;
using Microsoft.Internal.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Shell;
Expand All @@ -21,6 +22,7 @@ internal static class Telemetry

private const string Event_LaunchError = @"VS/Diagnostics/Debugger/Android/LaunchFailure";
private const string Property_LaunchErrorResult = @"VS.Diagnostics.Debugger.Android.FailureResult";
private const string Property_LaunchTargetEngine = @"VS.Diagnostics.Debugger.Android.TargetEngine";

#region LaunchFailure support

Expand Down Expand Up @@ -101,9 +103,11 @@ public static string GetLaunchErrorResultValue(Exception exception)
return exception.GetType().FullName;
}
}
public static void SendLaunchError(string launchErrorTelemetryResult)
public static void SendLaunchError(string launchErrorTelemetryResult, string targetEngine)
{
SendEvent(Event_LaunchError, new KeyValuePair<string, object>(Property_LaunchErrorResult, launchErrorTelemetryResult));
SendEvent(Event_LaunchError,
new KeyValuePair<string, object>(Property_LaunchErrorResult, launchErrorTelemetryResult),
new KeyValuePair<string, object>(Property_LaunchTargetEngine, targetEngine));
}

#endregion
Expand Down
3 changes: 2 additions & 1 deletion src/MICore/LaunchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ public enum TargetArchitecture

public enum TargetEngine
{
Unknown,
Native,
Java
Java,
}

public enum LaunchCompleteCommand
Expand Down

0 comments on commit 83525d5

Please sign in to comment.