From 2f242cad50bdd4842e34eb2d891613fa5ab52f45 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 5 May 2025 16:52:54 -0700 Subject: [PATCH] Use reference stubs in Antora playbook for actuator-autoconfigure Use reference stubs so that we can include a link to the supported metrics backends. Closes gh-45158 --- .../spring-boot-actuator-autoconfigure/build.gradle | 4 ++++ .../docs/antora/modules/api/pages/rest/actuator/metrics.adoc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index 0cdc87961ac..aa83a98444f 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -212,6 +212,10 @@ def documentationTest = tasks.register("documentationTest", Test) { } } +tasks.named("generateAntoraPlaybook") { + antoraExtensions.xref.stubs = ["appendix:.*", "api:.*", "reference:.*"] +} + antoraContributions { 'actuator-rest-api' { aggregateContent { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora/modules/api/pages/rest/actuator/metrics.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora/modules/api/pages/rest/actuator/metrics.adoc index dfd68ff7362..9c5fcc89221 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora/modules/api/pages/rest/actuator/metrics.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora/modules/api/pages/rest/actuator/metrics.adoc @@ -4,7 +4,7 @@ The `metrics` endpoint provides access to application metrics to diagnose the metrics the application has recorded. This endpoint should not be "scraped" or used as a metrics backend in production. Its purpose is to show the currently registered metrics so users can see what metrics are available, what their current values are, and if triggering certain operations cause any change in certain values. -If you want to diagnose your applications through the metrics they collect, you should use an external metrics backend. +If you want to diagnose your applications through the metrics they collect, you should use an xref:reference:actuator/metrics.adoc[external metrics backend]. In this case, the `metrics` endpoint can still be useful.