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.
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".
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:
We should unify the behavior and remove the limitation on the number of tag names in a metric type.