package io.quarkus.micrometer.runtime.config;

import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;

@ConfigGroup
public class PrometheusConfigGroup implements MicrometerConfig.CapabilityEnabled {
    /**
     * Support for export to Prometheus.
     * <p>
     * Support for Prometheus will be enabled if Micrometer
     * support is enabled, the PrometheusMeterRegistry is on the classpath
     * and either this value is true, or this value is unset and
     * {@code quarkus.micrometer.registry-enabled-default} is true.
     */
    @ConfigItem
    public Optional<Boolean> enabled;

    /**
     * The path for the prometheus metrics endpoint (produces text/plain).
     * The default value is {@code metrics}.
     */
    @ConfigItem(defaultValue = "metrics")
    public String path;

    /**
     * By default, this extension will create a Prometheus MeterRegistry instance.
     * <p>
     * Use this attribute to veto the creation of the default Prometheus MeterRegistry.
     */
    @ConfigItem(defaultValue = "true")
    public boolean defaultRegistry;

    @Override
    public Optional<Boolean> getEnabled() {
        return enabled;
    }

    @Override
    public String toString() {
        return this.getClass().getSimpleName()
                + "{path='" + path
                + ",enabled=" + enabled
                + ",defaultRegistry=" + defaultRegistry
                + '}';
    }
}

@@ -739,23 +739,16 @@
 /plain).
-%0A     *
  The def
@@ -758,31 +758,339 @@
 t va
+lue is%0A     * %60metrics%60 and is resolved relative to the non-application endpoint (%60q%60), e.g.%0A     * %60$%7Bquarkus.http.root-path%7D/$%7Bquarkus.http.non-application-root-path%7D/metrics%60.%0A     * If an abso
 lu
+t
 e 
-is %7B@code metrics%7D.
+path is specified (%60/metrics%60), the prometheus endpoint will be served%0A     * from the configured path.%0A     *%0A     * @asciidoclet
 %0A   

Update docs for prometheus path config