Blyp Docs

Client

The blyp-js/client entry gives you two major capabilities:

  • browser logging with optional remote sync
  • browser-safe error parsing with parseError()

For Expo apps, use the dedicated blyp-js/expo logger instead of blyp-js/client.

createClientLogger()

import { createClientLogger } from "blyp-js/client";

const logger = createClientLogger({
  endpoint: "/inngest",
  credentials: "same-origin",
  metadata: () => ({
    app: "dashboard",
    release: "2026.03.10",
  }),
});

logger.info("hydrated", { route: window.location.pathname });
logger.error(new Error("button failed to render"));
logger.child({ feature: "checkout" }).warn("client validation failed");

Defaults

OptionDefault
endpoint/inngest
credentials"same-origin"
localConsoletrue
remoteSynctrue

If you do not set custom headers, the client logger can fall back to navigator.sendBeacon() when fetch(..., { keepalive: true }) fails.

Event shape

Client events are normalized into a ClientLogEvent shape:

type ClientLogEvent = {
  type: "client_log";
  source: "client";
  id: string;
  level: "debug" | "info" | "warning" | "error" | "critical" | "success" | "table";
  message: string;
  data?: unknown;
  bindings?: Record<string, unknown>;
  clientTimestamp: string;
  page: ClientLogPageContext;
  browser: ClientLogBrowserContext;
  session: { pageId: string; sessionId: string };
  metadata?: Record<string, unknown>;
};

Browser error parsing

import { parseError } from "blyp-js/client";

const response = await fetch("/api/payments", { method: "POST" });

if (!response.ok) {
  throw await parseError(response);
}

Pairing with server adapters

Most server-side adapters automatically register or expose a handler for the configured client ingestion path:

  • programmatic server adapters auto-register POST /inngest
  • file-based integrations expose a handler helper you mount yourself
  • ingested events are tagged as type: "client_log" and source: "client"

See the individual pages under Integrations for exact mounting patterns.

Expo mobile logging

Expo has its own logger because it does not run in a browser environment and cannot rely on same-origin delivery.

import { createExpoLogger } from "blyp-js/expo";

const logger = createExpoLogger({
  endpoint: "https://api.example.com/inngest",
  metadata: () => ({
    app: "mobile",
  }),
});

Use Expo for the full mobile setup and its delivery constraints.

On this page

No Headings