diff --git a/documentation/openapi.json b/documentation/openapi.json index 152c63cef33..73bacbf644e 100644 --- a/documentation/openapi.json +++ b/documentation/openapi.json @@ -1522,9 +1522,6 @@ "type": "string" }, "nullable": true - }, - "metricType": { - "$ref": "#/components/schemas/MetricProviderType" } }, "additionalProperties": false @@ -1617,14 +1614,6 @@ }, "additionalProperties": false }, - "MetricProviderType": { - "enum": [ - "EventCounter", - "Meter", - "All" - ], - "type": "string" - }, "OperationError": { "type": "object", "properties": { diff --git a/documentation/schema.json b/documentation/schema.json index ea9268eebee..2ed576a67ad 100644 --- a/documentation/schema.json +++ b/documentation/schema.json @@ -1424,36 +1424,9 @@ "items": { "type": "string" } - }, - "MetricType": { - "description": "The type of metrics this provider consumes", - "default": "All", - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/definitions/MetricProviderType" - } - ] } } }, - "MetricProviderType": { - "type": "string", - "description": "", - "x-enumFlags": true, - "x-enumNames": [ - "EventCounter", - "Meter", - "All" - ], - "enum": [ - "EventCounter", - "Meter", - "All" - ] - }, "MeterConfiguration": { "type": "object", "additionalProperties": false, @@ -1816,16 +1789,6 @@ "items": { "type": "string" } - }, - "MetricType": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/definitions/MetricProviderType" - } - ] } } }, diff --git a/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptions.cs b/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptions.cs index 42196d82fd1..a3bb75c6246 100644 --- a/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptions.cs +++ b/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptions.cs @@ -63,20 +63,6 @@ public class MetricProvider ResourceType = typeof(OptionsDisplayStrings), Description = nameof(OptionsDisplayStrings.DisplayAttributeDescription_MetricProvider_CounterNames))] public List CounterNames { get; set; } = new List(0); - - [Display( - ResourceType = typeof(OptionsDisplayStrings), - Description = nameof(OptionsDisplayStrings.DisplayAttributeDescription_MetricProvider_MetricType))] - [DefaultValue(MetricsOptionsDefaults.MetricType)] - public MetricProviderType? MetricType { get; set; } - } - - [Flags] - public enum MetricProviderType - { - EventCounter = 0x1, - Meter = 0x2, - All = 0xFF } public class MeterConfiguration diff --git a/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptionsDefaults.cs b/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptionsDefaults.cs index 30edfea8001..a3543e33075 100644 --- a/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptionsDefaults.cs +++ b/src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptionsDefaults.cs @@ -10,7 +10,5 @@ internal static class MetricsOptionsDefaults public const int MetricCount = 3; public const bool IncludeDefaultProviders = true; - - public const MetricProviderType MetricType = MetricProviderType.All; } } diff --git a/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs b/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs index 4abfb165705..d219ccc56d7 100644 --- a/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs +++ b/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs @@ -1247,15 +1247,6 @@ public static string DisplayAttributeDescription_MetricProvider_CounterNames { } } - /// - /// Looks up a localized string similar to The type of metrics this provider consumes. - /// - public static string DisplayAttributeDescription_MetricProvider_MetricType { - get { - return ResourceManager.GetString("DisplayAttributeDescription_MetricProvider_MetricType", resourceCulture); - } - } - /// /// Looks up a localized string similar to The name of the custom metrics provider.. /// diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs index 0d1833340f3..26fd59f56a5 100644 --- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs +++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs @@ -98,9 +98,6 @@ private static List ConvertCounterGroups(IList ConvertCounterGroups(IList