> For the complete documentation index, see [llms.txt](https://docs.aviator.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aviator.co/manage/on-premise-installation/prometheus-endpoint.md).

# Prometheus endpoint

The web app server and the background worker server can serve the Prometheus endpoint. Learn how to enable scraping the metrics from endpoints in our guide.

The web application server and the background worker server can serve the Prometheus endpoint. You can scrape the metrics from these endpoints. This document provides you how to enable it.

## Web application server

By default, the web application server won’t serve the metrics endpoint. You can enable it by updating `values.yaml`:

```bash
common:
  env:
    - name: "SERVE_PROMETHEUS_ENDPOINT"
      value: "true"
```

This makes the `web` Pod to expose `/debug/metrics` along with other endpoints on the main HTTP port. If the server is exposed to the Internet, we highly recommend changing the load balancer / reverse proxy config in front of the app to hide the `/debug/*` path from public.

{% hint style="info" %}
Can I make it serve on a different port?

Right now, due to the internal architecture, this is difficult.
{% endhint %}

{% hint style="info" %}
Can I add a basic auth?

Please let us know on the requirement. The current implementation doesn’t have it.
{% endhint %}

## Background worker server

By default, the background worker server exposes the metrics endpoint. The port is `8491` (specified by `PROMETHEUS_PORT` environment variable in the Helm chart).

## Exposed metrics

Unlike REST APIs or GraphQL APIs, we do not have intention on maintaining the backward compatibility of the metrics. There can be metrics that we add for debugging purpose (e.g. `bug43123_triggered` counter), and you can find such metrics useful in some cases. However, since we don’t have knowledge whether you depend on which metrics, we may just remove such metrics without letting you know.

Practically speaking, we assume that the following metrics would be used by you, and try to make an effort to maintain them.

* flask\_http\_request\_duration\_seconds
* flask\_http\_request\_exceptions\_total
* flask\_http\_request\_total
* github\_api\_call\_latency
* github\_webhook\_latency
* sqlalchemy\_query\_latency\_seconds
  * This is enabled when `ENABLE_DB_METRICS` environment variable is set to `true`


---

# 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://docs.aviator.co/manage/on-premise-installation/prometheus-endpoint.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.
