# Introduction

Code metrics reflect quantifiable qualities of your project. They can be used in quality gate definitions (for example, to set a condition on the total number of raised issues in the code). See [introduction-to-quality-gates](https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/introduction-to-quality-gates "mention") for more information.

The mode of your SonarQube Server instance, either [mqr-mode](https://docs.sonarsource.com/sonarqube-server/instance-administration/analysis-functions/instance-mode/mqr-mode "mention") or [standard-experience](https://docs.sonarsource.com/sonarqube-server/instance-administration/analysis-functions/instance-mode/standard-experience "mention"), will determine which code metrics you see in the UI.

You can use different tools in the SonarQube Server to monitor and compare your project or portfolio’s code metrics.

{% hint style="info" %}
If you’re using an external monitoring system, you can retrieve the metric values through the [web-api](https://docs.sonarsource.com/sonarqube-server/extension-guide/web-api "mention").
{% endhint %}

## Related pages <a href="#related-pages" id="related-pages"></a>

* [metrics-definition](https://docs.sonarsource.com/sonarqube-server/user-guide/code-metrics/metrics-definition "mention")
* [monitoring-metrics](https://docs.sonarsource.com/sonarqube-server/user-guide/code-metrics/monitoring-metrics "mention")
* [Broken link](https://docs.sonarsource.com/sonarqube-server/user-guide/code-metrics/broken-reference "mention")
* [metrics-parameters](https://docs.sonarsource.com/sonarqube-server/instance-administration/analysis-functions/metrics-parameters "mention")


---

# 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.sonarsource.com/sonarqube-server/user-guide/code-metrics/introduction.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.
