LogoLogo
Login to CortexBook a DemoCortex Academycortex.io
  • Cortex Docs
  • Cortex Quick Start
  • Ingesting data into Cortex
    • Managing Entities
      • Adding entities
        • Add services
        • Add domains
        • Add teams
        • Add custom entity types
        • Defining dependencies
      • Entity details page
      • Defining ownership
      • Defining relationship types
      • Grouping entities
      • Adding external documentation
      • Adding Deploy data
      • Adding custom data
      • Viewing discovered entities
      • Archiving entities
      • Relationship graph
      • Using On-call Assistant for incidents
      • Managing Terraform infra in Cortex
    • Managing Catalogs
    • Integrations
      • Internally hosted integrations
      • ArgoCD
      • AWS
      • Azure DevOps
      • Azure Resources
      • BambooHR
      • Bitbucket
      • BugSnag
      • Buildkite
      • Checkmarx
      • CircleCI
      • ClickUp
      • Codecov
      • Coralogix
      • Datadog
      • Dynatrace
      • Entra ID (Azure AD)
      • FireHydrant
      • GitHub
      • GitLab
      • Google
      • Grafana
      • incident.io
      • Instana
      • Jenkins
      • Jira
      • Kubernetes
      • LaunchDarkly
      • Lightstep
      • Mend
      • Microsoft Teams
      • New Relic
      • Okta
      • Opsgenie
      • PagerDuty
      • Prometheus
      • Rollbar
      • Rootly
      • Sentry
      • ServiceNow
      • Slack
      • Snyk
      • SonarQube
      • Splunk Observability Cloud (SignalFx)
      • Splunk On-Call (VictorOps)
      • Sumo Logic
      • Veracode
      • Wiz
      • Workday
      • xMatters
  • Scorecards
    • Initiatives and Action items
      • Creating issues based on Initiatives
    • Scorecard rule exemptions
    • Scorecard rule filters
    • Scorecard examples
    • Scorecards as code
  • Reports
    • Executive report
    • All Scorecards report
    • Bird's eye report
    • Progress report
    • Report card
  • Eng Intelligence
    • Custom Metrics
    • Jira Metrics
    • Metrics Explorer (Beta)
  • Cortex Query Language (CQL)
    • Using CQL reports
    • Using JQ in Cortex
  • Workflows
    • Creating a Workflow
      • Workflows as code
    • Blocks
    • Running a Workflow
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Engineering homepage
  • Workspace Settings
    • Using GitOps for Cortex
      • GitOps logs
    • Managing users
      • Roles and permissions
        • Custom roles
        • Team ownership entity editing
      • Configuring SSO
        • Microsoft Entra ID
        • Google
        • Other OIDC providers
        • Okta
          • Okta SCIM
      • Configuring identity mappings
      • Onboarding management
    • API keys, secrets, and tokens
      • Secrets
      • Personal tokens
    • Audit logs
    • Entity settings
      • Data verification
      • Auto archiving entities
    • IP allowlist
    • Notifications
      • Notification logs
    • Customizing your workspace
    • Using search in Cortex
  • Cortex API
    • REST API operations
      • API Keys
      • Audit Logs
      • Catalog Entities
      • Custom Data
        • Custom Data (Advanced)
      • Custom Events
      • Custom Metrics
      • Dependencies
      • Deploys
      • Discovery Audit
      • Docs
      • Eng Intel: User Labels
      • Entity Relationship Types (Beta)
      • Entity Relationships (Beta)
      • Entity Types
      • GitOps Logs
      • Groups
      • Initiatives
      • Integrations APIs
        • Azure Active Directory (Entra ID) API
        • Azure Resources API
        • AWS API
        • Azure DevOps API
        • CircleCI API
        • Coralogix API
        • Datadog API
        • GitHub API
        • GitLab API
        • incident.io API
        • LaunchDarkly API
        • New Relic API
        • PagerDuty API
        • Prometheus API
        • SonarQube API
      • IP Allowlist
      • Notification Logs
      • On call
      • Packages
      • Plugins
      • Queries
      • SCIM
      • Scorecards
      • Secrets
      • Team Hierarchies
      • Teams
      • Workflows
Powered by GitBook
On this page
  • Overview
  • Managing custom metrics
  • Prerequisites
  • Define custom metrics and add metric data
  • Edit custom metric definition
  • Viewing custom metrics

Was this helpful?

Export as PDF
  1. Eng Intelligence

Custom Metrics

Last updated 16 days ago

Was this helpful?

Overview

Define your own custom time series metrics to power the analytics in your Eng Intelligence dashboard, drawing from your integrations with Cortex or your organization's internal data. In addition to seeing these in Eng Intelligence, you’ll also be able to view these in the entity pages and use them in Scorecards.

After defining a custom metric, the metric data can be provided via the following methods:

  • API: Post custom metric data to Cortex via .

  • CQL: Compute data based on a CQL query that is evaluated by Cortex every 12 hours.

Use cases

Some examples of custom metrics you might want to surface in Eng Intelligence include:

  • ServiceNow incident data

    • Example CQL: custom("servicenow-incidents").length

  • Custom-computed SLO metrics

  • Homegrown tools that generate metrics through custom data

  • Code coverage or vulnerability metrics from existing integrations

    • Example CQL: codecov.codeCoverage() or sonarqube.metric("coverage")

Managing custom metrics

Prerequisites

  • Configure Eng Intelligence Custom Metrics

    • This permission allows you to create, edit, and delete a custom metric definition. The fields that can be edited are the name, filter, CQL expression. This permission also includes the ability to publish the custom metric.

  • Manage Eng Intelligence Custom Metric data

    • This permission is only required if you are managing custom metrics via the API. It allows you to hit the public API to add and delete data points for an API Custom Metric.

Define custom metrics and add metric data

See the tabs below for instructions on creating custom metrics with CQL or via the API.

The data retention period for custom metric data is 24 months.

  1. Fill in the "Add metric" form:

    • Name: Enter the name of the custom metric that will appear in Eng Intelligence.

    • Key: Enter a unique identifier for the custom metric made up of letters, digits, and hyphens, e.g., my-custom-metric.

    • Selection and Entity types: Choose whether to include or exclude specific entity types.

    • Ingestion method: Choose CQL.

    • CQL expression: Enter a CQL expression. The result of the expression must be a number, otherwise it will fail validation.

    • Publish immediately: Toggle this setting on to make this data immediately visible to all users with access to Eng Intelligence.

  2. Click Add metric.

Cortex will evaluate the CQL expression every 12 hours to check for new metric data.

  1. Fill in the "Add metric" form:

    • Name: Enter the name of the custom metric that will appear in Eng Intelligence.

    • Key: Enter a unique identifier for the custom metric made up of letters, digits, and hyphens, e.g., my-custom-metric.

    • Selection and Entity types: Choose whether to include or exclude specific entity types.

    • Ingestion method: Choose API.

    • Publish immediately: Toggle this setting on to make this data immediately visible to all users with access to Eng Intelligence.

  2. Click Save metric.

Bulk-add metric data via API

When using the API, it is possible to backfill custom metric data up to two years.

Note that bulk creation of metric data via the API is subject to rate limits and cardinality limits.

Edit custom metric definition

Note that you cannot update the key or the type, but you can edit the name, entity type filter, CQL expression, and whether the metric is published. If you need to change the key or the type, you will need to archive the current metric and re-create it with a new key.

If you edit a CQL custom metric definition, the older values of the metric will no longer be accessible.

To edit a custom metric:

  1. Make any necessary changes, then click Save metric.

Viewing custom metrics

View custom metric definitions

View custom metric data

View custom metric data on an entity page

Customize the appearance of custom metrics

You can customize your view by reordering the columns or hiding columns.

    • Rearrange columns: In the list of metrics, click and drag each tile into your preferred order.

    • Hide a column: Click the trash icon on the right side of a metric tile.

  1. When you are done reordering or hiding columns, click Save changes at the bottom of the page.

Before configuring custom metrics, your user must have the following set in Cortex:

In Cortex, navigate to the .

In the upper right side of the list of custom metrics, click Add metric.

In Cortex, navigate to the .

In the upper right side of the list of custom metrics, click Add metric.

After defining the metric, you can post metric data to it via the .

Bulk-add multiple metric points to an entity using .

In Cortex, navigate to the .

In the list of metrics, locate the one you want to edit. Click the pen icon on the right side of the metric.

In Cortex, navigate to the .

From the main nav of Cortex, click Eng Intelligence. The custom metrics will appear alongside the other key metrics in the table.

While viewing an entity, click Custom metrics from the sidebar to view metrics for that entity:

In Cortex, navigate to the .

To add a column back into the view, select it from the Columns drop-down. In the dropdown, the columns with a checkmark have been added already. The columns without a checkmark have been hidden.

the API
permissions
Eng Intelligence custom metrics settings
Eng Intelligence custom metrics settings
createBulkCustomMetricData
Eng Intelligence custom metrics settings
Eng Intelligence custom metrics settings
Eng Intelligence
Eng Intelligence appearance settings
Cortex API