Repository navigation
EN Clever Monitoring
Français · How-to + reference · Published, reviewed by a person · Applies from: 4.2.3
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.
Audience, context, and the statuses of what this page rests on
Audience: admin · Context: hosted Studio
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 planstudioHosted; 3 test files · people's passes:studio-hostednot run (#149),studio-collabnot run (#150),studio-previewnot run (#166),studio-assets-hostednot run (#167),studio-mcp-remotenot run (#196),studio-oidc-genericnot run (#197) · known limits: none listed on this page
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.
- A hosted Studio on Clever Cloud.
/metricsandSTUDIO_METRICS_TOKENexist from 4.2.3; the per-phase preview metrics and log fields from 4.4.0. -
Verified on: 19 October 2026, by the reference deployment, for the route only (engine commit c66fbf56,
package.json 4.2.2 before the 4.2.3 tag):
/metricsanswered 401 without a token or with a wrong one, 200 with it (text/plain; version=0.0.4), and 401 on the game's origin. Not verified: no collector and no alert were set on the test organisation, and no alert was triggered on purpose.
-
STUDIO_METRICS_TOKENset on the studio app, 32 characters or more (Configuration). - A scraper you run (Prometheus with its Alertmanager, or any service that reads the Prometheus text format), or at
least an HTTP prober. Clever Cloud does not read
/metrics.
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.
-
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 onb061c4ae6fbe· scope reviewed/metricsanswers only toAuthorization: Bearer <STUDIO_METRICS_TOKEN>: without the token or with another, a 401, the token compared in constant time.
-
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']
-
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-deploysClever's console also shows each app's CPU, memory and logs.
- Set the alerts, to a person:
-
/readyzis 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_secondsabove 60 for 5 min (the target is 1 min, D42), orship-failedkeeps rising. -
studio_worker_jobs_in_flightabove 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, orhealth-faileddoes. -
studio_lease_conflicts_totaljumps: 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.
-
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.
| Symptom | Cause | Fix |
|---|---|---|
404 on /metrics
|
No STUDIO_METRICS_TOKEN on the studio app, or not redeployed since |
Set it, redeploy |
401 the metrics need their token
|
Wrong 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 start |
A short token | openssl rand -base64 32 |
| Counters fall to zero | A restart or a redeploy: the metrics live in the instance's memory | Read them with rate(), which treats it as a counter reset |
Your scraper's configuration and the token's file on its machine; Clever Cloud's notification settings. Nothing in the Studio.
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.
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.
| Metric | What |
|---|---|
studio_journal_operation_seconds{outcome} |
the journal's operations, from asked to answered (confirmed, replayed, refused, failed) |
studio_worker_jobs_in_flight |
the 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_total |
the 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_seconds |
the age of the oldest operation not shipped to the bucket (the rpoMs of /readyz) |
studio_journal_revision, studio_service_lease_held
|
the 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).
-
GET /livez: 200 while the process answers.GET /startz: 200 once the server has started (Clever's health check).GET /readyz: 200 when this instance holds the service lease and serves writes, 503 ("writes":"waiting") otherwise, withrpoMs. None needs a session or gives data. - The logs are one JSON line per event, on standard output (
clever logs):request(method, path, status, ms),lease-taken,lease-lost,backup,ship-failed,health-failed,preview-failed, and since 4.4.0 a"event":"preview"line withqueuedMs,snapMs,jobMs,storeMsandsinceWriteMs, a"event":"worker-call"line per job (the Studio's side) withputMs,postMs,getMsanddelMs, and the worker's ownworker-jobline withqueueMs(from its POST received to its run's start),fetchMs,unpackMs,childMsandputMs. The worker logs a refused job asworker-job-refusedwith its reason. -
clever logsfollows until it is stopped, even with--until: run it in the background and stop it by its process id.
-
studio-server/src/server/metrics.ts,studio-server/src/server/http.ts; the test:tests/studio-metrics.test.ts. -
STUDIO_METRICS_TOKEN; for members: Health and metrics routes. -
docs/dev/QUALIF-4.2.3-REFERENCE.md§2.
Generated publication · publication générée — current documentation · documentation courante: quest'n'click 4.5.3 r1, documentation revision · révision de la documentation b061c4ae6fbeb0be47a11ba8a442ba7e23ecb0a1.
Latest documentation · dernière documentation: https://quest-n-click.cleverapps.io/docs · https://quest-n-click.cleverapps.io/fr/docs; earlier versions · versions précédentes: each release's quest-n-click-docs-<version>.tar.gz · l'archive quest-n-click-docs-<version>.tar.gz de chaque release, https://github.com/Quest-n-Click/quest-n-click/releases
An edit made in this wiki is overwritten at the next publication · une modification faite dans ce wiki est écrasée à la publication suivante.
Edit the source · Modifier la source · Report an error · Signaler une erreur
Index (6)
Start (6)
Play (9)
Install (18)
- Requirements
- Install from the release archive
- Install from npm
- Install from the repository to work on the engine
- doctor: checking your machine
- Image toolchain
- Audio toolchain: ffmpeg, fluidsynth, Furnace, uv
- Upgrade
- Upgrade notes: 4.5
- Upgrade notes: 4.4
- Upgrade notes: 4.3
- Upgrade notes: 4.2
- Upgrade notes: 4.1
- Upgrade notes: v3
- Upgrade notes: v2 to v3
- Coming from web-scumm
- Package reference
- Install troubleshooting
Create a game (55)
- Your first game
- Layout of a created project and of the engine repository
- The working loop
- Content principles and the identity contract
- Rooms
- Geometry: placement, walk zones, masks, layers, camera
- Something is visible but unreachable
- Reactions
- Game commands
- Conditions
- Flags, variables and events: which to use
- Custom code
- Characters
- Items and inventory
- World map
- Dialogues
- Scripts and events
- Moving characters: patrols and walks
- Exits
- Chapters and objectives
- State and saves: persistent or temporary, renaming an id, migrations
- Staging: wide rooms and animations
- The stage: lights, particles, floors
- Skin and fonts
- Title and credits
- Heroes: several characters and hero choice
- Built-in minigames
- A custom minigame
- Translations
- Music in stems
- Sound effects
- Voices: per language and per hero
- Images: prompts, cutting sheets, transparency, scale
- Asset provenance
- The storyboard, source of truth
- Puzzle design
- Classic mechanics
- Review pages
- DSL reference
- Checking your game
- What the solver proves
- Solver options
- Playtests
- Remix
- Speedrun for authors
- The sealed ending
- Production template
- Example games
- Working with an AI
- Build and release a game
- Publish on GitHub Pages
- The static game on Clever Cloud
- Other static hosts
- Sub-path, cache and service worker, incomplete deploys, going back
- Testing on a phone over the LAN
Local Studio (24)
- The local Studio: overview and launch
- Edit a room
- Placement and stage
- Preview, apply, undo
- Storyboard
- Assets and cutting
- Check: validator, solver, critical path, heat, health, coverage
- Before and after captures
- Semantic diff
- Play and replay a session
- Rule explainer
- Language and objectives
- Voices and the heroes × languages matrix
- Map
- Notes
- Remix in the Studio
- Music
- The Assistant: bring your own key
- Demo mode and studio-apply
- Local and LAN security
- Studio API
- Local MCP: setting up each client
- MCP tools
- Studio troubleshooting
Team Studio (21)
- What runs where
- Concepts: revision, transaction, span, lease, preview, build
- Starting as an invited dev
- Working together day to day
- Roles and actions: the full matrix
- Invitations
- Managing members
- Write refused on the hosted Studio: stale base revision (409)
- Write refused on the hosted Studio: span locked (423)
- Recovering after a lost lease, a disconnection or a stale preview
- Comments
- Map and semantic diff
- Publishing builds
- Remote MCP
- The game in Git
- Upgrading the engine of a hosted game
- Hosted assets
- The server's command line
- Health and metrics routes
- Trying it locally with compose.yml
- Known limits
Clever Cloud (23)
- Clever Cloud: overview, cost and prerequisites
- Apps and add-ons
- Domains and TLS
- Keycloak
- Generic OIDC and GitLab
- Configuration
- First deployment
- Backups
- RPO and RTO
- Restore the Studio on a fresh installation
- Redeploys
- Upgrading the server and checking state after a migration
- Limits of going back
- Monitoring
- Security
- Rotating keys
- Recovering admin access
- Changing domain or OIDC provider
- Worker, PostgreSQL or Cellar down
- Exporting the game and leaving the installation
- Retention
- Clever Cloud troubleshooting
- Costs and teardown
Reality Bridge and connectors (16)
- The Reality Bridge: what it is
- Quick start
- Guarantees
- Install and run the Bridge
- Backup and restore
- Several tenants
- Signals and the manifest
- The Bridge's command line
- Connectors overview
- Email connector
- Telnet connector
- SSH connector
- Open Badges connector
- The connector SDK
- Security: Biscuit and signatures
- Bridge and connector troubleshooting
Contribute (25)
- Welcome
- Developer setup
- The dev loop
- Before a pull request
- Conventions
- Writing documentation
- Architecture
- Code tour
- Import boundaries
- Which tests run when
- Mutation testing
- The coverage ratchet
- The quality baseline
- CI explained
- Field passes
- Benchmarks
- Releasing
- npm packages
- Decisions and ADRs
- Governance
- Bot pull requests
- Contributing with AI agents
- Security policy
- Code of conduct
- Licences and credits