Custom Metrics

Create a custom metric definition

Changed on

Defines a custom metric of type PUBLIC_API, which you then record data points against. The key cannot change after creation. API key must have the Configure Eng Intelligence custom metrics permission.

post/api/v1/eng-intel/custom-metrics

Request

  • Base URL
    https://api.getcortexapp.com
  • URL
    https://api.getcortexapp.com/api/v1/eng-intel/custom-metrics
  • Auth
    HTTP bearer

Request body

categorystring

Free-text group for the metric

descriptionstring

What the metric measures

isDraftboolean

A draft metric still accepts data points but is hidden from Eng Intelligence. Defaults to false.

keystring required

Unique key that data points are recorded against. Letters, digits, and hyphens, 2 to 255 characters, starting and ending with a letter or digit.

namestring required

Display name

valence'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' required

Whether a higher value is better. Defaults to NEUTRAL.

Example request

{
  "category": "Delivery",
  "key": "deploy-frequency",
  "name": "Deploy frequency"
}

Response

The created custom metric definition

categorystring

Free-text group for the metric

cqlExpressionstring

The CQL expression behind a CQL metric. Null for PUBLIC_API.

descriptionstring

What the metric measures

isDraftboolean required

A draft metric is hidden from Eng Intelligence

keystring required

Unique key that data points are recorded against

namestring required

Display name

type'CQL' | 'PUBLIC_API' required

PUBLIC_API metrics take data points through the API. CQL metrics compute their values from a CQL expression and are read-only through the API.

valence'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' required

Whether a higher value is better

Example response

{
  "category": "Delivery",
  "key": "deploy-frequency",
  "name": "Deploy frequency"
}

Changes