Features
On this page
Features
BxLens has two parts. The bar is a snapshot of one request, shown to developers on the page itself. The console is a password protected page for one running server. Alerts, reports and a read only view of servers that share a store folder are BoxLang+.
Free means no BoxLang+ subscription is needed. Plus means a BoxLang+ license or trial. The split is the current state and may change, see Licensing.
Jump to: What can I do with it? | Debug bar | Console | Lensy | Alerts and reports | Many servers | Integrations | BIFs | Safe by default
What can I do with it?
One row per job. Find the job, then follow the link for the detail.
| I want to... | Where | Free | Plus adds |
|---|---|---|---|
| See what one request did, step by step | Bar: Timeline | Full waterfall of templates, queries, HTTP and transactions | Request cost (CPU and memory) |
| Find slow queries and N+1 problems | Bar: Queries, Console: Queries | Every statement of a request, the 10 heaviest across requests | Every statement across requests |
Errors as issues you can work: resolve, ignore, regress by themselves, notes, breadcrumbs, tags, from requests, tasks, threads, logs and lensException | Console: Errors | In memory, 24 hour trend | Saved to disk, 7 and 30 day trends, all servers, Share and Ask Lensy |
| Watch traffic and slow pages | Console: Overview, Requests, Reports | Last 25 requests, 60 minutes of totals | Longer history, saved, more requests |
| See what is running right now | Console: In flight | Live stack of every running request | |
| Find where a slow page spends its time | Console: Hot spots | Where the time went, for a request and for a URL | |
| Watch the outgoing HTTP calls | Console: HTTP | Last hour, by host and endpoint | 24 hours to 15 days, the call list |
| Check the JVM: heap, GC, threads, deadlocks | Console: JVM, System | Memory, GC, flags, deadlock detection | Thread dumps, heap dumps |
| See pools, tasks, caches, applications, watchers | Console: Runtime pages | View everything | Run, pause, evict, restart and the other actions |
| Look at the web server under BoxLang | Console: Web server | Listeners, workers, requests | |
| Debug a ColdBox app | Bar: ColdBox, Console: ColdBox | Events, views, routes, modules, findings | Cache evict, reap, clear |
| Watch the mail your app sends | Console: Mail | Three counters, last ten messages | Preview, servers, spool and queue |
| Watch ORM queries | Bar: ORM | ORM SQL in Queries | Event totals and Hibernate statistics |
| See what your AI agents and MCP servers do | Console: AI observability | Four counters, last hour | Runs, traces, cost, rate limits |
| Ask about the server in plain words | Ask Lens, Lensy | Copy a redacted prompt, open ChatGPT or Claude | The assistant, with tools and approved actions |
| Get an email or chat message when something breaks | Notifications | 21 alert rules, SMTP, Slack, Teams, Telegram, webhook | |
| Get a daily, weekly or monthly report | Email reports | Reports from the saved data of every server | |
| Watch more than one server | Overview, Servers | This server in full | The fleet, the server selector, other servers' pages |
| Change settings without a restart | Settings | Read every value | Change and reset in the console |
| Add my own data to the bar | BIFs, Extending | Messages, timers, tags, panels | Data BIFs for dashboards |
| Keep it locked down | Security, Hardening | Roles, read only mode, audit log, access rules | Viewer login |
The debug bar
The bar is off by default and only shows to allowed callers (loopback by default). It says what happened in this request and nothing more. Analysis lives in the console.
| Feature | What it does | Tier |
|---|---|---|
| Strip | Status, total time, query count and time, exception count, request id, a Console button, theme toggle. Red only for a 5xx or an uncaught exception | Free |
| Timeline | A waterfall of templates, functions (opt in), queries, HTTP calls and transactions, nested the way they ran. Zoom, pan, filter, search with /, click a span for detail and an open in editor link | Free |
| Interrupted spans | A span whose closing event never fired ends at the exception (or last activity) and is marked interrupted | Free |
| Queries | Every statement with SQL, rows, time, datasource and the line that ran it. Bound values only when includeParams is on. ORM statements carry an ORM label | Free |
| Exceptions | Caught and uncaught, with BoxLang location and the Java stack. The panel can open itself on a caught exception | Free |
| HTTP | Outgoing HTTP calls with status, size and time | Free |
| Messages and Timers | What your code sends with lensMessage(), lensDump(), lensMeasure(), lensStart() and lensStop() | Free |
| Request | Request and response headers, status and the request cost | Free, cost is Plus |
| Request cost | CPU time and memory allocated by the request thread | Plus |
| Scopes | Redacted copy of url and form (others opt in). Off by default because it costs time | Free |
| BIFs | Calls, total, average and slowest time and errors per built in function. Off by default | Free |
| ColdBox | The route, event, handler, layout and view, which views rendered more than once, the time of each event, view and layout, and whether the event cache hit. Names of rc and prc keys, never values. Buttons to clear the event and view caches and to reinit. Nothing to install in the application. See ColdBox | Free |
| Tags | lensTag(), lensFramework() and data.lens.tag() mark requests (ColdBox is tagged by itself). The Requests page shows and filters by tag | Free |
| Runtime | BoxLang and Java versions, OS, uptime, heap, server and app name, cache names, and the main boxlang.json settings. Secrets hidden | Free |
| Your panels | Applications and modules add panels with lensPanel() or the onLensCollect interception point | Free |
| Bar designer | Show, hide and reorder the bar tabs from the console | Look Free, save Plus |
| Request id | Every tracked request gets a short id, sent as X-BxLens-Id, shown in the bar and the console, and set as request.bxlens.id and lensRequestId() | Free |
How the bar stays light: the page gets a block of about 1 KB. The CSS, JavaScript and icons are separate files, hashed and cached by the browser. The bar data is built only when the page renders for an allowed caller.
The console
One page at /~bxlens/index.bxm, with its own password, an optional second viewer password, lockout after failed logins, CSRF tokens and a content security policy that allows no script or style from another origin. It makes no request to any other site. On Free and trial the server registers once, for free, before the first sign in, see Register.
Inspect
| Page | What it does | Tier |
|---|---|---|
| Overview | State of the fleet, requests, errors, p95 and what needs attention. See Many servers | Free |
| Requests | Every request in memory, including JSON and SSE. Click one for its timeline, issues (N+1, slow query, slow template, failed HTTP, security notes), headers and cost. Copy as JSON or cURL | Free, last 25 kept. Plus keeps the configured size |
| In flight | Requests running now, longest first, with a live stack of what each one is doing | Plus |
| Hot spots | Where the time of a slow request or a URL went: your code, the database, calls and waits | Plus |
| Bytecode profiler | Every expression of your code counted and timed for a session, as a heatmap on the source (BoxLang 1.19 or newer) | Plus |
| Errors | Issues grouped by cause with a status, a trend, the stack, breadcrumbs and tags of each event, notes and bulk actions. Redacted prompt copy for an AI chat | Free in memory, saved to disk with Plus |
| Reports | Totals, error rate, p95 and p99, status codes, busiest and slowest URLs, a minute series | Free for 60 minutes, longer and saved with Plus |
| Queries | Statements ranked by slowest, total time, count and failures, across every request | Free shows the 10 heaviest, Plus every statement |
| HTTP | Outgoing calls by host and endpoint with error rate, p50, p95 and p99, and a needs attention list for slow hosts and call loops. See HTTP | Free for the last hour, Plus for longer ranges and the list of calls |
| Ask Lens | Ask about this server in plain words. Copy prompt, Ask ChatGPT and Ask Claude buttons are free. With BoxLang+ it is the full page of Lensy | Free copy, Plus assistant |
Runtime
| Page | What it does | Tier |
|---|---|---|
| Executors | Pool, thread and queue use against thresholds, a 60 second chart, health notes, and the tasks bound to each scheduler executor | Free |
| Tasks | Scheduled tasks with status, schedule, next and last run, runs and failures. Run now, pause, resume, reload | View Free, actions Plus |
| Datasources | Pool size, active and idle connections, waits and timeouts. Test connection | Free |
| Applications | Every application the runtime has started: sessions, tasks, watchers and class loaders of each. Restart, remove an expired entry | View Free, actions Plus |
| Watchers | Every file watcher with its owner, state, paths and settings. Start, stop, restart | View Free, actions Plus |
| Caches | Hit rate and counts per cache, a capped key list. Read a value, evict, reap, clear | Statistics Free, actions Plus |
| Logs | Every file in the logs directory. Last 200 lines and a level filter on Free. Search, up to 2000 lines, live tail and download with Plus | Free (admin), search, tail and download Plus |
| Modules | Loaded modules, versions and settings, plus the Integrations section with a switch per integration | Free |
| Environment | The effective configuration, JVM arguments, variables and properties, secrets hidden. Diagnostic bundle | Free (admin), bundle Plus |
| Configuration | The effective BoxLang settings by area with the value and its source (default, boxlang.json or environment variable), and a filter box | Free |
| System | CPU, heap, memory pools, disks and runtime details. Run GC. Deadlock detection. Heap dump. See System | Free, heap dump Plus and off until console.allowHeapDump |
| JVM | Heap and memory pools, garbage collection with causes and pauses, classes and JIT, and JVM flags with plain suggestions. See JVM | Free |
| Threads | Every thread with state, CPU and stack. BoxLang frames highlighted. Copy or download a thread dump | Plus (admin) |
| Web server | The server under BoxLang (MiniServer, CommandBox or a servlet container): listeners, workers, requests and what needs a look. See Web server | Free |
| ColdBox | Overview, findings from the Advisor, composition (routes, handlers, interceptors), modules (timeline, tree, table, and a Resolution view that finds the same module in more than one version), CacheBox caches, schedulers and executors. See ColdBox page | Free (cache evict, reap and clear, task run, pause, resume and remove: Plus) |
| ORM | Opt in integration with bx-orm. Event totals, flushes, failures and Hibernate statistics, with a switch to turn statistics on | Page is Plus, the ORM SQL in Queries is Free |
| Messages sent through bx-mail with a locked preview, delivery steps, servers, the spool and its bounces | Counters and ten messages Free, viewer and queue Plus | |
| AI observability | Agents, runs and their traces, models, tokens, estimated cost, MCP servers and their rate limits. See AI observability | Four counters Free, the rest Plus |
Config
| Page | What it does | Tier |
|---|---|---|
| Bar designer | Choose and order the bar tabs | Save Plus |
| AI | Status, requirements, live settings and a connection test for Lensy. The key is write only: set in the console (kept sealed, never shown again), a bxsecret: value or an environment variable name | View Free, change Plus |
| Settings | Change thresholds, collectors, interface and limits live, with a reset, saved to a small overrides file. Access rules, console.* and store.* stay in boxlang.json. Tabs for Security (console passwords and write only secrets), Storage (the store, read only) and Notifications | Read Free, change Plus (Notifications Plus) |
| Upgrade | What Free has, what BoxLang+ adds, and how to get it. See Upgrade | Free |
| Register | Register the server once, for free, to use the console. See Register | Free |
Roles and control
- Admin and viewer roles (the viewer login is BoxLang+). A viewer sees overview, requests, in flight, queries, errors, reports, HTTP, executors, tasks, datasources, applications, watchers, cache statistics and modules. Logs, thread stacks, environment, system details, notifications, security and a few sensitive setting values are admin only. See Roles.
- Read only mode refuses every change from the console.
- Audit log (
bxlens-audit.log) records every change, download and denied attempt. No secrets. - Access rules per surface: loopback, an IP list, allowed hosts (DNS rebinding guard), a required header, and proxy header trust only from trusted peers.
Lensy, the Box Agent
A chat in a drawer on every console page (and the full page of Ask Lens) that answers by calling tools. BoxLang+.
| It can look at | It can do, after you click Approve |
|---|---|
| Overview, requests, errors, queries, executors (with concrete pool recommendations), threads, blocked threads and deadlocks, garbage collection pressure, datasources, logs, database metadata, ColdBox, alerts and notifications | Run, pause or resume tasks, cache actions, Run GC, integration switches, a live setting, alert rules and recipients, ColdBox cache and reinit actions |
A diagnose health sweep, and a search of these docs |
The default model is Ollama on this machine. Admins can also let it ask MCP servers, such as the Ortus documentation, which are all off until turned on. See the AI page, the tool list and the threat model.
Alerts and reports
BoxLang+. Admin only. Set up in the console under Settings, Notifications. See Notifications.
| What | Detail |
|---|---|
| 21 alert rules | Server down, deadlock, heap pressure, disk space, error spike, failed requests, slow site, datasource pool, executor saturated, task failing, outgoing HTTP, mail, AI, MCP rate limited, MCP rate limiter failing, security, errors in the logs. Defaults and what to check first: Alert runbook |
| Your own SMTP server, recipients per person, firing, reminder and resolved messages, grouped per person. The SMTP password is write only | |
| Channels | Slack, Microsoft Teams, Telegram and a signed webhook. Guides: Slack, Teams, Telegram, webhook |
| Reports | A daily, weekly or monthly report of how the whole cluster did, built from the saved data of every server. See Email reports |
| Previews | See any mail with sample data, and send a test to one address |
| Lensy | Lensy can read the rules and, with your approval, change them |
Many servers
BoxLang+. Free shows one server only, and counts the other servers it finds in the store folder without reading them.
| What | Detail |
|---|---|
| Fleet on the Overview | Each server is healthy, degraded, critical, silent or gone, as a table or cards, with groups and versions. See Overview |
| Trends | A line for requests, average time, errors, CPU and heap on every server, for the last 15 minutes, hour, 6 hours or 24 hours, with a Live switch. See Overview |
| Totals and slowest | Slowest requests, SQL, HTTP calls, MCP servers and AI agents across the fleet |
| Server selector | Switch the console between this server, another server and all servers. See Servers |
| Pages of another server | Read only: HTTP, Reports, Errors, AI, Mail, System and more |
| Setup | One shared store folder and one shared secrets folder. See Multi server |
Server identity
Every record says which machine produced it, so the data of many servers can end up in one place and still be told apart. This is built in and free. It is a name and an address, never a lookup while a request runs.
| What | Where the identity appears |
|---|---|
| A request | The serverHost, serverIp and serverId of the summary and the detail, the Request tab of the bar, the console request detail, the Requests table (a Server column shows when the history holds more than one server id), the JSON and cURL exports |
| Errors | The group and every sample, and a top level server on the list |
| Reports and queries | A top level server on the totals and on the query statistics, and the server id of each statement |
| In flight | Each running request |
| Audit log | Every line has server=<id> |
| Disk store | errors.json and reports.json have a top level server, every error group and sample has its own serverId |
| BIFs | lensServer(), and the server key of lensReport() and lensDiagnostics(). The rows of lensErrors(), lensQueries() and lensInflight() carry serverId |
| Response header | X-BxLens-Server, only next to X-BxLens-Id and only with history.serverHeader |
| Console | The host name and address in the header and on the Overview |
The identity is detected once at start and looked at again every five minutes. Set server.name, server.address and server.id (or the environment variables BXLENS_SERVER_NAME, BXLENS_SERVER_ADDRESS and BXLENS_SERVER_ID) behind containers or NAT. See server.
The identity also carries the group (server.group), the kind of place the server runs in (a host, Docker, Kubernetes, AWS Lambda and so on, with an icon), and the BoxLang, Java and BxLens versions. lensServer() returns them as group, kind, kindLabel, icon, ephemeral, kindDetail, boxlang, java and bxlens, and the Overview of a fleet uses them.
Integrations
An integration reads another module's events. It is off by default, and it is only offered when that module is installed. Until both are true Lens registers no listener.
| Integration | Needs | What you get |
|---|---|---|
bx-mail with the onMail events, collectors.mail.enabled | The Mail page | |
| ORM | bx-orm 1.7.2 or later, collectors.orm.enabled | ORM SQL in the bar and console queries with an ORM label, flush counts, failed statements, startup DDL, and (Plus) the statistics page |
| AI | bx-ai, collectors.aiobs.enabled | The AI observability page: agents, runs, models, cost, MCP servers and their rate limits. Four counters are free |
| ColdBox | A ColdBox application, nothing to install. On by default, collectors.coldbox.enabled | The bar tab, the console page and the Advisor findings |
BIFs for your code
The tracking BIFs do nothing when the request is not tracked. See the BIF guide.
| For | BIFs |
|---|---|
| Messages and timers | lensMessage(), lensDump(), lensMeasure(), lensAddMeasure(), lensStart(), lensStop() |
| Marking requests | lensTag(), lensFramework(), lensRequestId() |
| Exceptions and panels | lensException(), lensPanel() |
| Switching the bar | lensEnable(), lensDisable(), lensIsEnabled(), lensRender() |
| Tools and dashboards | lensReport(), lensErrors(), lensQueries(), lensInflight() (Plus, they return nothing on Free), lensLicense(), lensDiagnostics(), lensServer() |
Safe by default
| Setting | Default | Why |
|---|---|---|
bar.enabled, console.enabled | off | Nothing runs until you ask |
bar.access, console.access | local | Loopback only |
collect.level | light | No bound values, scopes, request headers, caller lookups or stack frames beyond what is cheap |
collectors.queries.includeParams | off | Values can be personal data |
collectors.functions, bifs, logs, scopes, orm | off | They cost time or copy data |
console.allowHeapDump | off | A dump holds every secret in memory |
ai.enabled | off | When on, prompts and what the assistant reads leave the server (a local model keeps them in your network) |
- Redaction happens before storing. Statement text is stored with literals masked, never parameter values.
- Every in-memory store has a hard cap and drops the oldest entry.
- A tracked request that never finishes is closed after
request.maxMinutes(10) and kept as unfinished. - Heavy aggregation (query statistics, error groups, reports, history, audit) runs on one bounded background worker. When its queue is full new work is dropped and counted, and a request never waits.
Speed
Measured on /index.bxm with the MiniServer and 8 clients (requests per second): installed with bar and console off about 2770, console on at light about 2190, bar shown about 1650. The full table is in Performance.
What it does not do
- Capture bound query values by default.
- Add a request id to outgoing HTTP calls.
collectors.http.propagateIdis reserved: core gives Lens a read only HTTP request, so it cannot add a header yet. - Record request timeouts or client disconnects. Core does not announce them, so only the unfinished request sweep covers those.