-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5ca091
commit d07998e
Showing
17 changed files
with
150 additions
and
157 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
12 changes: 12 additions & 0 deletions
12
src/Microsoft.Diagnostics.Monitoring.Options/IMonitorCapability.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Microsoft.Diagnostics.Monitoring.Options | ||
{ | ||
public interface IMonitorCapability | ||
{ | ||
public string Name { get; } | ||
|
||
public bool Enabled { get; } | ||
} | ||
} |
14 changes: 9 additions & 5 deletions
14
src/Microsoft.Diagnostics.Monitoring.Options/MonitorCapability.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,18 +1,22 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Microsoft.Diagnostics.Monitoring.Options | ||
{ | ||
public class MonitorCapability | ||
public class MonitorCapability : IMonitorCapability | ||
{ | ||
[Required] | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } = string.Empty; | ||
public string Name { get; init; } | ||
|
||
[JsonPropertyName("enabled")] | ||
public bool Enabled { get; set; } | ||
public bool Enabled { get; init; } | ||
|
||
public MonitorCapability(string name, bool enabled) | ||
{ | ||
Name = name; | ||
Enabled = enabled; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.Diagnostics.Monitoring.Options; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace Microsoft.Diagnostics.Monitoring | ||
{ | ||
public class CallStacksCapability : IMonitorCapability | ||
{ | ||
public string Name => MonitorCapabilityConstants.CallStacks; | ||
|
||
public bool Enabled { get; init; } | ||
|
||
public CallStacksCapability( | ||
IOptions<CallStacksOptions> options) | ||
{ | ||
Enabled = options.Value.GetEnabled(); | ||
} | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
src/Tools/dotnet-monitor/CallStacksCapabilityPostConfigureOptions.cs
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
src/Tools/dotnet-monitor/CapabilitiesPostConfigureOptions.cs
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.Diagnostics.Monitoring.Options; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace Microsoft.Diagnostics.Monitoring | ||
{ | ||
public class ExceptionsCapability : IMonitorCapability | ||
{ | ||
public string Name => MonitorCapabilityConstants.Exceptions; | ||
|
||
public bool Enabled { get; init; } | ||
|
||
public ExceptionsCapability( | ||
IOptions<ExceptionsOptions> options) | ||
{ | ||
Enabled = options.Value.GetEnabled(); | ||
} | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
src/Tools/dotnet-monitor/ExceptionsCapabilityPostConfigureOptions.cs
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.Diagnostics.Monitoring.Options; | ||
|
||
namespace Microsoft.Diagnostics.Monitoring | ||
{ | ||
public class HttpEgressCapability : IMonitorCapability | ||
{ | ||
public string Name => MonitorCapabilityConstants.HttpEgress; | ||
|
||
public bool Enabled { get; init; } | ||
|
||
public HttpEgressCapability( | ||
bool isEnabled) | ||
{ | ||
Enabled = isEnabled; | ||
} | ||
} | ||
} |
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,22 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.Diagnostics.Monitoring.Options; | ||
using Microsoft.Diagnostics.Monitoring.WebApi; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace Microsoft.Diagnostics.Monitoring | ||
{ | ||
public class MetricsCapability : IMonitorCapability | ||
{ | ||
public string Name => MonitorCapabilityConstants.Metrics; | ||
|
||
public bool Enabled { get; init; } | ||
|
||
public MetricsCapability( | ||
IOptions<MetricsOptions> options) | ||
{ | ||
Enabled = options.Value.GetEnabled(); | ||
} | ||
} | ||
} |
23 changes: 0 additions & 23 deletions
23
src/Tools/dotnet-monitor/MetricsCapabilityPostConfigureOptions.cs
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.Diagnostics.Monitoring.Options; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace Microsoft.Diagnostics.Monitoring | ||
{ | ||
public class ParametersCapability : IMonitorCapability | ||
{ | ||
public string Name => MonitorCapabilityConstants.ParameterCapturing; | ||
|
||
public bool Enabled { get; init; } | ||
|
||
public ParametersCapability( | ||
IOptions<ParameterCapturingOptions> options) | ||
{ | ||
Enabled = options.Value.GetEnabled(); | ||
} | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
src/Tools/dotnet-monitor/ParametersCapabilityPostConfigureOptions.cs
This file was deleted.
Oops, something went wrong.
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