API
  • API Index
  • Batch API
  • Content Negotiation
  • Dynamic Paths
  • Hierarchy API
  • List API
  • Quick Reference
  • Time Series API
  • Views
    • Configuration
  • Overview
  • Application Configuration
  • Documentation Configuration
  • Spec Configuration
    • Features
  • API Testing
  • Asynchronous Processing
  • Cassandra Time-Series Engine
  • Cassandra Integration
  • Default Controller Customisation
  • Documentation
  • Geospatial Filtering
  • Model Documentation
  • PostgreSQL Integration
  • Excel Spreadsheet Format
    • Tutorials
  • Step-by-Step Guide
  • Archetype Setup
  • Logging
  • Prometheus
  • Sentry Logging
    • UI Customisation
  • UI Customisation
  • SASS Build Chain
  • Shared Layout
  • API Documentation
  • Model Documentation
  • Results
  • sapi-nt v current

    Prometheus

    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).