Class ConfigAdapter
java.lang.Object
io.quarkus.micrometer.runtime.export.ConfigAdapter
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription(package private) static StringcaptureProperties(Map<String, String> config, String prefix) Accept a <String, String> map and a prefix, e.g.captureProperties(org.eclipse.microprofile.config.Config config, String prefix) Accept the Quarkus config object and a prefix, e.g.(package private) static StringconvertKey(String name) (package private) static String(package private) static Stringstatic <T extends io.micrometer.core.instrument.config.MeterRegistryConfig>
Tvalidate(T config) static <T extends io.micrometer.core.instrument.config.MeterRegistryConfig>
Tvalidate(T config, io.micrometer.core.instrument.config.validate.Validated validated)
-
Field Details
-
ROOT
- See Also:
-
TRIM_POS
static final int TRIM_POS
-
-
Method Details
-
captureProperties
public static Map<String,String> captureProperties(org.eclipse.microprofile.config.Config config, String prefix) Accept the Quarkus config object and a prefix, e.g.quarkus.micrometer.export.prometheus.. This will:- Lift all properties from the global config map whose keys start with the prefix
- Trim
quarkus.micrometer.export.from the beginning of the relevant key - Replace kebab-case with camelCase in the relevant key
- Insert the transformed key and the original value into a new map
- Parameters:
config- Quarkus Configprefix- A String prefix beginning withquarkus.and ending with..- Returns:
- A map containing transformed keys and associated values
-
captureProperties
Accept a <String, String> map and a prefix, e.g.prometheus.. This will:- Replace kebab-case with camelCase in each key
- Add the prefix to each key
- Insert the transformed key and the original value into a new map
- Parameters:
config- A Runtime config map of string keys and properties, e.g.PrometheusRuntimeConfig.prometheusprefix- A String prefix ending with., e.g.prometheus.- Returns:
- A map containing transformed keys and associated values
-
validate
public static <T extends io.micrometer.core.instrument.config.MeterRegistryConfig> T validate(T config) -
validate
public static <T extends io.micrometer.core.instrument.config.MeterRegistryConfig> T validate(T config, io.micrometer.core.instrument.config.validate.Validated validated) -
convertKey
-
revertKey
-
camelHumpify
-
dashify
-