BxLens
Get started
Observability for BoxLang apps, servers and AI

Know what your apps and servers are doing, before your users tell you.

BxLens helps you find the slow page, the failing call or the AI agent that costs too much. See what any request did, watch your servers, get a message in Slack, Teams, Telegram or email when something breaks, and ask Lensy in plain words. Free for one server, in production too.

New · only in BxLens The Bytecode profiler: every expression of your code, counted and timed, as a heatmap on your own source. See it →
$install-bx-module bx-lens
3 servers · 1 behind
Disk /data at 88%
Lensy: alert on, awaiting approval
Pick your path

What do you need to do?

Two surfaces

A bar for the request. A console for the server.

Start with the bar while you build. Open the console when you run it.

The tour

Everything your app and server are doing.

Pick an area. Every one is a page in the console, with its own docs.

Every request, every section

Every request BxLens keeps has a page of its own. Open it and read the issues first: a repeated query, a slow template, a slow outgoing call, a security note. Then the sections, which load when you open them: timeline, queries, exceptions, HTTP, messages, timers, the request and its scopes, built in functions and the runtime.

  • A list you filter by status, tag, ColdBox event or server, sort and page
  • In flight shows what is running right now and the queries each request has run so far BoxLang+
  • Share a request by mail or to a channel BoxLang+, or print it as a report
  • Cost per request: processor time and memory allocated BoxLang+
Requests → In flight → Watch the walkthrough →
The page of a request
The sections of a request: queries with a repeated statement, exceptions, HTTP, messages and timersIn flight: a running request with the queries it has run so far and what it is doingThe Requests page with the ColdBox tag and the event

Executors, tasks, caches and watchers

Everything that runs next to your requests. Executors with queue use and a health note that says what to change, scheduled tasks with how each last run ended, datasource pools, caches with their hit rates, file watchers and every application the server has started.

  • Failing, slow, overlapping and paused tasks, at a glance
  • Caches and watchers are free to see; actions on them need BoxLang+
  • The web server page shows the connectors, the worker threads and the traffic
Executors → Tasks → Watchers → Watch the walkthrough →
The Executors page with health notes
The Tasks page with scheduled tasks and how their last runs endedThe Watchers page with every file watcherThe Applications page with every application the server has started

The JVM, from heap to deadlock

Heap and every memory pool, garbage collection with the cause of each run, the rate of allocation, threads by state, loaded classes and the compiler. On the Threads tab you see who blocks whom, a deadlock named with the lock each thread waits for, threads with the same stack, and snapshots to compare.

  • A "needs a look" box in plain words, so you know what to check
  • Run garbage collection on demand; heap dumps BoxLang+
  • Threads and thread dumps BoxLang+
The JVM page → System and threads →
The JVM page with the heap, the findings, the classes and the collector
Blocked thread chains under the thread that holds the lockHeap use over time

Logs, live

Every file in the BoxLang logs directory, with its size. Pick a file to read its tail, filter by level, search the text and download it, with no terminal and no ssh.

  • Live tail, with a search and a level filter BoxLang+
  • Download a file BoxLang+
  • Free reads the newest lines of every file
Logs →
The Logs page with the list of log files and a live tail

Find and fix a slow page BoxLang+

Reports lists the slowest URLs. Hot spots shows where one of them spends its time: your code, the database, outgoing calls and waits, widest first, from stack samples of the slow runs. Read the widest bar, change one thing, and check the picture again.

  • Reports: the slowest URLs by p95, and where the time of each goes
  • Hot spots on a request, on a running request and merged over the runs of a URL, on every server
  • Watch a URL for 10 minutes, an hour or a day, and the rule removes itself
  • Ask Lensy to read the picture, or share it by mail or to a channel
  • Bytecode profiler: record every expression of your code for a while and read it as a heatmap on your own source BoxLang+
Find and fix a slow page → Watch the walkthrough →
The Hot spots of a URL: the widest places, the time by kind and the slowest runs
The Hot spots of one requestThe Hot spots rules in the settingsThe Bytecode profiler: the source of a page with the time of every line

The Bytecode profiler Only in BxLens BoxLang+

Hot spots tells you which function is slow. The Bytecode profiler tells you which expression, how many times it ran and how long each run took, and paints it on your own source. Record the whole server for a few minutes by hand, or let a rule start a session when a request arrives. No other tool for BoxLang shows the time of every line of your code like this.

  • A heatmap on your real source: the time of every line, the hot expressions marked with their number of runs
  • Start by hand, or by a rule: "when this request arrives, record 10 minutes". Sessions never overlap and always end by themselves
  • Jump to it from a Hot spots row, ask Lensy to read it, or share the session by mail or to a channel
  • Off until you switch it on, and nothing is recorded outside a session
  • Needs BoxLang 1.19 or newer
The Bytecode profiler → Watch the walkthrough →
The Bytecode profiler: the source of a page with the time of every line and the hot expressions marked
A session: the files that ran and the time in your codeRules that start a session when a request arrives

ColdBox, seen from inside no setup

BxLens finds your ColdBox application and shows what every request did: the event, the route, the layout, every view and its time, and the event cache. A page in the console covers modules, schedulers, caches and executors, and an Advisor checks the application for problems.

  • Nothing to install in your app, nothing to add to your configuration
  • Findings, modules in more than one version, boards, a glossary: free
  • Run, pause and remove tasks, Find solution with Lensy: BoxLang+
ColdBox support → Watch the walkthrough →
The ColdBox page of the console with the findings of the Advisor
The ColdBox tab of the bar with the waterfall of a requestThe module resolution view with two versions of one moduleColdBox schedulers with groups, meta and the next runs

Errors, like a small Sentry

Every failure is grouped into an issue by what went wrong. Resolve it, ignore it for a while, add a note, and BxLens tells you when it comes back, with badges for new, escalating and regressed. Each issue has a stable reference, the stack, the breadcrumbs before it failed and its tags.

  • Requests, scheduled tasks, background threads and log errors are all issues
  • Share an issue by mail or to a channel BoxLang+
  • Groups merged across servers BoxLang+
  • Secrets removed before anything is shown
Errors → Reports → Watch the walkthrough →
The Errors page with issues, badges and a summary strip
The page of one issue with its events and stackBreadcrumbs: what happened before the errorThe Reports page compared with the period before

Queries and ORM SQL

The slowest statements, the longest, the counts and the failures. ORM SQL shows with the rest, and datasource pools show their numbers and a connection test.

  • Slow and repeated queries
  • Hibernate statistics (Plus)
  • Pool use and waiting threads
Queries and in flight →
The Queries page with the slowest statements
The Datasources page with pool numbersORM statistics and SQLRequests in flight right now

Outgoing HTTP, by host

Which partner is slow, which one fails, and what it costs you. A latency histogram per host, a needs attention list and history from the saved rollups.

  • Per host and endpoint totals
  • Attention rules with limits you set
  • Up to 15 days of history
HTTP →
The HTTP page with calls per host
The bar HTTP panel for one requestThe Requests page with a live listThe bar Timeline with HTTP spans

Mail you can see

Every message bx-mail builds, spools, sends or bounces. Read it as the recipient does, in a sandbox with no scripts and no remote images. See each delivery attempt and the SMTP error.

  • HTML, text, headers and attachments
  • Phone width and dark preview
  • Spool queue with retry and discard
Mail →
The Mail viewer with a message preview
The Mail overviewMail delivery and bouncesMail per server

Observe your AI

Runs, agents, tools, MCP servers, models and cost for BoxLang AI. Open a run and read the trace of every step.

  • Tokens and cost per model
  • MCP server health
  • Failed runs and rate limits flagged
AI observability →
The AI observability overview
Agents and their runsOne AI run in detailMCP calls

The machine under BoxLang

CPU, load, memory, disk and network, live, with the share that belongs to BoxLang. A container shows its limits and its throttling. Every disk volume with its size and free space, and the folders BoxLang and BxLens write to.

  • Per core CPU, memory pressure and swapping, with a needs attention list
  • Disks, network interfaces and the busiest processes, by name only
  • Volumes and folders are free
System → Web server →
The System page: the machine, CPU, load, memory, disk and network
CPU per coreDisks and their activityDisk volumes and the folders BoxLang and BxLens write to

All your servers in one table BoxLang+

Each server saves a health snapshot every minute. See heap, CPU, the fullest disk and last seen for the whole cluster, then open any server read only.

  • Fleet table on the Overview
  • Mail, ORM, queries and system per server
  • No agents, no extra service
  • Free shows one server only
Servers →
The servers table on the Overview with heap, CPU and disk per server
Alert rules and recipientsReports across serversA weekly report preview
Multi server observability · BoxLang+

One folder. Every server. No agents.

Servers write what they know to a shared store. Any console reads it. Alerts are sent once for the cluster, not once per server.

BoxLang+ feature. The Free version is one server only.

web-1live
web-2disk 88%
web-3behind
Shared storehealth, rollups, errors, reports
Any consoleread only view of every server
AI observability BoxLang+

Know what your AI agents cost, before the invoice arrives.

Every run, model call and tool call in one place, with cost per agent and model. Works with BoxLang AI, no code changes.

  • Full run trace. Open any run to see its model calls, tool calls and MCP calls, step by step.
  • Cost per agent and model. From the price table you add, in dollars per million tokens.
  • MCP server monitoring. The servers you host: requests, tool calls, failures and why callers were turned away.
  • Works with BoxLang AI. It listens to the events of BoxLang AI, so there is nothing to wire up.

AI observability is a BoxLang+ page. Free keeps three counters for the last hour: failed runs, rate limit hits and MCP errors. Cost is an estimate from the price table you add; a model with no price adds no money. Works with BoxLang AI only.

Alerts, reports and channels · BoxLang+

Hear about it before your users do.

Seventeen alerts, all off until you switch them on. They reach you by email, in Slack, Microsoft Teams or Telegram, or as a signed webhook. Admins get a daily, weekly and monthly report for the whole cluster.

Server downDeadlockHeap pressureDisk spaceError spike Failed requestsSlow siteDatasource poolExecutor saturated Task failingOutgoing HTTPMailAIMCP rate limitedMCP limiter failingSecurityLog errors
EmailSlackMicrosoft TeamsTelegramSigned webhook
  • Connect more than one gateway. Add up to twenty channels. Each one chooses its alerts, its lowest severity and the reports it gets, and every message has a link back to the console.
  • Your SMTP, not your app's. Lens sends through its own mail client, so an alert still arrives when your application or its mail module is the thing that broke.
  • One message, not twelve. One server sends for the cluster. An alert repeats while it is true and a resolved message follows.
  • Secrets stay secret. Webhook addresses, bot tokens and passwords are write only, kept encrypted, and never shown again.
  • See it before it goes out. Preview the mail of every alert and report with sample data, in light and dark, and send it to yourself as a test.
  • Reports with context. Requests, errors, slow routes, bad hosts, mail, restarts and the fullest disk, set against the period before.
Notifications → Channels → Email reports →
The Channels tab with a Slack channel, a Microsoft Teams channel, a Telegram chat and a signed webhook, and the form of one channel
The alert rules, each with a switch, a severity and its limits The mail preview of a Datasource pool alert, with the list of alerts and reports on the left
Lensy · the ops assistant in your console

Meet Lensy.
It knows your server, and asks before it acts.

Ask in plain words. Lensy reads your errors, queries, threads, mail and servers, explains what it finds and searches the BoxLang docs. When a change is needed it proposes one, shows you exactly what will happen and waits for an admin to press Approve.

Meet Lensy → Everything it can do
1Ask

"How healthy is the server?" Lensy looks at the live data and answers in plain words.

2Approve

"Turn on the disk space alert at 85 percent." An approval card shows the exact change. Nothing happens until you press Approve.

3Delegate

"Email ops@acme.example.com about capacity problems, with the daily report." Lensy sets up the recipient for you.

Reads

Errors, queries, threads, executors, datasources, caches, logs, HTTP, mail, servers and alerts.

Explains

Why a request is slow, what a stack trace means, which host keeps failing and what to try next.

Changes, with approval

Alerts, recipients, report schedules, scheduled tasks, caches and GC. Admins only, one decision at a time.

Looks things up

Searches the BoxLang docs and any MCP server you choose to switch on.

Free and BoxLang+

Free to use, in production too.

The bar, the console basics, volumes and the BIFs are free, for one server. BoxLang+ adds multi server observability and what teams need to run a fleet.

Free

  • The bar, every tab
  • ColdBox: the bar tab, findings, modules, schedulers, boards and a glossary
  • Console: requests, errors in memory, executors, tasks, datasources, caches, logs, the JVM, system and web server
  • Disk volumes and folders of this server
  • Roles, audit log, read only mode
  • All lens* BIFs and the extension API

BoxLang+ or trial

  • Saved errors, reports and rollups for 15 days
  • Multi server observability: the fleet table and the pages of every other server
  • Mail viewer and monitor
  • 21 alerts by email, Slack, Microsoft Teams, Telegram or a signed webhook, and daily, weekly and monthly reports
  • Share a request or an issue by mail or to a channel
  • Lensy: chat, tools and approved changes, and Find solution for a finding
  • ColdBox: run, pause and remove tasks, and clear CacheBox caches
  • AI observability, ORM statistics, HTTP history
  • In flight, threads, request cost, heap dump, diagnostic bundle
Compare in detail
Built to be safe in production

It watches your app without becoming a risk.

Off until you say so

Both surfaces are disabled by default and answer on loopback only. Open them up with an IP list and a password.

Roles and an audit log

A viewer role that can look but not change anything. Every change, login and approved action is in the audit log.

Redacted by default

Passwords, tokens and keys are removed before any value reaches the screen, a mail or the AI.

Light on a busy server

Collection is capped and bounded. Pick light or full, and see the overhead on the Configuration page.

Walkthroughs

Learn it step by step, with a guide.

Eleven short walkthroughs with a guide. Watch one, or all of them.

Part of the BoxLang ecosystem

Built for BoxLang, with BoxLang.

Questions

Short answers.

What is BxLens, and is it free?

BxLens is a BoxLang module with a request level debug bar and a console for your servers. It is free for a single server. Multi server, mail, alerts, reports, Lensy and AI observability need BoxLang+. Registering your server once, for free, gives a development or testing server BoxLang+ features for 7 days.

Which BoxLang versions does it support?

BoxLang 1.19 and above, on Java 21. It also works natively with ColdBox.

Does BxLens send data outside my network?

No. The console page loads no scripts, styles, fonts or data from another origin, so it works on an air gapped network. The server makes an outside call only if an admin turns on the AI help with a hosted provider.

Will it slow down my app?

It is light on a busy server. Collection is capped and bounded, and you can pick light or full collection. The Configuration page shows the overhead.

More answers in the FAQ · BoxLang+ plans

We eat our own dogfood

Built with BoxLang and BoxLang AI.

BxLens is a BoxLang module, from the BIFs you call to the assistant you talk to. We run on what we ship.

A BoxLang module

Installed with install-bx-module, configured in boxlang.json, and hooked in through BoxLang interceptors and the lens* BIFs.

Lensy runs on BoxLang AI

Every Lensy tool is an @AITool in BoxLang, served through the bx-ai module. Any provider it supports, including Ollama.

Tested in BoxLang

The end to end suite is TestBox specs driving a real browser with bx-playwright.

Documented with bxSites

These docs are built by bxSites, the BoxLang static site generator.

Consulting and support

Need BxLens in production? Talk to the people who build BoxLang.

Ortus Solutions offers professional support, architecture reviews and custom development for BoxLang applications.

consulting@ortussolutions.com
  • Priority supportAnswers from the team that builds the runtime.
  • Production reviewHave your access rules, passwords and collection level checked.
  • TrainingGet your team productive with BxLens and BoxLang.
Two minutes to your first look

Install it. Turn it on. See your app.

Install the module, enable the bar or the console in boxlang.json and open your app.