MetricsV2Dto

object

A query to launch at the API

metricsarray[string]required

List of aggregated metrics to collect across the requested time span. If no metrics are specified, request_count will be computed by default.

Allowed values:kong_latency_averagekong_latency_p50kong_latency_p95kong_latency_p99request_countrequest_per_minuterequest_size_averagerequest_size_p50request_size_p95request_size_p99request_size_sumresponse_latency_averageresponse_latency_p50response_latency_p95response_latency_p99response_size_averageresponse_size_p50response_size_p95response_size_p99response_size_sumupstream_latency_averageupstream_latency_p50upstream_latency_p95upstream_latency_p99

Default:request_count

<= 3 items

dimensionsarray[string]

List of attributes or entity types to group by.

Allowed values:apiapi_packageapi_productapi_product_versionapplicationconsumercontrol_planecontrol_plane_groupcountry_codedata_plane_nodedata_plane_node_versiongateway_serviceportalresponse_sourceroutestatus_codestatus_code_groupedtimeupstream_status_codeupstream_status_code_grouped

<= 2 items

Example:status_code_grouped

filtersOne Of
array

A list of filters to apply to the query.

Filter by apiOne Of
Multiselect filtersobject
Show Child Parameters
granularitystring

Force time grouping into buckets of the specified duration. Only has an effect if “time” is in the “dimensions” list.

The granularity of the result may be coarser than requested. The finest allowed granularity depends on the query’s time range: data farther in the past may have coarser granularity. The exact result granularity will be reported in the response meta.granularity_ms field.

If granularity is not specified and “time” is in the dimensions list, a default will be chosen based on the time range requested.

Different relative times support different granularities:

  • 15m => tenSecondly, thirtySecondly, minutely
  • 1h => tenSecondly, thirtySecondly, minutely, fiveMinutely, tenMinutely
  • 6h => thirtySecondly, minutely, fiveMinutely, tenMinutely, thirtyMinutely, hourly
  • 12h => minutely, fiveMinutely, tenMinutely, thirtyMinutely, hourly
  • 24h => fiveMinutely, tenMinutely, thirtyMinutely, hourly
  • 7d => thirtyMinutely, hourly, twoHourly, twelveHourly, daily
  • 30d => hourly, twoHourly, twelveHourly, daily, weekly

For special time ranges:

  • current_week, previous_week => thirtyMinutely, hourly, twoHourly, twelveHourly, daily
  • current_month, previous_month => hourly, twoHourly, twelveHourly, daily, weekly

For absolute time ranges, daily will be used.

Allowed values:tenSecondlythirtySecondlyminutelyfiveMinutelytenMinutelythirtyMinutelyhourlytwoHourlytwelveHourlydailyweekly

time_rangeOne Of

The time range to query.

Default:{"type":"relative","time_range":"1h"}

Relative time rangeobject

A duration representing a relative-to-now span of time. Generally the start time is floored to the requested granularity. Eg 7d from now, with 1day granularity initiated at 2024-01-08T17:11:00+05:00 will query for the time range from 2024-01-01T00:00:00+05:00 to 2024-01-08T17:11:00+05:00. The exact start and end timestamps are returned in the result query in the meta.start and meta.end fields. If the granularity for the previous query was 1hour, it would query a time range from 2024-01-01T17:00:00+05:00 to 2024-01-08T17:11:00+05:00.

Show Child Parameters
limitnumber

Limits the number of distinct metric groups to return.

Default:50

<= 1000

Example

MetricsResult

object

A result with metrics grouped by the dimensions specified in the query, at a particular time

The example represents a result group that has a summed request_count, and response_latency_p99 for a gateway_service at 2024-01-16T00:00:00Z.

timestampstringrequiredread-only
eventobjectrequiredread-only
Example

DisplayEntry

object
idstringrequired
namestringrequired
deletedboolean
is_other_groupboolean
Example

MetricsDisplayBlob

object

The blob represents how to interpret large UUID strings in the MetricsResult. The structure is records of dimension_id -> ID -> entity metadata. Since entity names within Konnect may overlap, ids are returned and used for exact grouping. This blob may be used to join and display results in a more human friendly manner. Since IDs represent entities in the system at all points in time, historical data will still exist even if an entity is deleted. These such entities are marked with the deleted key.

Another special case is the OTHER entity. When the limit of cardinality is reached for a second dimension, the system will group all other entities into the OTHER grouping. This prevents returning an overwhelming number of long tail entities.

apiobject
api_packageobject
api_productobject
api_product_versionobject
applicationobject
consumerobject
control_planeobject
control_plane_groupobject
country_codeobject
data_plane_nodeobject
data_plane_node_versionobject
gateway_serviceobject
portalobject
response_sourceobject
routeobject
status_codeobject
status_code_groupedobject
upstream_status_codeobject
upstream_status_code_groupedobject
Example

MetricUnits

object

A mapping of metric names to their associated unit. The keys are the metric names, and the values are the units. The possible units are: ms (Millisecond), count, and bytes

Example