Add telemetry data points for .NET Core 2.0
This commit is contained in:
parent
676fe41aca
commit
081f208942
29 changed files with 1324 additions and 77 deletions
39
test/dotnet.Tests/FakeRecordEventNameTelemetry.cs
Normal file
39
test/dotnet.Tests/FakeRecordEventNameTelemetry.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Cli.Telemetry;
|
||||
|
||||
namespace Microsoft.DotNet.Tests
|
||||
{
|
||||
public class FakeRecordEventNameTelemetry : ITelemetry
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public string EventName { get; set; }
|
||||
|
||||
public void TrackEvent(string eventName,
|
||||
IDictionary<string, string> properties,
|
||||
IDictionary<string, double> measurements)
|
||||
{
|
||||
LogEntries.Add(
|
||||
new LogEntry
|
||||
{
|
||||
EventName = eventName,
|
||||
Measurement = measurements,
|
||||
Properties = properties
|
||||
});
|
||||
}
|
||||
|
||||
public ConcurrentBag<LogEntry> LogEntries { get; set; } = new ConcurrentBag<LogEntry>();
|
||||
|
||||
public class LogEntry
|
||||
{
|
||||
public string EventName { get; set; }
|
||||
public IDictionary<string, string> Properties { get; set; }
|
||||
public IDictionary<string, double> Measurement { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue