quest'n'click 4.5.0 · r1

Built for quest'n'click 4.5.0, revision r1. Whether it is published, and which one is current, is recorded at publication.json.

Monitoring

Français · Type: how-to + reference · Audience: admin · Context: hosted Studio · Status: ready · Applies from: 4.2.3

The Studio Server (hosted team Studio) · contract: experimental · verified by CI (support matrix of 4.4.0, 2026-10-23): Postgres, S3 and Keycloak in CI; Chromium and Firefox (job studio-hosted); WebKit on macOS, by hand only · automated checks: jobs studio-hosted, studio-install-smoke; CI plan studioHosted; 3 test files · people's passes: studio-hosted not run (#149), studio-collab not run (#150), studio-preview not run (#166), studio-assets-hosted not run (#167), studio-mcp-remote not run (#196), studio-oidc-generic not run (#197) · known limits: none listed on this page

What to watch on a hosted Studio, and how: the probes, the Prometheus metrics behind a token, the logs, and the alerts that should reach a person.

What you get

A scraper reading /metrics with its token, a prober on /readyz, Clever Cloud's deployment notifications, and six alerts sent to a person: no instance serving writes, the journal not shipping, the worker piling up, jobs failing, members waiting on each other, the daily backup missing.

Context and versions

Prerequisites

Where to run the commands

clever notify-email, clever logs: on your machine, in the engine repository where the apps are linked. The scraper: on a machine of yours that reaches https://studio.example.fr.

Steps

  1. Check the route answers with the token, without printing it:

    # on your machine, the token in a 0600 file
    curl -s -o /dev/null -w '%{http_code}\n' -H "Authorization: Bearer $(cat ~/secrets/my-game/metrics-token)" https://studio.example.fr/metrics
    

    200 with the token; 401 with none or another (compared in constant time); 404 when the app has no STUDIO_METRICS_TOKEN (the route does not exist). It is never behind the session, and never on the game's origin, where any request without the game's session is refused before its path is read (401, "open the game from the Studio").

Guarantee · metrics-token-required · referenced · executed on aff6caab7514 · scope self-checked by the author (AI), not reviewed /metrics answers only to Authorization: Bearer <STUDIO_METRICS_TOKEN>: without the token or with another, a 401, the token compared in constant time.

  1. Point your scraper at it, with the token as a bearer credential. For Prometheus:

    # prometheus.yml, on the machine that runs Prometheus
    scrape_configs:
      - job_name: my-game-studio
        scheme: https
        metrics_path: /metrics
        authorization:
          type: Bearer
          credentials_file: /etc/prometheus/my-game-metrics-token
        static_configs:
          - targets: ['studio.example.fr']
    
  1. Have Clever Cloud tell you about failed deployments (webhooks too: clever webhooks add):

    # on your machine, in the engine repository
    clever notify-email add --notify you@example.fr --event DEPLOYMENT_FAIL studio-deploys
    

    Clever's console also shows each app's CPU, memory and logs.

  1. Set the alerts, to a person:
    • /readyz is not 200 for 2 min: no instance serves writes. A redeploy keeps it at 503 for 12 to 20 s, the first deploy onto 4.2.3 or later for about 2.5 min: expect the alert then (Redeploys).
    • studio_journal_rpo_seconds above 60 for 5 min (the target is 1 min, D42), or ship-failed keeps rising.
    • studio_worker_jobs_in_flight above 3 for 10 min: the worker runs one job at a time per lane, two lanes, so work is piling up.
    • Jobs fail: studio_worker_job_seconds_count{outcome!="ok"} rises, or health-failed does.
    • studio_lease_conflicts_total jumps: people waiting on each other's spans. Not a fault, a sign to look at.
    • The daily backup's line ("event":"backup") is missing from the logs one morning.

Expected result, and how to check it

The scraper shows the target up, studio_service_lease_held at 1 and studio_journal_rpo_seconds at 0 when nobody writes. To test the path to a person, trigger one alert on purpose (stop the studio app a few minutes off hours, or lower a threshold) and time how long it takes to reach you: that has not been measured by this project.

Common errors

SymptomCauseFix
404 on /metricsNo STUDIO_METRICS_TOKEN on the studio app, or not redeployed sinceSet it, redeploy
401 the metrics need their tokenWrong token, or play. instead of studio.Use the Studio's origin and the right file
STUDIO_METRICS_TOKEN: 32 characters at least and the server does not startA short tokenopenssl rand -base64 32
Counters fall to zeroA restart or a redeploy: the metrics live in the instance's memoryRead them with rate(), which treats it as a counter reset

Files or data changed

Your scraper's configuration and the token's file on its machine; Clever Cloud's notification settings. Nothing in the Studio.

Recovery or going back

Remove the token (clever env rm STUDIO_METRICS_TOKEN --alias my-game-studio, then redeploy): the route is gone (404). Changing it is Rotating keys.

Reference: the metrics

They are counts and durations: no path, no name, no author, no content. They live in the instance's memory, so a restart starts them again from zero. The worker's own queue is not measured from the worker: the Studio's side of it is.

MetricWhat
studio_journal_operation_seconds{outcome}the journal's operations, from asked to answered (confirmed, replayed, refused, failed)
studio_worker_jobs_in_flightthe jobs asked of the worker and not answered yet: the queue as the Studio sees it
studio_worker_job_seconds{kind,outcome}the worker's jobs by kind (validate, load, preview, prepare, lint, solve, playtests) and outcome (ok, failed, timeout, error)
studio_lease_conflicts_totalthe 423s answered: someone else's span, or a lease that ended
studio_preview_build_seconds{outcome}a revision's preview, the worker's build and the files stored, after the snapshot (built, failed)
studio_preview_phase_seconds{phase}since 4.4.0, a preview by phase: queued (from the write to the build's start: the coalescing, a build before it, the retries), snapshot, job (the worker's job as the Studio waits for it, its queue on the worker included), store, and since_write (from the write to the preview ready)
studio_worker_job_phase_seconds{kind,phase}since 4.4.0, a job by phase as the Studio runs it: put (the snapshot staged), post (the worker's answer), get (the result read), del (the staging deleted)
studio_health_judgement_seconds{verdict}the health's verdict on a revision
studio_journal_rpo_secondsthe age of the oldest operation not shipped to the bucket (the rpoMs of /readyz)
studio_journal_revision, studio_service_lease_heldthe head, and whether this instance serves writes (1)
studio_http_responses_total{class}, studio_log_events_total{event}answers by status class; the failures logged (ship-failed, health-failed, reconcile-failed, error…)

OpenTelemetry is not supported (it was left for later in 4.2.3, and 4.4.0 did not add it).

Reference: the probes and the logs

References


Edit the source of this page · Report an error