MetricResponse document (Data API 23.2)

Metrics in Prometheus Exposition Format wrapped as Json array of strings.

Property Type Constraints Description
limit Integer   Page size of result page
metrics [String]  

Metrics in Prometheus Exposition Format.

A single metric is represented by a single line. They have a name, labels (dimensions), a value and a time-stamp. Example: OCAPI request: GET /v21.10/products/{Id}/prices total time metric: products_Id_prices{method=\"GET\",version=\"v21.10\",path1=\"products\",path2=\"prices\",status=\"2xx\"} 112.718755 1620735785000 The individual elements of a metric line are the metric name, metric dimensions (denoted by label / value pairs in curly braces), the actual metric value (in milliseconds or in operations / second for metrics ending in _m1rate) and a time-stamp in milliseconds since 01/01/1970 UTC.

name

The metric name will have both path segments and parameters separated by ‘_’. Path segments in the metric name are in lower-case whereas path parameters are formatted in camel-case.

method

the HTTP method of the OCAPI request, one of GET, PUT, POST, DELETE

version

the version of the OCAPI request, e.g. v20.8

path1 .. pathN

The path segments (not including the path-parameters) of the OCAPI request, from the example above, the path segments will be mapped to labels as: path1=\"products\", path2=\"prices\"

breakdown

Sub-timings of the request, in particular:
  • total (implicit): total timings of the request (sum of the three breakdowns below). This dimension is denoted with no label.
  • platform: amount of time spent in platform code (including database-tier)
  • custom: amount of time spent in custom code (including database-tier)
  • thirdParty: amount of time spent invoking third party services through the service framework

status

  • 2xx: metrics for all requests with a status code between 200 and 299
  • 3xx: metrics for all requests with a status code between 300 and 399
  • 4xx: metrics for all requests with a status code between 400 and 499
  • 5xx: metrics for all requests with a status code between 500 and 599

quantile

  • p50: median timings
  • p95: timings for the 95th percentile of all requests

serviceId (only for metrics where breakdown = thirdParty)

the id of the third party service that was invoked during the request. If multiple services were invoked, timings for each individual service are available

offset Integer   Offset of result page
total Integer   Total number of metrics
X OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.