> For the complete documentation index, see [llms.txt](https://knowledgebase.autorabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-suite/quality-control/rules/create-metric-rule.md).

# Create Metric Rule

To create a new Metric Rule -

1. Navigate to **`Rules`** -> **`Metric Rules`**
2. Click on **`Add Metric`**
3. Enter the basic details -
   1. **`Metric Name`** - Name of the metric
   2. **`Data Type`** - Return data type of the metric
   3. **`Component Type`** - Metric component type **`FILE`** level or **`PROJECT`**
   4. **`Language`** - Language for which the rule is applicable. E.g.: Mule, API
   5. **`Metric Tags`** - Tags associated with the rule. Tags can be used to filter metrics\
      &#x20;

      <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FXbXpT3g9pfHiLhhG4RUs%2Fcreate-metric1.png?alt=media&amp;token=4fcc5f9d-34ba-4d14-9c2f-b1cf49037977" alt=""><figcaption></figcaption></figure>
   6. **`Metric Description`** - Description of the metric in Markdown format
   7. **`Metric Definition`** - Definition of the metric. Metric rules are specified in Groovy\
      &#x20;

      <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F8MovMwYyDZ4B92VD0zqN%2Fcreate-metric2.png?alt=media&amp;token=b1f47549-20fb-4713-aef9-d1e109683fda" alt=""><figcaption></figcaption></figure>
4. Click on **`Submit`** to create the metric

### See Also

* [Quality Profiles](/product-guides/integral-zone/iz-suite/quality-control/profiles/quality-profiles.md)
* [Metric Profiles](/product-guides/integral-zone/iz-suite/quality-control/profiles/metric-profiles.md)
* [Quality Rules](/product-guides/integral-zone/iz-suite/quality-control/rules/quality-rules.md)
* [Metric Rules](/product-guides/integral-zone/iz-suite/quality-control/rules/metric-rules.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-suite/quality-control/rules/create-metric-rule.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
