AbsoluteJS

Observability

@absolutejs/observabilityv0.6.1betaObservability

Managed AbsoluteJS observability: correlated errors, Replay, vitals, traces, and user-authorized Support Mode through a credential-safe Elysia relay.

#Installation

BASH
bun add @absolutejs/observability

#Capabilities

Overview

Managed browser observability for AbsoluteJS applications. It composes @absolutejs/beacon, @absolutejs/replay, and @absolutejs/diagnostics, correlates every captured issue with its privacy-masked session tail, and sends both through a same-origin Elysia relay. The relay also composes @absolutejs/errors/elysia: thrown server exceptions, sanitized handled 5xx responses, and unexplained returned 5xx responses enter the same project-fenced issue history with a safe trace id. Its dormant Support Mode lets a user explicitly record, review, and send a privacy-audited support bundle without exposing the project write credential.

Browser and server correlation

The browser receives only its non-secret project id. The relay reads the project-scoped destination and write credential from the server environment. Server error messages, stacks, tags, and context are redacted against secret-shaped environment values before leaving the workload, then redacted again by the control plane before persistence.

Quick start

Place the framework-neutral element anywhere in the application:

Mount the relay before application routes. Its manifest declares the server-boundary placement, so the hosted AbsoluteJS.ai platform does this automatically and the error hook observes every generated handler.

Support Mode

Applications can use the UI or the headless controller:

The support-session id joins the redacted HAR and console timeline to Replay, Beacon issues, release/environment metadata, and request-level trace ids. Replay is flushed before the bundle is forwarded. The same-origin relay re-creates and re-audits the bundle before authenticating it to the project boundary.

Agent handoff contradictions

captureHandoffContradiction() promotes a contradictory @absolutejs/handoff summary into the same Issues pipeline at warning severity. It ignores non-contradictory summaries and excludes evidence messages, references, external ids, and raw payloads.

Server configuration

Required server environment:

ABSOLUTE_OBSERVABILITY_ENDPOINT

ABSOLUTE_OBSERVABILITY_TOKEN

Show 2 more

ABSOLUTE_PROJECT_ID

Inputs are masked by default. Add class="rr-block" to elements that must never be recorded.

Outcomes

What you can build

Join browser and server evidence

Correlate browser issues with privacy-masked replay tails and capture thrown, handled, and otherwise unexplained server 5xx responses in one project-fenced history.

Observe agent contradictions

Promote contradictory agent handoff summaries into the same issue pipeline without copying evidence messages, references, external identifiers, or raw payloads.

Hardening checklist

Production guidance

Preserve privacy by defaultKeep write credentials server-side, mask sensitive browser inputs, redact secret-shaped server context before egress, and mount the relay early enough to observe generated handlers.

Follow in order

Troubleshooting path

1
Issues or replays are missing
Check that the relay is mounted before application routes and that endpoint, token, and project environment variables are present. Then verify same-origin delivery and project fencing.

#Quick start

Partial snippet

Working example for Quick start.

TS
import {
  connectManagedSupportReport,
  createManagedObservability,
} from "@absolutejs/observability";

const observability = createManagedObservability({
  project: "6756f6d7-8e09-4ef9-b445-ed07092748ac",
});

// Optional native UI; the recorder remains dormant until the user clicks Start.
connectManagedSupportReport(observability);

#Quick start 2

Partial snippet

Place the framework-neutral element anywhere in the application:

HTML
<absolute-support-report></absolute-support-report>

#Support Mode

Partial snippet

Applications can use the UI or the headless controller:

TS
observability.support?.start("Apple Pay did not complete");
observability.support?.mark("wallet sheet opened");
observability.support?.mark("payment failed");
const bundle = await observability.support?.stop();
await observability.support?.send();

#Public entry points

Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.

Public package entry point declared in package.json.

@absolutejs/observability@absolutejs/observability/elysia@absolutejs/observability/manifest@absolutejs/observability/manifest.json

#Package commands

Scripts declared by this project’s package manifest.

bun run buildrm -rf dist && bun build src/index.ts --outdir dist --root ./src --sourcemap --target=browser --external @absolutejs/beacon --external '@absolutejs/beacon/*' --external @absolutejs/diagnostics --external '@absolutejs/diagnostics/*' --external @absolutejs/replay --external '@absolutejs/replay/*' && bun build src/elysia.ts src/manifest.ts --outdir dist --root ./src --sourcemap --target=bun --external @absolutejs/beacon --external @absolutejs/diagnostics --external '@absolutejs/diagnostics/*' --external @absolutejs/errors --external @absolutejs/handoff --external @absolutejs/manifest --external @absolutejs/replay --external @sinclair/typebox --external elysia && tsc --project tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run typecheck && bun run build && bun run test && absolute-changelog check
bun run formatprettier --write "./**/*.{ts,json,md}"
bun run testbun test
bun run typechecktsc --noEmit