-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When running an instrumented application's test suite I'm getting errors like the following:
Failed to overwrite metric overlay_outbound_transit_seconds, Labels:
This is probably because when running tests the metric initialization is also run in parallel, and since the registry used is the same across all there each test is attempting to override the same metric name.
Sample:
#[metrics(scope = "app")]
pub struct MyMetric {
#[metric]
pub my_metric: Counter,
}
#[test]
fn foo() {
let metrics = MyMetric::default();
...
}
#[test]
fn bar() {
let metrics = MyMetric::default();
...
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels