Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f92e64e

Browse files
committedMar 12, 2024·
comments
1 parent d7e51c5 commit f92e64e

File tree

1 file changed

+5
-4
lines changed
  • opentelemetry-sdk/src/metrics

1 file changed

+5
-4
lines changed
 

‎opentelemetry-sdk/src/metrics/mod.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ mod tests {
320320
// Meters are identical except for scope attributes, but scope attributes are not an identifying property.
321321
// Hence there should be a single metric stream output for this test.
322322
let meter1 = meter_provider.versioned_meter(
323-
"test.meter1",
323+
"test.meter",
324324
Some("v0.1.0"),
325325
Some("schema_url"),
326326
Some(vec![KeyValue::new("key", "value1")]),
327327
);
328328
let meter2 = meter_provider.versioned_meter(
329-
"test.meter1",
329+
"test.meter",
330330
Some("v0.1.0"),
331331
Some("schema_url"),
332332
Some(vec![KeyValue::new("key", "value2")]),
@@ -364,11 +364,12 @@ mod tests {
364364
);
365365

366366
let scope = &resource_metrics[0].scope_metrics[0].scope;
367-
assert_eq!(scope.name, "test.meter1");
367+
assert_eq!(scope.name, "test.meter");
368368
assert_eq!(scope.version, Some(Cow::Borrowed("v0.1.0")));
369369
assert_eq!(scope.schema_url, Some(Cow::Borrowed("schema_url")));
370370

371-
// Should we validate this, as this is a user error
371+
// This is validating current behavior, but it is not guaranteed to be the case in the future,
372+
// as this is a user error and SDK reserves right to change this behavior.
372373
assert_eq!(scope.attributes, vec![KeyValue::new("key", "value1")]);
373374

374375
let metric = &resource_metrics[0].scope_metrics[0].metrics[0];

0 commit comments

Comments
 (0)
Please sign in to comment.