mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[telemetry][ColorPicker] add event name support (#10476)
Allow to set a custom name for the event instead of just using the class name.
This commit is contained in:
@@ -16,6 +16,8 @@ namespace Microsoft.PowerToys.Telemetry.Events
|
|||||||
{
|
{
|
||||||
public bool UTCReplace_AppSessionGuid => true;
|
public bool UTCReplace_AppSessionGuid => true;
|
||||||
|
|
||||||
|
public string EventName { get; set; }
|
||||||
|
|
||||||
private string _version;
|
private string _version;
|
||||||
|
|
||||||
public string Version
|
public string Version
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace Microsoft.PowerToys.Telemetry
|
|||||||
where T : EventBase, IEvent
|
where T : EventBase, IEvent
|
||||||
{
|
{
|
||||||
this.Write<T>(
|
this.Write<T>(
|
||||||
null,
|
telemetryEvent.EventName,
|
||||||
new EventSourceOptions()
|
new EventSourceOptions()
|
||||||
{
|
{
|
||||||
Keywords = ProjectKeywordMeasure,
|
Keywords = ProjectKeywordMeasure,
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ namespace ColorPicker.Telemetry
|
|||||||
[EventData]
|
[EventData]
|
||||||
public class ColorPickerSession : EventBase, IEvent
|
public class ColorPickerSession : EventBase, IEvent
|
||||||
{
|
{
|
||||||
|
public ColorPickerSession()
|
||||||
|
{
|
||||||
|
EventName = "ColorPicker_Session";
|
||||||
|
}
|
||||||
|
|
||||||
public string StartedAs { get; set; }
|
public string StartedAs { get; set; }
|
||||||
|
|
||||||
public bool ZoomUsed { get; set; }
|
public bool ZoomUsed { get; set; }
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace ColorPicker.Telemetry
|
|||||||
public ColorPickerSettings(IDictionary<string, bool> editorFormats)
|
public ColorPickerSettings(IDictionary<string, bool> editorFormats)
|
||||||
{
|
{
|
||||||
EditorFormats = editorFormats;
|
EditorFormats = editorFormats;
|
||||||
|
EventName = "ColorPicker_Settings";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ActivationShortcut { get; set; }
|
public string ActivationShortcut { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user