# Metric

A **metric** is a measured property of a system.

Examples of a metric include:

* the response time of an application
* the utilization of a CPU
* the amount of time spent in garbage collection
* the cost of a cloud service

Metrics are used to both specify the optimization [goal and constraints](https://docs.akamas.io/akamas-docs/3.1.3/akamas-reference/glossary/goals-and-constraints) (e.g. minimize the heap size while keeping response time < 1000 and error rate <= 10% of a baseline value), and to assess the behavior of the system with respect to each specific configuration applied.

## Construct

A metric is described by the following properties:

* a **name** that uniquely identifies the metric
* a **description** that clarifies the semantics of the metric
* a **unit** that defines the unit of measurement used by the metric

The construct to be used to define a metric is described on the [Metric template](https://docs.akamas.io/akamas-docs/3.1.3/akamas-reference/construct-templates/metric-template) page.

## User Interface

Metrics are displayed in the Akamas UI when drilling down to each system component.

<figure><img src="https://3992428493-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD2bGkjffNK6bMgSMYyrY%2Fuploads%2FZly2KsvRg2MlXM6ub0Dd%2FScreenshot%202022-12-22%20at%2009.03.21.png?alt=media&#x26;token=7e98cee5-631e-499d-b55e-5b7d5a72e938" alt=""><figcaption></figcaption></figure>

and are represented in metric charts for each specific optimization study

<figure><img src="https://3992428493-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD2bGkjffNK6bMgSMYyrY%2Fuploads%2F1CDq6wHMWT0PhwunUwv7%2FScreenshot%202022-12-22%20at%2009.06.36.png?alt=media&#x26;token=9eab7dcd-e546-4f8b-a8de-ed893dd67c62" alt=""><figcaption></figcaption></figure>

Please notice that in order for a metric to be displayed in the Akamas UI, it has to be collected from a [Telemetry Provider](https://docs.akamas.io/akamas-docs/3.1.3/akamas-reference/glossary/telemetry-providers) by means of a specific [Telemetry Instance](https://docs.akamas.io/akamas-docs/3.1.3/akamas-reference/glossary/telemetry-instance) defined for each specific target system.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.1.3/akamas-reference/glossary/metric.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
