@@ -1385,7 +1385,7 @@ The metric name of all metrics should start with a short name of the extension t
13851385
13861386An example build step for build-time registration of metrics:
13871387
1388- [source%nowrap. java]
1388+ [source%nowrap, java]
13891389----
13901390@BuildStep
13911391void registerMetrics(BuildProducer<MetricBuildItem> metrics) {
@@ -1409,7 +1409,7 @@ In this example, there is a gauge per each data source that shows the current nu
14091409In this example, we provide an object that implements the logic of the metric, in the case of a gauge,
14101410it needs to implement `org.eclipse.microprofile.metrics.Gauge`. Example:
14111411
1412- [source%nowrap. java]
1412+ [source%nowrap, java]
14131413----
14141414public class ActiveCountGauge implements Gauge<Long> {
14151415
@@ -1444,7 +1444,7 @@ Look into the `AgroalProcessor#registerMetrics` method for an example how this w
14441444In this case, the dependency setup and build-time registration is the same as in case 2. The difference will be that instead of introducing
14451445custom metric objects that bridge between library-specific metrics and MP Metrics, the extension's code will contain metric collection code like this:
14461446
1447- [source%nowrap. java]
1447+ [source%nowrap, java]
14481448----
14491449public void methodThatShouldBeCounted() {
14501450 if(metricsEnabled) {
@@ -1465,6 +1465,7 @@ because that would fail. The extension itself will need to provide such check, a
14651465The recommended way to implement this check would be to produce a specific `SystemPropertyBuildItem` during build, which will make it easy
14661466to evaluate these two conditions, and then check back to this system property at runtime. Example:
14671467
1468+ [source%nowrap,java]
14681469----
14691470@BuildStep
14701471SystemPropertyBuildItem produceMetricsEnabledProperty(AgroalBuildTimeConfig extensionSpecificConfig,
0 commit comments