Class ConfigAdapter
- java.lang.Object
-
- io.quarkus.micrometer.runtime.export.ConfigAdapter
-
public class ConfigAdapter extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static StringcamelHumpify(String s)static Map<String,String>captureProperties(Map<String,String> config, String prefix)Accept amap and a prefix, e.g. static Map<String,String>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 Stringdashify(String s)(package private) static StringrevertKey(String name)static <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 Detail
-
ROOT
static final String ROOT
- See Also:
- Constant Field Values
-
TRIM_POS
static final int TRIM_POS
-
-
Method Detail
-
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
public static Map<String,String> captureProperties(Map<String,String> config, String prefix)
Accept amap 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)
-
-