Install the BRUM Agent
BRUM ships as an npm package. A developer installs it and changes one file — the application's entry file — and every page of the app is monitored from then on. React and Vue are supported today.
This is a code change to your own web app, done once. Nothing else in the application changes, and there's no per-page work. The next visitor after you deploy produces data.
Step 1 — Install the package
npm install @codifinary/codexray-brum-agent
The package is published to GitHub Packages, so your project needs a one-line .npmrc entry pointing the @codifinary scope at that registry:
@codifinary:registry=https://npm.pkg.github.com
Your dev team sets this up once for the project.
Step 2 — Register the agent in your entry file
Import the agent and register it before the app mounts. The only file that changes is your app's entry file:
- React —
src/index.tsxorsrc/main.tsx - Vue —
src/main.jsorsrc/main.ts
React
// src/index.tsx — the only file that changes
import ClientMonitor from "@codifinary/codexray-brum-agent";
ClientMonitor.register({
service: "Checkout UI", // the name shown in the Applications list
serviceVersion: "1.2.1", // your app's version
collector: "https://<codexray-host>/ingest", // where reports are sent
pagePath: "index.html",
XAPIKey: "<project API key>", // from the CodeXray project settings
enableSPA: true, // also report in-app route changes
useFmp: true,
});
Vue
The extra vue option also captures Vue component errors:
// src/main.js — the only file that changes
import { createApp } from "vue";
import App from "./App.vue";
import ClientMonitor from "@codifinary/codexray-brum-agent";
const app = createApp(App);
ClientMonitor.register({
service: "Storefront UI",
serviceVersion: "2.0.0",
collector: "https://<codexray-host>/ingest",
pagePath: "index.html",
XAPIKey: "<project API key>",
enableSPA: true,
vue: app,
});
app.mount("#app");
Configuration options
| Option | What it sets |
|---|---|
service | The application name shown in the Applications list. Change it and the app shows up as a new, separate application. |
serviceVersion | Your app's version — reported on the error detail screen. |
collector | Your CodeXray ingest endpoint (from your onboarding / project settings). |
pagePath | The page path label, typically index.html. |
XAPIKey | Your project API key, from the CodeXray project settings. |
enableSPA | true also reports in-app route changes (single-page-app navigation). |
useFmp | true captures first-meaningful-paint timing (React). |
vue | Pass your Vue app instance to also capture Vue component errors (Vue only). |
collector and XAPIKeyThe collector is your CodeXray ingest endpoint and the API key comes from your CodeXray project settings. Ask your team if you're unsure which values to use.
Step 3 — Rebuild and deploy
Rebuild and deploy your app as usual. Nothing else in the application changes.
Step 4 — Check it in CodeXray
Open EUM → BRUM. Your application appears in the Applications list under the exact service name from the snippet, usually within about a minute of real traffic.
service saysThe name in the Applications list is exactly the service value you configured. If a developer changes it, the app appears as a new, separate application — and serviceVersion is what the error detail screen reports as the version.
Next steps
- BRUM Overview — what BRUM measures, key terms, and how the time range works
- Applications & Overview — find your app and read its health at a glance
- Errors, Logs & Traces — trace a single failing page load back to what the user did