Skip to content

Commit

Permalink
Fixup merge issue with schema splitting (#3848) (#3849)
Browse files Browse the repository at this point in the history
Co-authored-by: Wiktor Kopec <[email protected]>
  • Loading branch information
github-actions[bot] and wiktork authored Mar 5, 2023
1 parent 3afcf62 commit fe7de57
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 81 deletions.
11 changes: 0 additions & 11 deletions documentation/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1522,9 +1522,6 @@
"type": "string"
},
"nullable": true
},
"metricType": {
"$ref": "#/components/schemas/MetricProviderType"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -1617,14 +1614,6 @@
},
"additionalProperties": false
},
"MetricProviderType": {
"enum": [
"EventCounter",
"Meter",
"All"
],
"type": "string"
},
"OperationError": {
"type": "object",
"properties": {
Expand Down
37 changes: 0 additions & 37 deletions documentation/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1816,16 +1789,6 @@
"items": {
"type": "string"
}
},
"MetricType": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/MetricProviderType"
}
]
}
}
},
Expand Down
14 changes: 0 additions & 14 deletions src/Microsoft.Diagnostics.Monitoring.Options/MetricsOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,6 @@ public class MetricProvider
ResourceType = typeof(OptionsDisplayStrings),
Description = nameof(OptionsDisplayStrings.DisplayAttributeDescription_MetricProvider_CounterNames))]
public List<string> CounterNames { get; set; } = new List<string>(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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ internal static class MetricsOptionsDefaults
public const int MetricCount = 3;

public const bool IncludeDefaultProviders = true;

public const MetricProviderType MetricType = MetricProviderType.All;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ private static List<EventPipeCounterGroup> ConvertCounterGroups(IList<MetricProv
{
customCounterGroup.CounterNames = customProvider.CounterNames.ToArray();
}

customCounterGroup.Type = (CounterGroupType)customProvider.MetricType.GetValueOrDefault(MetricsOptionsDefaults.MetricType);

counterGroups.Add(customCounterGroup);
}
}
Expand Down Expand Up @@ -135,8 +132,6 @@ private static List<EventPipeCounterGroup> ConvertCounterGroups(IList<Models.Eve
customCounterGroup.CounterNames = customProvider.CounterNames.ToArray();
}

customCounterGroup.Type = (CounterGroupType)customProvider.MetricType.GetValueOrDefault(MetricsOptionsDefaults.MetricType);

counterGroups.Add(customCounterGroup);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public class EventMetricsProvider

[JsonPropertyName("counterNames")]
public string[] CounterNames { get; set; }

[JsonPropertyName("metricType")]
public MetricProviderType? MetricType { get; set; }
}

public class EventMetricsMeter
Expand Down

0 comments on commit fe7de57

Please sign in to comment.