# Real-Time Metrics quickstart

This guide instructs you through reading your first traffic numbers in [Real-Time Metrics](/en/documentation/platform/real-time-metrics/), in Azion Console or with the GraphQL API.

- Read the total requests and the total data transferred of your applications.
- Set the time range to the last 24 hours.
- Narrow both totals to one host.

Real-Time Metrics creates nothing, and there is nothing to turn on: it is active on every Azion account. It reads the metrics your applications and other products generate as they receive traffic, and charts them as soon as traffic arrives. Two things stand behind every number on this page:

1. An **application** that has already served requests. Those requests are the data.
2. The `httpMetrics` **dataset**, which records the requests of your applications. The charts of the **Applications** tab and the GraphQL API both read it, so both interfaces return the same totals for the same range and filter.

Real-Time Metrics shows aggregated numbers. For the logs behind each number, refer to [Real-Time Events](/en/documentation/platform/real-time-events/).

---

Select your interface once. The prerequisites and each stage below show only that path.

## Prerequisites

- An Azion account. To create one, refer to [Create an account](/en/documentation/fundamentals/creating-account/).
- An [application](/en/documentation/platform/applications/) served by a [workload](/en/documentation/platform/workloads/), with requests in the last 24 hours.
- A host the workload answers on, such as `www.example.com`. You filter the metrics by it.

**Console**

- Access to Azion Console. To sign in, refer to [How to access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/).

**API**

- A personal token. To create one, refer to [How to manage a personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/).
- `curl`.

---

## Open the request metrics of your applications

With no filter, Real-Time Metrics counts the requests and the data transferred of every application in your account.

**Console**

To read both totals in Azion Console:

1. **Open Real-Time Metrics**

   Access [Azion Console](https://console.azion.com/) > **Real-Time Metrics**.

   The page opens on the **Build** category, the **Applications** tab, and the **Data Transferred** dashboard.

2. **Read the data transferred**

   In the **Edge Cache** chart, find the **Data Transferred Total** entry in the legend.

3. **Select Requests in the dashboard selector**

4. **Read the request count**

   In the **Total Requests** chart, find the **Edge Requests Total** entry in the legend.

Both charts cover **Last 5 minutes**, the range the page opens on. Each legend entry reads `<Series> - <total>`, where the total sums the whole range.

The category dropdown also offers **Secure** and **Observe**, each with its own product tabs. For the full layout, refer to [Filters and time range](/en/documentation/platform/real-time-metrics/filters-and-time-range/#screen-layout).

**API**

To read both totals with the GraphQL API, send a `POST` request to `https://api.azion.com/v4/metrics/graphql`. The query selects `requestsTotal` and `dataTransferredTotal` from the `httpMetrics` dataset, and the variables set a one-hour range.

Replace `[TOKEN VALUE]` with your personal token, and the `begin` and `end` values with the hour you want to read:

```bash
curl -X POST 'https://api.azion.com/v4/metrics/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token [TOKEN VALUE]' \
  -d '{"query":"query TrafficLastHour($begin: DateTime!, $end: DateTime!) { httpMetrics(limit: 1, filter: { tsRange: { begin: $begin, end: $end } }) { requestsTotal dataTransferredTotal } }","variables":{"begin":"2026-01-02T11:00:00","end":"2026-01-02T12:00:00"}}'
```

The API answers `200` with one row:

```json
{
  "data": {
    "httpMetrics": [
      {
        "requestsTotal": 0,
        "dataTransferredTotal": 0.0
      }
    ]
  }
}
```

The row holds the totals for the range. A `0` means no request reached your applications in that hour. The API requires a range: a query without `tsRange` returns `400` with `To execute queries it is mandatory to provide the desired time interval.`

For every field of the dataset, refer to [Real-Time Metrics GraphQL fields](/en/documentation/devtools/graphql/gql-real-time-metrics-fields/#workloadmetrics).

---

## Set the time range to the last 24 hours

The time range sets the period that every total covers. In both interfaces, this stage reads the same 24 hours.

**Console**

To set the range in Azion Console:

1. **Open the time-range picker**

   In the filter row, select the time-range picker.

2. **Select Last 24 hours**

   In the **Quick** tab, under **Commonly used**, select **Last 24 hours**.

3. **Select Update**

   After the range changes, the **Refresh** button beside the picker reads **Update**.

Every chart reloads for the last 24 hours, and the **Edge Requests Total** legend entry now totals that period.

For a custom start and end, or to reload the charts on a timer, refer to [Filters and time range](/en/documentation/platform/real-time-metrics/filters-and-time-range/#time-range).

**API**

The `tsRange` filter sets the period with `begin` and `end`. To read the last 24 hours with the API, send the same query with `begin` 24 hours before `end`. The operation name says what the range covers:

```bash
curl -X POST 'https://api.azion.com/v4/metrics/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token [TOKEN VALUE]' \
  -d '{"query":"query TrafficLast24Hours($begin: DateTime!, $end: DateTime!) { httpMetrics(limit: 1, filter: { tsRange: { begin: $begin, end: $end } }) { requestsTotal dataTransferredTotal } }","variables":{"begin":"2026-01-01T12:00:00","end":"2026-01-02T12:00:00"}}'
```

The API answers `200` with the totals for those 24 hours:

```json
{
  "data": {
    "httpMetrics": [
      {
        "requestsTotal": 1985,
        "dataTransferredTotal": 149684815.0
      }
    ]
  }
}
```

`requestsTotal` counts the requests your applications served in the range. `dataTransferredTotal` is in bytes, the sum of the data transferred in and out.

---

## Filter by one host

A filter keeps only the requests that match it, and every total follows. This stage keeps the requests to the host `www.example.com`. Replace it with a host your workload answers on.

**Console**

To filter the dashboard in Azion Console:

1. **Add a filter**

   In the filter row, select the filter icon, whose tooltip reads **Add filter**.

2. **Select the Host field**

   In **Filter**, select **Host**.

3. **Select the Equals operator**

   In **Operator**, select **Equals**.

4. **Enter the host**

   Enter `www.example.com` as the value.

5. **Select Apply**

A chip under the filter row reads `Host equals: www.example.com`. Every chart now shows only the requests to that host, over the last 24 hours.

To filter by workload instead of host, select the **Domain** field, labeled **Workload** on some accounts, and select the workload from its list. For every field and operator, refer to [Filters and time range](/en/documentation/platform/real-time-metrics/filters-and-time-range/#filters).

**API**

To filter with the API, add `hostEq` to `filter`, next to `tsRange`. The query keeps the 24-hour range you set:

```bash
curl -X POST 'https://api.azion.com/v4/metrics/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token [TOKEN VALUE]' \
  -d '{"query":"query TrafficForHost($begin: DateTime!, $end: DateTime!) { httpMetrics(limit: 1, filter: { tsRange: { begin: $begin, end: $end }, hostEq: \"www.example.com\" }) { requestsTotal dataTransferredTotal } }","variables":{"begin":"2026-01-01T12:00:00","end":"2026-01-02T12:00:00"}}'
```

The API answers `200` with the totals of that host alone:

```json
{
  "data": {
    "httpMetrics": [
      {
        "requestsTotal": 982,
        "dataTransferredTotal": 114490585.0
      }
    ]
  }
}
```

The totals now count only the requests to that host, a part of the account totals for the same range. For the other operators a filter accepts, refer to [GraphQL queries](/en/documentation/devtools/graphql/features/#operators).

---

## Next steps

- [Filters and time range](/en/documentation/platform/real-time-metrics/filters-and-time-range.md): Every control above the charts: presets, auto-refresh, timezone, operators, and the query input.
- [Build dashboards](/en/documentation/platform/real-time-metrics/build-dashboards.md): What each chart of the Applications dashboards measures, and the field that returns it.
- [Break down requests by status code](/en/documentation/guides/platform/observability/break-down-requests-by-status-code.md): Split the requests of your applications by the status code they returned.
- [How Real-Time Metrics works](/en/documentation/platform/real-time-metrics/how-it-works.md): The path from a request to a chart, and how the range sets the resolution of each chart.
