# Canary Scoring

Canary scoring works with the principle of comparing the log files of two different releases. The log files of the v1 release also known as the baseline is compared with the log files of the v2 release also known as the new release/canary. In this scoring method, the two log files are compared to figure out the unexpected events (CRITICAL ERROR,ERROR, WARNING) and determine the shift from v1 to v2. The lesser the shift in v2 the closer the score is to 100. Canary scoring works best when the size of v1 and v2 logs are almost the same and when log files are large in size.

Canary scoring is done based on the following factors:

* For every unexpected cluster present in v2 and not in v1, score of the canary is reduced
* For all unexpected clusters present in both v1 and v2, the score of the canary is reduced only when the number of logs of that cluster are higher in v2.
* Canary score also takes into account errors in v1 by introducing a normalization factor.
* Score Reduction is higher at higher sensitivity levels.&#x20;
* Score Reduction is higher for clusters with higher criticality.
* By default, canary scoring will give a score of 0 (fail) whenever there is a critical error.

To set the Canary Scoring algorithm follow the steps below:

1. Click on "New Application" button to create a new  application as shown below:

![](/files/5XH0M8Quksr6QtPoxKZH)

2\. Following application details appears as shown below:

![](/files/NTxu2eFERditnm6bMhQq)

3\. In the above form after adding the application details you need to add. To know more on how to add an application click [here](https://docs.opsmx.com/products/opsmx-intelligent-software-delivery-platform/system-setup/applications/add-applications).&#x20;

4\. After you add the application details, you need to add the services to the application. To know more on how to add an application click [here](https://docs.opsmx.com/products/opsmx-intelligent-software-delivery-platform/system-setup/applications/add-services/add-services-and-pipelines).&#x20;

&#x20;5\. Next, you get the option to select the type of service you want to add. The options are:

* Approval
* Verification
* Test Verification
* Policy&#x20;

Refer to the image below:

![](/files/S9xSgHSTtvDDcDHTob54)

6\. To add a log template select **Verification** or **Test Verification** type. The following options appear and click "**+**" Symbol:

![](/files/TKtvnvhQbvgKVi69lv8u)

7\. Select **Canary Scoring** from the drop-down while creating new Log Template as shown below:

![](/files/RAiYIchpqqciocx2s8r4)


---

# 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/additional-resources/previous-releases/isd-3.12/data-and-intelligence-module-autopilot/autopilot/scoring-algorithms/canary-scoring.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.
