title: Spring Boot Actuator - MAX property
body: <p>I am using Spring Boot Actuator dependency to get insights of application. For that, I have used Spring Boot Admin. Configuration for client-server is working fine. I have to measure the count, total-time, max for endpoints which are going to execute. </p>
  
  <pre><code>uri:/user/asset/getAllAssets
  TOTAL_TIME: 831ms
  MAX: 0ms 
  
  uri:/user/getEmployee/{employeeId}
  TOTAL_TIME: 98ms
  MAX: 0ms
  </code></pre>
  
  <p><strong><em>Why MAX (time) is 0 while TOTAL_TIME: is Xms</em></strong></p>
  
  <p><a href="https://i.stack.imgur.com/56Hrn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/56Hrn.png" alt="Spring Boot Admin Image"></a></p>
  
  <p>While I execute generalize form  </p>
  
  <p><strong><code>localhost:8889/actuator/metrics/http.server.requests</code></strong> I get the <strong><em>MAX as 3.00..</em></strong></p>
  
  <p>I had also seen <a href="https://docs.spring.io/spring-boot/docs/2.2.0.BUILD-SNAPSHOT/reference/html/production-ready-features.html" rel="noreferrer">production-ready-features</a> but not able to find any description about how MAX is calculated or what does it represent </p>
  
  <p><strong><em>Notes:
  with the number of request in an increase, COUNT, TOTAL_TIME is also getting an increase but MAX is reducing sometimes</em></strong> (see Request 1, Request 2 for details)</p>
  
  <h2>Request 1: http.server.requests</h2>
  
  <pre><code> {
          "name": "http.server.requests",
          "description": null,
          "baseUnit": "seconds",
          "measurements": [
              {
                  "statistic": "COUNT",
                  "value": 597
              },
              {
                  "statistic": "TOTAL_TIME",
                  "value": 144.9057076
              },
              {
                  "statistic": "MAX",
                  "value": 3.0002913
              }
          ],
          "availableTags": [
              {
                  "tag": "exception",
                  "values": [
                      "None"
                  ]
              },
              {
                  "tag": "method",
                  "values": [
                      "GET"
                  ]
              },
              {
                  "tag": "uri",
                  "values": [
                      "/actuator/metrics/{requiredMetricName}",
                      "/**/favicon.ico",
                      "/actuator",
                      "/user/getEmployee/{employeeId}",
                      "/user/asset/getAllAssets",
                      "/actuator/health",
                      "/actuator/info",
                      "/actuator/env/{toMatch}",
                      "/actuator/metrics",
                      "/**"
                  ]
              },
              {
                  "tag": "outcome",
                  "values": [
                      "CLIENT_ERROR",
                      "SUCCESS"
                  ]
              },
              {
                  "tag": "status",
                  "values": [
                      "404",
                      "200"
                  ]
              }
          ]
      }
  </code></pre>
  
  <hr>
  
  <p>UPDATE</p>
  
  <p><strong><code>localhost:8889/actuator/metrics/http.server.requests?tag=uri:/user/getEmployee/2</code></strong></p>
  
  <p>Response 404 <em>(I have executed /user/getEmployee/2 before making a request for actuator)</em></p>
  
  <hr>
  
  <p><strong><code>localhost:8889/actuator/metrics/http.server.requests?tag=uri:/user/getEmployee/{employeeId}</code></strong></p>
  
  <p>Response 400</p>
  
  <hr>
  
  <p><strong><code>localhost:8889/actuator/metrics/http.server.requests?tag=uri:/user/asset/getAllAssets</code></strong></p>
  
  <pre><code>{
      "name": "http.server.requests",
      "description": null,
      "baseUnit": "seconds",
      "measurements": [
          {
              "statistic": "COUNT",
              "value": 1
          },
          {
              "statistic": "TOTAL_TIME",
              "value": 0.8311609
          },
          {
              "statistic": "MAX",
              "value": 0
          }
      ],
      "availableTags": [
          {
              "tag": "exception",
              "values": [
                  "None"
              ]
          },
          {
              "tag": "method",
              "values": [
                  "GET"
              ]
          },
          {
              "tag": "outcome",
              "values": [
                  "SUCCESS"
              ]
          },
          {
              "tag": "status",
              "values": [
                  "200"
              ]
          }
      ]
  }
  </code></pre>
  
  <h2>Request 2: http.server.requests</h2>
  
  <p><strong><code>localhost:8889/actuator/metrics/http.server.requests</code></strong></p>
  
  <pre><code>{
      "name": "http.server.requests",
      "description": null,
      "baseUnit": "seconds",
      "measurements": [
          {
              "statistic": "COUNT",
              "value": 3346
          },
          {
              "statistic": "TOTAL_TIME",
              "value": 559.7992767999998
          },
          {
              "statistic": "MAX",
              "value": 2.3612968
          }
      ],
  </code></pre>