linked metrics-endpoint #132
@ -10,7 +10,7 @@ import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Endpoint(id="custom")
|
@Endpoint(id="metric-links")
|
||||||
public class CustomActuatorEndpoint {
|
public class CustomActuatorEndpoint {
|
||||||
|
|
||||||
private final RestTemplate restTemplate = new RestTemplate();
|
private final RestTemplate restTemplate = new RestTemplate();
|
||||||
|
@ -8,7 +8,7 @@ management:
|
|||||||
endpoints:
|
endpoints:
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: info, health, metrics, custom
|
include: info, health, metrics, metric-links
|
||||||
observations:
|
observations:
|
||||||
annotations:
|
annotations:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -27,7 +27,7 @@ class CustomActuatorEndpointAcceptanceTest {
|
|||||||
.given()
|
.given()
|
||||||
.port(managementPort)
|
.port(managementPort)
|
||||||
.when()
|
.when()
|
||||||
.get("http://localhost/actuator/custom")
|
.get("http://localhost/actuator/metric-links")
|
||||||
.then().log().all().assertThat()
|
.then().log().all().assertThat()
|
||||||
.statusCode(200)
|
.statusCode(200)
|
||||||
.contentType("application/vnd.spring-boot.actuator.v3+json")
|
.contentType("application/vnd.spring-boot.actuator.v3+json")
|
||||||
|
@ -6,7 +6,7 @@ management:
|
|||||||
endpoints:
|
endpoints:
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: info, health, metrics, custom
|
include: info, health, metrics, metric-links
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
sql:
|
sql:
|
||||||
|
Loading…
Reference in New Issue
Block a user