File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus
sdk-extensions/incubator/src/test/java/io/opentelemetry/sdk/extension/incubator/fileconfig Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,19 @@ public PrometheusHttpServerBuilder setPrometheusRegistry(PrometheusRegistry prom
8383 return this ;
8484 }
8585
86+ /**
87+ * Set if the {@code otel_scope_*} attributes are generated. Default is {@code true}.
88+ *
89+ * @deprecated {@code otel_scope_*} attributes are always generated. Use {@link
90+ * #setOtelScopeInfoMetricEnabled(boolean)} to control emission of the {@code otel_scope_info}
91+ * metric.
92+ */
93+ @ SuppressWarnings ("UnusedReturnValue" )
94+ @ Deprecated
95+ public PrometheusHttpServerBuilder setOtelScopeEnabled (boolean otelScopeEnabled ) {
96+ return this ;
97+ }
98+
8699 /** Set if the {@code otel_scope_info} metric is emitted. Default is {@code true}. */
87100 @ SuppressWarnings ("UnusedReturnValue" )
88101 public PrometheusHttpServerBuilder setOtelScopeInfoMetricEnabled (
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ void create_PullPrometheusConfigured() throws IOException {
165165 PrometheusHttpServer .builder ()
166166 .setHost ("localhost" )
167167 .setPort (port )
168- .setOtelScopeInfoMetricEnabled (false )
168+ .setOtelScopeInfoMetricEnabled (true ) // always enabled for declarative config
169169 .setAllowedResourceAttributesFilter (
170170 IncludeExcludePredicate .createPatternMatching (
171171 singletonList ("foo" ), singletonList ("bar" )))
You can’t perform that action at this time.
0 commit comments