> For the complete documentation index, see [llms.txt](https://docs.devland.is/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devland.is/development/devops/metrics.md).

# Metrics

Metric is one of the foundational pieces of telemetry we need to understand issues at runtime. It is theresfore deemed one of the core responsibilities of developers to provide metrics in their services.

## Metrics infrastructure

~~We are using~~ [~~Prometheus~~](https://prometheus.io) ~~for collecting, storing and querying metrics. To see the different metric types available please see~~ [~~here~~](https://prometheus.io/docs/concepts/metric_types/)~~. For more information on the naming of metrics, please see~~ [~~here~~](https://prometheus.io/docs/practices/naming/)~~.~~

~~If you are using the `infra-express-server` or `infra-next-server` libraries you already have the metrics infrastructure setup for you. Additionally, we already provide metrics for the routes you are creating.~~

## Types of metrics

We are collecting metrics at three distinct levels:

* infrastructure
* runtime
* application

**Infrastructure** metrics are gathered from different layers of infrastructure - cloud, operating system, Kubernetes, Docker.

**Runtime** metrics are gathered from our application runtime - NodeJS. These are about the utilization of different types of heap, CPU, etc.

**Application** metrics are about the entities and operations performed on those, that are in the domain of the application. Providing these metrics is a responsibility of the developers. It is important to have metrics for both successful as well as unsuccessful operations. For example: "application registration successful", application registration failed", etc. For an example, please take a look at this [file](https://github.com/island-is/island.is/blob/main/libs/infra-express-server/src/lib/infra-express-server.ts).


---

# 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 dynamically by asking a question.

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

```
GET https://docs.devland.is/development/devops/metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
