Spring Boot 3 Metrics API

Micrometer-based application metrics

OpenAPI Specification

spring-boot-3-metrics-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spring Boot 3 Actuator Environment Metrics API
  description: Production-ready monitoring and management endpoints provided by Spring Boot 3 Actuator. Includes health checks, Micrometer metrics, environment inspection, logger configuration, thread dumps, scheduled tasks, HTTP exchange tracing, and more. Endpoints are served under the /actuator base path and can be secured via Spring Security.
  version: 3.2.0
  contact:
    name: Spring Team
    url: https://spring.io/team
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:8080/actuator
  description: Local Spring Boot 3 application with Actuator enabled
tags:
- name: Metrics
  description: Micrometer-based application metrics
paths:
  /metrics:
    get:
      operationId: listMetrics
      summary: List Available Metrics
      description: Returns a list of all registered Micrometer metric names available in this application.
      tags:
      - Metrics
      responses:
        '200':
          description: Available metric names
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsList'
  /metrics/{metricName}:
    get:
      operationId: getMetric
      summary: Get Metric Detail
      description: Returns measurements and available tags for a specific Micrometer metric. Use tag parameters to filter by dimension.
      tags:
      - Metrics
      parameters:
      - name: metricName
        in: path
        required: true
        description: Name of the metric (e.g., jvm.memory.used, http.server.requests)
        schema:
          type: string
          example: jvm.memory.used
      - name: tag
        in: query
        required: false
        description: Tag filter in name:value format (may be repeated)
        schema:
          type: string
          example: area:heap
      responses:
        '200':
          description: Metric measurements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricDetail'
        '404':
          description: Metric not found
components:
  schemas:
    MetricDetail:
      type: object
      description: Measurements and metadata for a specific metric
      properties:
        name:
          type: string
          description: Metric name
        description:
          type: string
          description: Human-readable metric description
        baseUnit:
          type: string
          description: Base measurement unit (bytes, seconds, etc.)
        measurements:
          type: array
          items:
            type: object
            properties:
              statistic:
                type: string
                enum:
                - COUNT
                - TOTAL
                - MAX
                - VALUE
                - ACTIVE_TASKS
                - DURATION
                - TOTAL_TIME
              value:
                type: number
        availableTags:
          type: array
          items:
            type: object
            properties:
              tag:
                type: string
              values:
                type: array
                items:
                  type: string
    MetricsList:
      type: object
      description: Available Micrometer metric names
      properties:
        names:
          type: array
          items:
            type: string
          example:
          - jvm.memory.used
          - jvm.gc.pause
          - http.server.requests
          - process.uptime
          - system.cpu.usage