-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding basic data model telemetry support
- Loading branch information
Andrew Hall (DEVDIV)
committed
Jan 9, 2017
1 parent
f18a2f2
commit 0e314dc
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.VisualStudio.Telemetry; | ||
|
||
namespace ExperimentalFeatures.Telemetry | ||
{ | ||
public class PackageTelemetry | ||
{ | ||
public static PackageTelemetry TelemetrySession { get; private set; } | ||
|
||
static PackageTelemetry() | ||
{ | ||
TelemetrySession = new PackageTelemetry(); | ||
} | ||
|
||
public PackageTelemetry() | ||
{ | ||
|
||
} | ||
|
||
public void PackageLoaded() | ||
{ | ||
var telEvent = new TelemetryEvent(TelemetryConstants.PackageLoadedEvent); | ||
this.PostEventToDefaultSession(telEvent); | ||
} | ||
|
||
private void PostEventToDefaultSession(TelemetryEvent vsTelemetryEvent) | ||
{ | ||
TelemetryService.DefaultSession.PostEvent(vsTelemetryEvent); | ||
} | ||
|
||
private static class TelemetryConstants | ||
{ | ||
public const string ExperimentsEventPrefix = "WebTools/Experiments/"; | ||
|
||
public const string PackageLoadedEvent = ExperimentsEventPrefix + "PackageLoaded"; | ||
} | ||
} | ||
} |