@@ -244,6 +244,14 @@ func TestLoadMetadata(t *testing.T) {
244244 FullName : "opt_in_bool_attr" ,
245245 RequirementLevel : AttributeRequirementLevelOptIn ,
246246 },
247+ "required_string_attr" : {
248+ Description : "A required attribute with a string value" ,
249+ Type : ValueType {
250+ ValueType : pcommon .ValueTypeStr ,
251+ },
252+ FullName : "required_string_attr" ,
253+ RequirementLevel : AttributeRequirementLevelRequired ,
254+ },
247255 },
248256 Metrics : map [MetricName ]Metric {
249257 "default.metric" : {
@@ -267,7 +275,7 @@ func TestLoadMetadata(t *testing.T) {
267275 "reaggregate.metric" : {
268276 Signal : Signal {
269277 Enabled : true ,
270- Description : "Metric for testing spacial reaggregation" ,
278+ Description : "Metric for testing spatial reaggregation" ,
271279 Stability : Stability {Level : component .StabilityLevelBeta },
272280 Attributes : []AttributeName {"string_attr" , "boolean_attr" },
273281 },
@@ -276,6 +284,18 @@ func TestLoadMetadata(t *testing.T) {
276284 MetricValueType : MetricValueType {pmetric .NumberDataPointValueTypeDouble },
277285 },
278286 },
287+ "reaggregate.metric.with_required" : {
288+ Signal : Signal {
289+ Enabled : true ,
290+ Description : "Metric for testing spatial reaggregation with required attributes" ,
291+ Stability : Stability {Level : component .StabilityLevelBeta },
292+ Attributes : []AttributeName {"required_string_attr" , "string_attr" , "boolean_attr" },
293+ },
294+ Unit : strPtr ("1" ),
295+ Gauge : & Gauge {
296+ MetricValueType : MetricValueType {pmetric .NumberDataPointValueTypeDouble },
297+ },
298+ },
279299 "system.cpu.time" : {
280300 Signal : Signal {
281301 Enabled : true ,
0 commit comments