File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
disk-buffering/src/test/java/io/opentelemetry/contrib/disk/buffering Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -285,14 +285,20 @@ private void createMetric() {
285285 clearInvocations (metricCallback );
286286 }
287287
288+ private static final String TEST_METRIC_INSTRUMENTATION_SCOPE_NAME = "MetricInstrumentationScope" ;
289+
288290 /**
289291 * Filters out upstream's self-instrumentation metrics (e.g. {@code
290292 * otel.sdk.metric_reader.collection.duration}) that {@link PeriodicMetricReader} automatically
291293 * records, returning only metrics from the test's instrumentation scope.
292294 */
293295 private static List <MetricData > filterTestMetrics (List <MetricData > metrics ) {
294296 return metrics .stream ()
295- .filter (m -> m .getInstrumentationScopeInfo ().getName ().equals ("MetricInstrumentationScope" ))
297+ .filter (
298+ m ->
299+ m .getInstrumentationScopeInfo ()
300+ .getName ()
301+ .equals (TEST_METRIC_INSTRUMENTATION_SCOPE_NAME ))
296302 .collect (Collectors .toList ());
297303 }
298304
You can’t perform that action at this time.
0 commit comments