Skip to content

Commit 29f377f

Browse files
committed
pr review
1 parent 30d010e commit 29f377f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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 (!metricData.getInstrumentationScopeInfo().getAttributes().isEmpty()) {
128+
if (otelScopeMode.isScopeInfoEnabled() && !metricData.getInstrumentationScopeInfo().getAttributes().isEmpty()) {
129129
scopes.add(metricData.getInstrumentationScopeInfo());
130130
}
131131
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public enum OtelScopeMode {
1212
* <p>This will eventually be the default mode, but is opt-in for now.
1313
*/
1414
LABELS_ONLY,
15+
1516
/**
1617
* Both labels and scope_info are exported.
1718
*

0 commit comments

Comments
 (0)