-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add events for core telemetry (#3546)
- Loading branch information
Showing
12 changed files
with
193 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Diagnostics.Tracing; | ||
using DevHome.Common.Helpers; | ||
using DevHome.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry.Internal; | ||
|
||
namespace DevHome.Common.TelemetryEvents; | ||
|
||
[EventData] | ||
public class PageLoadedEvent : EventBase | ||
{ | ||
public override PartA_PrivTags PartA_PrivTags => PrivTags.ProductAndServicePerformance; | ||
|
||
public Guid DeploymentIdentifier { get; } | ||
|
||
public string PageName { get; } | ||
|
||
public PageLoadedEvent(string pageName) | ||
{ | ||
DeploymentIdentifier = Deployment.Identifier; | ||
PageName = pageName; | ||
} | ||
|
||
public override void ReplaceSensitiveStrings(Func<string, string> replaceSensitiveStrings) | ||
{ | ||
// No sensitive strings to replace. | ||
} | ||
} |
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,31 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Diagnostics.Tracing; | ||
using DevHome.Common.Helpers; | ||
using DevHome.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry.Internal; | ||
using Serilog; | ||
|
||
namespace DevHome.TelemetryEvents; | ||
|
||
[EventData] | ||
public class DevHomeInitializationEndedEvent : EventBase | ||
{ | ||
public Guid DeploymentIdentifier { get; } | ||
|
||
public override PartA_PrivTags PartA_PrivTags => PrivTags.ProductAndServicePerformance; | ||
|
||
public DevHomeInitializationEndedEvent() | ||
{ | ||
DeploymentIdentifier = Deployment.Identifier; | ||
var log = Log.ForContext("SourceContext", nameof(DevHomeInitializationEndedEvent)); | ||
log.Debug($"DevHome Initialization Started Event, Identifier: {DeploymentIdentifier}"); | ||
} | ||
|
||
public override void ReplaceSensitiveStrings(Func<string, string> replaceSensitiveStrings) | ||
{ | ||
// No sensitive strings to replace. | ||
} | ||
} |
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,31 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Diagnostics.Tracing; | ||
using DevHome.Common.Helpers; | ||
using DevHome.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry.Internal; | ||
using Serilog; | ||
|
||
namespace DevHome.TelemetryEvents; | ||
|
||
[EventData] | ||
public class DevHomeInitializationStartedEvent : EventBase | ||
{ | ||
public Guid DeploymentIdentifier { get; } | ||
|
||
public override PartA_PrivTags PartA_PrivTags => PrivTags.ProductAndServicePerformance; | ||
|
||
public DevHomeInitializationStartedEvent() | ||
{ | ||
DeploymentIdentifier = Deployment.Identifier; | ||
var log = Log.ForContext("SourceContext", nameof(DevHomeInitializationStartedEvent)); | ||
log.Debug($"DevHome Initialization Started Event, Identifier: {DeploymentIdentifier}"); | ||
} | ||
|
||
public override void ReplaceSensitiveStrings(Func<string, string> replaceSensitiveStrings) | ||
{ | ||
// No sensitive strings to replace. | ||
} | ||
} |
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,35 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Diagnostics.Tracing; | ||
using DevHome.Common.Helpers; | ||
using DevHome.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry.Internal; | ||
using Microsoft.Windows.AppLifecycle; | ||
using Serilog; | ||
|
||
namespace DevHome.TelemetryEvents; | ||
|
||
[EventData] | ||
public class DevHomeShellLoadedEvent : EventBase | ||
{ | ||
public Guid DeploymentIdentifier { get; } | ||
|
||
public ExtendedActivationKind ActivationKind { get; } | ||
|
||
public override PartA_PrivTags PartA_PrivTags => PrivTags.ProductAndServicePerformance; | ||
|
||
public DevHomeShellLoadedEvent(ExtendedActivationKind activationKind) | ||
{ | ||
ActivationKind = activationKind; | ||
DeploymentIdentifier = Deployment.Identifier; | ||
var log = Log.ForContext("SourceContext", nameof(DevHomeShellLoadedEvent)); | ||
log.Debug($"DevHome Startup Event, Identifier: {DeploymentIdentifier}"); | ||
} | ||
|
||
public override void ReplaceSensitiveStrings(Func<string, string> replaceSensitiveStrings) | ||
{ | ||
// No sensitive strings to replace. | ||
} | ||
} |
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,31 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Diagnostics.Tracing; | ||
using DevHome.Common.Helpers; | ||
using DevHome.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry.Internal; | ||
using Serilog; | ||
|
||
namespace DevHome.TelemetryEvents; | ||
|
||
[EventData] | ||
public class DevHomeStartedEvent : EventBase | ||
{ | ||
public Guid DeploymentIdentifier { get; } | ||
|
||
public override PartA_PrivTags PartA_PrivTags => PrivTags.ProductAndServicePerformance; | ||
|
||
public DevHomeStartedEvent() | ||
{ | ||
DeploymentIdentifier = Deployment.Identifier; | ||
var log = Log.ForContext("SourceContext", nameof(DevHomeStartedEvent)); | ||
log.Debug($"DevHome Launched Event, Identifier: {DeploymentIdentifier}"); | ||
} | ||
|
||
public override void ReplaceSensitiveStrings(Func<string, string> replaceSensitiveStrings) | ||
{ | ||
// No sensitive strings to replace. | ||
} | ||
} |
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
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