From 9052d436d5373e213be7c1237bbfadd9f47420ea Mon Sep 17 00:00:00 2001 From: Sagnik Ghosh Date: Tue, 18 Aug 2026 01:59:54 +0530 Subject: [PATCH] docs: clarify instrument.cjs is created in the user's own app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The getting-started flow has readers clone this repo to run the ingester, then create instrument.cjs — without saying the file belongs in their own application's codebase. Make the placement explicit in GETTING-STARTED and the README quickstart, including monorepo guidance. Generated-By: PostHog Desktop Task-Id: 6977aa7a-30ea-49a4-820b-c549b1e696ab --- README.md | 3 ++- docs/GETTING-STARTED.md | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 243d835..879f333 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,8 @@ captureException(err, { operation: "start-checkout" }); trackEvent("clicked_upgrade"); ``` -**Backend** — one preloaded file, requests traced automatically: +**Backend** — one preloaded file, created in your own app next to its entry +point, requests traced automatically: ```js // instrument.cjs — run with: node --require ./instrument.cjs server.js diff --git a/docs/GETTING-STARTED.md b/docs/GETTING-STARTED.md index e518e5c..f9a5d24 100644 --- a/docs/GETTING-STARTED.md +++ b/docs/GETTING-STARTED.md @@ -81,7 +81,10 @@ Full config reference: [`packages/otlp-ingester`](../packages/otlp-ingester). npm install @autter/runtime-node ``` -Create `instrument.cjs` — it must load **before** your app: +In **your application's repository** — a separate codebase from the +`autter-runtime` repo you cloned in step 2 — create `instrument.cjs` next to +the entry point of the service you are instrumenting (one file per service in +a monorepo). It must load **before** your app: ```js const { initAutterServer } = require("@autter/runtime-node");