Package org.apache.solr.metrics.otel
Class FilterablePrometheusMetricReader
java.lang.Object
io.opentelemetry.exporter.prometheus.PrometheusMetricReader
org.apache.solr.metrics.otel.FilterablePrometheusMetricReader
- All Implemented Interfaces:
io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector,io.opentelemetry.sdk.metrics.export.DefaultAggregationSelector,io.opentelemetry.sdk.metrics.export.MetricReader,io.prometheus.metrics.model.registry.MultiCollector,Closeable,AutoCloseable
public class FilterablePrometheusMetricReader
extends io.opentelemetry.exporter.prometheus.PrometheusMetricReader
-
Constructor Summary
ConstructorsConstructorDescriptionFilterablePrometheusMetricReader(boolean otelScopeEnabled, Predicate<String> allowedResourceAttributesFilter) -
Method Summary
Methods inherited from class io.opentelemetry.exporter.prometheus.PrometheusMetricReader
collect, forceFlush, getAggregationTemporality, register, shutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.opentelemetry.sdk.metrics.export.DefaultAggregationSelector
withMethods inherited from interface io.opentelemetry.sdk.metrics.export.MetricReader
close, getDefaultAggregation, getMemoryModeMethods inherited from interface io.prometheus.metrics.model.registry.MultiCollector
collect, collect, collect, getPrometheusNames
-
Constructor Details
-
FilterablePrometheusMetricReader
-
-
Method Details
-
collect
public io.prometheus.metrics.model.snapshots.MetricSnapshots collect(Set<String> includedNames, SortedMap<String, Set<String>> requiredLabels) Collect metrics with filtering support for metric names and labels.- Parameters:
includedNames- Set of metric names to include. If empty, all metric names are included.requiredLabels- Map of label names to their allowed values. If empty, no label filtering is applied.- Returns:
- Filtered MetricSnapshots
-