Skip to content

Commit 14fff8e

Browse files
committed
rename
1 parent fc75a5a commit 14fff8e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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());

exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/OtelScopeMode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public enum OtelScopeMode {
2121
*/
2222
LABELS_AND_SCOPE_INFO;
2323

24-
boolean isEnabled() {
24+
boolean isLabelOrInfo() {
2525
return this != DISABLED;
2626
}
2727

0 commit comments

Comments
 (0)