-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for vs code markers (#3399)
* Add Microsoft.VisualStudio.Utilities to package references. * Add API to log telemetry markers. * Implement posting the code marker. * Emit a code marker at start of TelemetryActivity. * Use scoped ETW activity instead of singular events. * Reuse common prefix. * Add activity unit tests for TelemetryActivity. * Bracket complete activity, including timekeeping operations, inside code markers. Co-authored-by: Srdjan Jovčić <srdjanj@microsoft.com>
- Loading branch information
1 parent
ce4aa78
commit 85211a7
Showing
7 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
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
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
9 changes: 8 additions & 1 deletion
9
src/NuGet.Core/NuGet.Common/Telemetry/INuGetTelemetryService.cs
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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
|
||
using System; | ||
|
||
namespace NuGet.Common | ||
{ | ||
/// <summary> Abstraction of NuGet telemetry service. </summary> | ||
public interface INuGetTelemetryService | ||
{ | ||
/// <summary> Send a <see cref="TelemetryEvent"/> to VS telemetry. </summary> | ||
/// <param name="telemetryData"> Telemetry event to send. </param> | ||
void EmitTelemetryEvent(TelemetryEvent telemetryData); | ||
|
||
/// <summary> Log a start of telemetry activity to the event log. </summary> | ||
/// <param name="activityName"> Name of telemetry activity to log. </param> | ||
/// <returns> <see cref="IDisposable"/> which will log end activity marker. </returns> | ||
IDisposable StartActivity(string activityName); | ||
} | ||
} |
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