Weflayr Documentation

LLM observability for Node.js. Instrument any OpenAI client with one line and stream cost, latency, and error events to your dashboard.

Javascript Python

What is Weflayr?

Weflayr instruments your AI API calls and streams telemetry events to a central intake API. A JavaScript Proxy wraps your client transparently, no changes to your existing call sites.

What is a Flayr?

A Flayr is a metric endpoint scoped to a single environment (dev, staging, production). Each Flayr has its own isolated data silo, use one per environment for clean separation, and use tags to further slice data within an environment.

How it works

Every instrumented call fires events automatically to a Flayr:

Event When Contains
before Before the LLM call model, args, tags, middleware data
after On success elapsed_ms, token usage, tags, middleware data
error On failure elapsed_ms, error type, status code

Events are posted fire-and-forget in the background, they never block your main execution path.