Monitor a Replit app

Keep an eye on the app Replit Agent built for you after you deploy it: see failing requests, errors and slow spots, replays of visits, and hand the evidence to your coding agent.

Where this stands: we haven't tested this setup end to end inside Replit yet. The steps use Heystack's standard setups for the kinds of app Replit builds. Where Replit may get in the way, this page says so.

Which kind of Replit app do you have?

Replit Agent builds apps in many languages. Heystack's setup depends on how yours runs. Not sure? Ask the Agent: "What language and framework does this app use, and does it have a browser front end?"

Your appHeystack setupWhat you see today
A Node.js server (Express, Fastify, NestJS or plain Node)Node.jsEach request your server handles step by step, failing requests and server errors
A browser front end (for example React built with Vite)Session ReplayErrors visitors hit, optional session replay, visits and bug reports
A Next.js appNext.jsBoth of the above
A Python appThe standard open-source tools, described in AI frameworksRequests and, for some AI libraries, AI calls. There is no Heystack package for Python, and some of this isn't confirmed against a live app yet

Most full-stack Replit apps have a server and a browser front end. Set up both.

Set it up

  1. Create an app and your keys. Sign in at console.heystack.dev and create an app (during early access, new accounts join a waitlist first). Your app's Connect page shows a server key (sk_live_…). If your app has a browser front end, also open Settings › App › Connection & keys, choose New browser key and copy it (hs_web_…). Each key is shown once.

  2. Add the keys as Replit Secrets. In your Repl's Secrets, add HEYSTACK_API_KEY with the server key. For a Vite front end, add VITE_HEYSTACK_WEB_KEY with the browser key (for Next.js, NEXT_PUBLIC_HEYSTACK_WEB_KEY). The browser key is made to be public and can only send data to Heystack. The server key is private: it must never reach the browser.

  3. Ask Replit Agent to add Heystack. Paste this into the Agent chat:

    Add Heystack monitoring to this app.
    Follow https://heystack.dev/heystack-setup.md and use the section that matches how this app runs, with the service name "my-replit-app".
    - Server code reads the Heystack server key (sk_live_...) from the HEYSTACK_API_KEY secret. Never send it to the browser.
    - If the app has a browser front end, also follow the "Browser / web frontend" section and read the public browser key (hs_web_...) from VITE_HEYSTACK_WEB_KEY (NEXT_PUBLIC_HEYSTACK_WEB_KEY for Next.js).
    - For a Node.js server, Heystack must start before the rest of the server code loads.
    

    If the Agent can't open the link, open heystack-setup.md yourself and paste the matching section into the chat.

  4. Turn on session replay (optional, browser front ends only). In the console, open Settings › App › Data & privacy, turn on session replay and pick a sample rate. Nothing is recorded until you do. Errors are collected either way.

  5. Deploy and check. Deploy your app and use it for a minute. Your app's Connect page in the console says First signal received when data arrives, usually within a minute. If the running app works but nothing arrives, check that your deployment has the same secrets as the workspace.

Good to know

  • AI costs. AI calls made with the Vercel AI SDK from a Node.js or Next.js server appear in AI & Safety once its telemetry option is on. For Python, the OpenAI library and a few others are expected to work but aren't confirmed yet. See Find out why your AI app is slow or expensive. AI calls made from the browser don't appear there.
  • No database view. Heystack sees the requests and errors in your app, not the contents of your Replit database.
  • Keep testing separate. If you don't want test runs mixed in with real traffic, create a second Heystack app for testing and use its keys while you build.