# Metric Analysis

{% hint style="info" %}
Before going through this article, we recommend to learn [how to create metric templates](https://docs.opsmx.com/autopilot/analysis-setup/templates/metric-template).
{% endhint %}

The goal of metric analysis is to score/compare all the APM and INFRA metrics from baseline with canary to get the user a good idea of whether the canary is a fail or a pass based on the overall average metric score given to the system. You can make a decision overall to have the application in production or not based on this metric score.

The goal here is to carry out the canary analysis for old and new release by means of comparing the APM and INFRA metrics of both versions. This is carried out in a structural manner by comparing each metric of old release to new release and finally scoring the metrics analysis by averaging out the individual score of the metrics.

### **Critical Metrics**

User-defined metrics that represent KPI of service behavior. Continuous Verification test will fail if any of the metrics tagged as critical fail in the canary test. If critical metrics are not tagged by the user, the system will treat all metrics equally and will assign rank based on algorithms.

### **Watchlist Metrics**

User-defined metrics that represent intuitive performance measures. These metrics are used for filtering when presenting results with large number of analyzed metrics.

### **Interpret the score**

The intermediate file generated with all the scoring details is attached below:

![](https://lh4.googleusercontent.com/raaHE2RsXd4t0_j2T7mYe2s7tMI0GlVrxcQYPIa3tDwG2DJXVB4vSkjEy9voguhfXCMhs5Z0XAH6Qs69_0V1DXtxc2EyPQFfdsEdmrGbwjecEHTsU3pUKWPPG8GyC1tvm26y1GcZ3PzxWgWm5A)

In the above file, the score is given to each metric based on the three tests that we perform to score. The score of the metric is given in the Score column. The MetricWeight column gives the weight given to each metric and based on this final score which is the weighted score is calculated.

The individual scores of three tests are given in score.per (percentage score), score.wilcox (Wilcoxon Test score) and the quantile score is given. The score of each metric is either 0 (failed) or 100 (pass).

Other relevant info like correlation coefficient between load and corresponding metric is given in corr.coeff column and also the percentage difference between two releases is in percent.diff column.

One more criteria is the presence of Critical metric in the data. If there is at least one Critical metric present in the dataset then the score is given as 0.

The final file which gives the individual score of all the metrics and the weighted final score is under the APM folder in the folder structure.


---

# 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.opsmx.com/opsmx-1/opsmx-context-engine/user-guide/continuous-verification/metric-analysis.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.
