This document contains information on how to expose prometheus metrics on your sapi-nt application.
First step is to add the required dependencies including the spring boot actuator and the prometheus registry:
<!-- Spring Boot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
The next step is to enable the metrics using the application properties:
management.endpoints.web.exposure.include=prometheus
management.metrics.export.prometheus.enabled=true
The above properties will enable prometheus exposing all default metrics. To find out more about spring boot actuator and other configuration properties checkout the official documentation.
This also enables custom sapi-nt metrics.
| Metric | Type | Description |
|---|---|---|
request_seconds |
Histogram | The time taken to perform each request in seconds. |
fuseki_connection_count |
Counter | Counts successful and unsuccessful connections to fuseki (state tag determines the state of connection). |