-
Notifications
You must be signed in to change notification settings - Fork 870
[Metric source-generator] Allow metric-classes to have more than 30 tag names #7573
Open
Labels
Description
When using metric source-generator with a strong-typed metric the number of dimensions is limited to 30, i.e. if you try to create a metric with more than 30 dimensions you'll get an error METGEN013 "A metric class contains too many tag names".
[Counter(typeof(SomeType))] public static partial SomeMetric CreateSomeMetric(Meter meter); public class SomeType { public string D1 { get; set; } = string.Empty; ... public string D33 { get; set; } = string.Empty; }
At the same time, if you specify tag names as a parameter of a metric attribute the issue will not occur and the metric will be successfully created/generated:
[Counter("D1", ..., "D33")] public static partial SomeMetric CreateSomeMetric(Meter meter);
We should unify the behavior and remove the limitation on the number of tag names in a metric type.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.