Skip to main content

What you need

  • A Ktor module that runs. Metrics are for Ktor servers. Web apps are static files and have no metrics here.
  • Monitoring on the server. The platform reads metrics from Prometheus. If the server has none, the Metrics tab shows Metrics aren’t available with the reason:
    To set it up on your own server, see Monitoring.

Open the Metrics tab

Open the project and pick the Metrics tab. The toolbar has three pickers:
  • Environment. Production, or a preview such as Preview pr-42. The menu shows up when a preview has a Ktor module running.
  • Module. When more than one Ktor module runs, pick one. The tab opens on the primary module.
  • Range. 1h, 24h, 7d or 30d. The tab opens on 1h.
Every member of the project’s org can see its metrics. It needs the Viewer role.

Current values

Four tiles at the top show the module right now: When a module scaled to zero, a note says it starts again on the next request. See Scale to zero.

Charts

Six charts show the chosen range: Requests, latency and errors are measured at the platform’s router, for the requests that reach the module through its hosts and, in production, its custom domains. Hover over a chart to read the value at a point. Where there was no data, for example latency while there were no requests, the line has a gap.

Time ranges

Each point is an average over the time before it: one step, and at least 2 minutes. While a range updates on its own, the toolbar says so, for example Updates every 30 s. To see newer points in 7d or 30d, reload the page. The server keeps answers for a short while, so figures can be a little behind: up to 15 seconds for the last hour, and up to 10 minutes for the last 30 days.
Charts only reach back as far as the server’s Prometheus keeps data. A self-hosted server keeps 15 days by default, so the 30d range shows nothing older than that. See monitoring.retention in Configuration.

Previews

Pick a preview in the environment menu to see its Ktor modules. The menu lists the previews that have a Ktor module running. When a preview goes away, it drops out of the list.

When the tab is empty

If a refresh fails after the charts loaded, the charts stay and a banner says Couldn’t refresh.

Metrics in other places

  • The project’s Overview tab shows the last 24 hours of requests, p95 latency and error rate of the primary module. See Overview dashboards.
  • The org overview adds up traffic and errors across your live projects. See Overview dashboards.
  • What you pay for, such as vCPU-hours, GB-hours and bandwidth, is on the org’s Billing tab, not here. See Billing.