@@ -125,7 +125,7 @@ MetricSnapshots convert(@Nullable Collection<MetricData> metricDataCollection) {
125125 if (resource == null ) {
126126 resource = metricData .getResource ();
127127 }
128- if (otelScopeMode .isEnabled ()
128+ if (otelScopeMode .isLabelOrInfo ()
129129 && !metricData .getInstrumentationScopeInfo ().getAttributes ().isEmpty ()) {
130130 scopes .add (metricData .getInstrumentationScopeInfo ());
131131 }
@@ -459,7 +459,7 @@ private InfoSnapshot makeScopeInfo(Set<InstrumentationScopeInfo> scopes) {
459459 *
460460 * @param resource optional resource (attributes) to be converted.
461461 * @param scope will be converted to {@code otel_scope_*} labels if {@code otelScopeMode} is
462- * {@link OtelScopeMode#isEnabled ()}.
462+ * {@link OtelScopeMode#isLabelOrInfo ()}.
463463 * @param attributes the attributes to be converted.
464464 * @param additionalAttributes optional list of key/value pairs, may be empty.
465465 */
@@ -486,7 +486,7 @@ private Labels convertAttributes(
486486 requireNonNull (additionalAttributes [i ]), additionalAttributes [i + 1 ]);
487487 }
488488
489- if (otelScopeMode .isEnabled () && scope != null ) {
489+ if (otelScopeMode .isLabelOrInfo () && scope != null ) {
490490 labelNameToValue .putIfAbsent (OTEL_SCOPE_NAME , scope .getName ());
491491 if (scope .getVersion () != null ) {
492492 labelNameToValue .putIfAbsent (OTEL_SCOPE_VERSION , scope .getVersion ());
0 commit comments