Class Internal
java.lang.Object
io.opentelemetry.instrumentation.micrometer.v1_5.internal.Internal
This class is internal and is hence not for public use. Its APIs are unstable and can change at
any time.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidinternalSetMetersHiddenFromSearch(BiConsumer<OpenTelemetryMeterRegistryBuilder, Boolean> setMetersHiddenFromSearch) static voidsetMetersHiddenFromSearch(OpenTelemetryMeterRegistryBuilder builder, boolean metersHiddenFromSearch) Hides the registered meters from the meter registry search APIs, i.e.
-
Method Details
-
setMetersHiddenFromSearch
public static void setMetersHiddenFromSearch(OpenTelemetryMeterRegistryBuilder builder, boolean metersHiddenFromSearch) Hides the registered meters from the meter registry search APIs, i.e.getMeters(),find(String)andget(String). Meter registration,forEachMeter(Consumer)and meter removal are not affected.The OpenTelemetry meter registry only forwards metrics to OpenTelemetry; it cannot read metric values back, so the meters it returns always measure to nothing. Readers that pick a single registry out of a
CompositeMeterRegistry, such as Spring Boot Actuator's metrics endpoint, otherwise have no way of telling that they should read from a different member of the composite instead.Only set this when the registry is part of a composite that has another member capable of reading metric values, otherwise the metrics become invisible to those readers entirely.
This is disabled by default, set this to
trueto hide the registered meters. -
internalSetMetersHiddenFromSearch
public static void internalSetMetersHiddenFromSearch(BiConsumer<OpenTelemetryMeterRegistryBuilder, Boolean> setMetersHiddenFromSearch)
-