Errors and Reports
On this page
- Errors
- The summary strip
- The list
- Where issues come from
- The reference of an issue
- How errors are grouped
- Settings for errors
- A link to every issue
- When errors come in a flood
- The issue page
- Resolve, ignore and notes
- Share and Ask Lensy (BoxLang+)
- What is kept
- In the reports and the alerts
- The API
- Reports
- Ranges and what they cover
- What it shows
- The page of one URL
- Report, Share and Export
- Export
- Free and BoxLang+
- Boards
- Percentiles
- Memory and history
- The API
- The disk store
Errors and Reports
Both pages work across all requests that Lens tracks. With the console on, that is every request. Without BoxLang+ or a trial they are kept in memory only and a restart clears them. With one of those, Lens saves them to disk. See Licensing.
Errors
The Errors page is a small Sentry. It groups failures by cause into issues, so a thousand failures of one bug are one row, and you work the issues: resolve them, ignore the noise, and watch the ones that come back.

The summary strip
Above the list, a strip answers two questions before you read a row.
- Open issues is how many issues are unresolved or regressed, as one bar. Each open issue is in one part only, the first that fits: regressed, escalating, new (first seen in the last 24 hours) or other, so the parts add up to the number. Press a part, with the mouse or with Tab and Enter, to list only those issues below. Press it again to list all open issues. The Regressed part and the Regressed chip are the same list, and pressing a status chip clears the part.
- Events, last 24 hours is the total, how it changed against the 24 hours before (up, down, or the same), and one bar for each of the 24 hours, the newest on the right. The bar of the current hour is red when it has at least 5 events and twice the average of the 23 hours before it.
The strip counts the issues that pass the Source, Server, Tag and search filters, so it agrees with the chips. It does not change with the status chip or the part. On BoxLang+ with a server picked (or All servers) it adds up the saved issues of those servers, like the list. Without the disk store the hours are kept in memory, so a restart clears them. The strip is read only and works when the console is read only.
The list
Each row is an issue: its type, message and the line that failed (the culprit), a badge, where it came from (request, task, thread, log or manual), a bar chart of the last 24 hours, the events, when it was last and first seen, the servers it happened on and its status. The server filters, sorts and pages the whole list, so "Most events" is the most of everything kept and not of the page you see.
- Status chips (Unresolved, Regressed, Resolved, Ignored, All) with their counts. Unresolved includes the regressed ones.
- Source, Server (with several servers), Tag and Sort (Last seen, First seen, Most events, Trending over 24 hours). The search looks at the type, the message and the file.
- Select rows to resolve, ignore or reopen many at once (admin).
| Badge | Meaning |
|---|---|
| New | First seen in the last 24 hours. |
| Escalating | At least 10 events in the last 4 hours, and at least 3 times the pace of the 20 hours before. |
| Regressed | You resolved it and it happened again. It is reopened by itself. |
A resolved or ignored issue shows no badge.
Where issues come from
| Source | What is filed | Setting |
|---|---|---|
| request | Every exception a tracked request collected, uncaught or caught and reported to Lens. A response with status 500 or higher and no exception is filed as an HTTP 500 issue. | collectors.errors.enabled |
| task | A scheduled task that failed, with the scheduler and the task name. | collectors.errors.tasks |
| thread | A background thread (thread component) that ended with an error, from the line BoxLang writes to its logs. | collectors.errors.threads |
| log | Every ERROR line of the BoxLang logs, grouped by logger and message with numbers and ids removed. The second line of a failure (the exception and stack) is skipped. | collectors.errors.logs |
| manual | lensException( e, { plan: "pro" } ). See the BIFs. | collectors.errors.enabled |
The log tail reads only new lines, at most 200 a poll, and starts at the end of each file when Lens starts.
The reference of an issue
Every issue has a reference you can say, paste and search: BX-1013F899. It shows on the row, on the issue page (press it to copy), in the mails and chat messages of Share, and in the address of the page (#errors/BX-1013F899). The search box and the API (GET errors/BX-1013F899) accept it in any case, with any prefix or none, and the start of an id works too when it is at least 6 characters and names one issue.
It is the start of the issue id, which is a hash of what makes the error the same error. So the same issue has the same reference after a restart, after Clear and on every server, which a counter could not give (it would start again at 1 on Free after a restart, and two servers would number one bug differently). When another issue starts with the same 8 characters, the reference shows the whole id, so two issues never share one.
The prefix is the setting collectors.errors.prefix (default BX, 1 to 8 letters or digits, saved in capitals). It is on the Settings page under Collectors, Errors. A new prefix renames every issue at once, because the reference is built when it is shown, and a reference with an old prefix still finds the issue, so links and mails you sent keep working. Use the name of your product or team, for example SHOP-1013F899.
How errors are grouped
Two errors are the same issue when they have the same type, the same message after numbers, ids (UUIDs) and quoted values are removed and the text is lowercased, and the same top three stack frames (file and line). When there are no frames, the request path is used. For a task, a thread or a log line, the grouping uses the source, the type, the normalised message and the name of the task, thread or logger. The issue id is a short hash of that.
Settings for errors
The Actions menu at the top right of the Errors page (an admin only) has Settings, Ignore rules and Clear all errors. They open the Errors area of Settings (an admin only). Everything that shapes error tracking is there, and every setting is live.
| Setting | Default | What it does |
|---|---|---|
collectors.errors.enabled, tasks, threads, logs | on | Which sources are filed as issues. |
collectors.errors.prefix | BX | The start of the reference of an issue. |
collectors.errors.maxIssues | 500 | Issues kept at once (50 to 5000). When full, a resolved or ignored issue goes first. |
collectors.errors.samples | 5 | Full events (stack and request) kept of one issue. |
collectors.errors.eventsPerSecond | 1000 | Events looked at each second. The rest are only counted. |
collectors.errors.newPerMinute | 20 | New issues opened each minute, then they count on one overflow issue. |
collectors.errors.perRequest | 10 | Errors filed from one request. |
collectors.errors.keepResolvedDays | 0 | Days a resolved issue is kept, counted from when it was resolved. 0 keeps it for ever. |
collectors.errors.keepIgnoredDays | 0 | The same for an ignored issue, counted from when it was ignored. |
collectors.errors.keepRegressedDays | 0 | The same for a regressed issue, counted from its last event. |
collectors.errors.keepOpenDays | 0 | The same for an open issue, counted from its last event. |
An issue that stayed longer than its status allows removes itself, from memory and from the saved file. Open issues are kept for ever by default, because an open issue should only go when someone acts on it.
Ignore rules (BoxLang+)
Some errors are noise you know about: a bot asking for pages that do not exist, a failing widget of someone else, a check that is expected to fail. Open the issue and choose Ignore every error like this. That makes a rule from its type, its cleaned message and its source. An error that a rule matches is counted on the rule and left alone: it never opens an issue, takes a slot or sends an alert. The rules are listed in Settings, Errors, with how many errors each one has left alone. Switch one off or remove it there, or type a rule by hand (a type, a piece of the message, or both, and a source). A rule needs a type or a message, or it would hide everything.
Clear all errors
At the bottom of the Errors area, Clear all errors removes every issue of this server, in memory and in the saved file. Other servers are not touched. It is for admins, needs you to type CLEAR, is refused in read only mode and is written to the audit log (errors.reset).
Export (BoxLang+)
The Export menu at the top right of the Errors page (and the buttons in Settings, Errors) downloads the issues of the list as you filtered it: one row each with the reference, id, status, source, type, message, counts, first and last seen, servers, the place of the error and a link that opens the issue (the address is console.publicUrl). The message is passed through the secret masker, and no stack, request or breadcrumb leaves the server. A cell that a spreadsheet would run as a formula starts with an apostrophe. Each export is written to the audit log (error.export).
A link to every issue
Every issue has an address that opens it: #errors/BX-1013F899, its reference. The reference on each row of the list is that link (open it in a new tab, copy it), the issue page has a Copy link button, and the mails and chat messages of Share and the export carry it.
When errors come in a flood
Error tracking can never slow a request or grow without bound. These are the limits and their defaults. With BoxLang+ an admin changes every one of them in Settings, Errors. Free keeps 100 issues and the defaults below, and nothing removes an issue by itself.
| What | Limit | When it is passed |
|---|---|---|
| Issues | 500 (Free: 100, fixed) | The oldest resolved or ignored issue goes first, then the one seen least recently. |
| New kinds of error | 20 a minute | The events go to one ErrorOverflow issue (BX-OVERFLOW), so a bug that makes every message different cannot push your real issues out. |
| Events handled | 1000 a second, with a burst of twice that | The extra events are counted as dropped and not looked at. The list says how many. |
| Errors filed from one request | 10 | The rest are counted as dropped. |
| Events of one issue | no limit | Only counters grow: events, the hour and day buckets, tags (8 names, 10 values), the places (20) and the servers (20). |
| Full events kept for one issue | 5 | Once an issue has five, a new one is kept at most once a second. Every event is still counted. |
| Notes and changes of one issue | 20 and 30 | The oldest goes first. |
So 100000 failures of one bug are one issue with an exact count, five stored events and the same memory as 10 failures. Recording runs on the background worker, never on the request: when that worker's queue is full (async.queueSize) new work is dropped and counted, and a request never waits. The tail of the logs reads at most 1 MB and files at most 200 lines in each poll.
Many threads can file, change the status and read at the same time. An issue is changed under its own lock, for a few counters, and opening an issue happens under one lock, so the limit of 200 holds exactly.
The issue page


Open an issue for its numbers (events, the last 24 hours, first and last seen, servers), a chart of the events (24 hours, 7 days with six hour bars, 30 days with daily bars) and the events themselves. An issue keeps its five newest events: step through them with Newest, newer, older and Oldest. The sections open on a click:
- Stack trace: the BoxLang frames first (file, line and function) and the Java frames on request.
- Breadcrumbs: what the request did before it failed, oldest first, with the time since the request started: the statements it ran (values hidden), the outgoing HTTP calls (without the query string) and the messages it sent to Lens. Up to 12 steps. Tasks, threads and log lines have none.
- Request: the method, path, status, server, application, template, the origin and, for a database error, the statement. Open the request jumps to the request when it is still in memory.
- Tags: how the events split by
server,method,status,app,url, the tags of the request and the tags you pass tolensException. At most 8 names and 10 values each. - Notes and activity: notes for whoever looks next (up to 20) and every change of status, with who made it and when.
Resolve, ignore and notes
Free and BoxLang+ both have the whole workflow. The bar at the top of the page has:
- Resolve (an optional release name, for example
2.8.1, is kept with it). A resolved issue that happens again becomes Regressed, counts the return and shows a badge. - Ignore for 1 hour, 24 hours, 7 days, until it escalates (it comes back by itself when it gets the Escalating badge), or for good. An ignore that ran out reopens the issue by itself.
- Reopen, and notes.
The status belongs to the server that holds the issue. In the view of all servers an issue shows the worst status of its servers (regressed, then unresolved, then ignored only when every server ignores it, otherwise resolved), and the page is read only: change an issue on the server that has it. Every change is written to the audit log as error.status or error.note, is for admins, and is refused when console.readOnly is on.
Share and Ask Lensy (BoxLang+)

Share sends the issue by mail to people from Notifications or any address, and to chat channels. Pick what goes in: the latest event stack, the breadcrumbs and where it happens (tags and servers), and add a note. Values are hidden, no request body is sent, each address gets its own mail, and it is rate limited and audited as error.share. Ask Lensy explains the issue, with the stack, the breadcrumbs and the tags. For AI help without BoxLang+, see Ask Lens and AI help.
What is kept
| Free | BoxLang+ | |
|---|---|---|
| Issues | Up to 200, in memory, a restart clears them | Saved to disk |
| Trend | 24 hours | 24 hours, 7 days and 30 days |
| Other servers | This server | Every server of the store, in one list |
| Share, Ask Lensy | No | Yes |
Lens keeps up to 200 issues. The one seen least recently is dropped first. Clear removes all of them. It is for admins, is written to the audit log and is refused when console.readOnly is on.
Exception messages are stored as the application produced them, cut to length. If your code puts personal data into an error message, it is in the event.
Turn the page off with collectors.errors.enabled or tabs.hide.
In the reports and the alerts
The daily, weekly and monthly email reports have an Errors section: the events of the period against the period before, the new, regressed and resolved issues, how many are still open, and the five busiest issues with their change and status. The Error spike alert fires for a new error and for a resolved error that came back (regressed), and never for an ignored one.
The API
The list answers with issues, shown, page, pages, counts, occurrences, tags and a digest for the summary strip: issues, open, regressed, escalating, new24, other, resolved, ignored, events24, hours24 (24 numbers, the events of each hour, the oldest first, the last one being the current hour) and prev24 (the events of the 24 hours before the last 24 hours). The digest covers the issues that pass every filter except the status and the part.
GET errors?page=&size=&status=&source=&on=&tag=&q=&sort=&dir=&part=&server= (on filters by server host, part is regressed, escalating, new or other and lists only the open issues of that part of the summary strip, server picks whose data), GET errors/{id}, POST errors/{id}/status (status, until, resolvedIn), POST errors/{id}/note (text), POST errors/bulk (ids, status), POST errors/{id}/share (BoxLang+) and POST errors/reset. The write routes take their JSON in the form field data.
Reports
The Reports page shows how the server behaved over a range, compared with the range just before it: the last hour, 24 hours, 7 days or 30 days.

Ranges and what they cover
| Range | Needs | Bars of the chart |
|---|---|---|
| 1 h | Nothing. Free keeps the last 3 hours of this server in memory. | 5 minutes |
| 24 h | BoxLang+ with the store | 30 minutes |
| 7 d | BoxLang+ with the store, store.retentionDays of at least 7 | 3 hours |
| 30 d | BoxLang+ with the store, store.retentionDays of 30 | 12 hours |
The page says what it covers, and never shows a comparison it cannot make:
- The history starts when the server first recorded it, and it cannot reach further back than memory (3 hours on Free) or the store (
store.retentionDays, 15 by default, 30 at most). When it is shorter than the range, the page says how much of the range it shows. - The change against the period before appears only when the history reaches back to the start of that period. A 30 day range needs 60 days of history, which the store never keeps, so it has no comparison. A range the store cannot hold is greyed out.
- A period is the live step plus the steps before it. Counts are compared as rates over the time each period really covers, so the live five minutes (or hour) do not make a change look better or worse. Averages, p95, p99 and shares are compared as they are, with the difference in points or milliseconds.
- The numbers of the whole server are kept in slices of 5 minutes, the numbers of each URL in clock hours. A URL table covers whole clock hours up to now: with the 1 h range it is the current hour so far.
What it shows
| Block | Content |
|---|---|
| Tiles | Requests, failed (the share and the count), average and p95, each with its change. Under the p95 are the p99 and the slow requests (at or over thresholds.slowRequestMs). A request counts as failed when its status is 500 or higher or it ended with an uncaught exception. |
| Chart | Requests (blue), failed (red, inside the bar) and the p95 (the line) over the range. Move over a bar or tab to it for its numbers, and the Table button for a table of the same bars. |
| Status codes | Counts and shares for 2xx up to 5xx. |
| Error issues | How many issues were opened, resolved and regressed in the period, how many are open with events in it, and the five busiest with their change and status. Press an issue for its page. Up to 24 hours the events are counted by the clock hour, beyond that by the UTC day. |
| URLs | The slowest (by p95), busiest and most failing, over all methods, with hits and their change, failed, average, p95 and its change, a trend line (24 hours and longer) and, with several servers, the server where the URL is slowest. Press a URL for its page. |
| Server by server | With several servers (BoxLang+): requests, failed, average, p95 and the heap peak of the UTC days the period touches, from the daily numbers the servers save for the email reports. |
| Work done | Queries (and their time), outgoing HTTP calls and exceptions, with their change. Nothing is counted here that the page did not count before. |
| Since first install | Requests, errors, slow requests, queries and exceptions since Lens was first installed, plus the number of runs. Shown only with the disk store (BoxLang+). |
The page of one URL

Press a URL in a table. The page shows its hits, failed share, average, p95 and p99 with their change, a chart of hits, failures and p95 by the hour (at least a day of hours, at most 60 bars), its status codes and methods, and its slowest requests. With several servers it also shows the URL by server.
Where its time goes (database, templates, outgoing HTTP, other) and the heaviest statements come from the requests of that URL that this server still keeps, so they are a sample and the page says how many requests it used. Templates count their own time, without the queries and calls inside them. Statement values are hidden. They are not shown for another server or for all servers, because each server keeps its own requests.
Report, Share and Export
The toolbar has four buttons, with an icon each:
- Report opens the period as a clean light page, made to print: the numbers, the chart, the status codes, the error issues, the slowest URLs and the work done. Print or PDF opens the print dialog of the browser, where Save as PDF makes the file. Lens does not make the PDF itself, so nothing is stored and nothing is attached to a mail.
- Share (BoxLang+, admin) sends the period to people and chat channels with the share sheet of the other pages. The numbers are always in; tick the Error issues, the Slowest URLs and the Work done. The mail carries the same figures as text and a button that opens the page. It is the period and the server you are looking at, and only this server can be shared. Each address gets its own mail, the share is rate limited with the other shares and written to the audit log as
report.sharewith the range and the counts and nothing else. Only names, counts and times are sent: no parameter, header or scope. - Export is described below.
- ... (Actions) holds Reset counters, which clears the counters of this run that feed the Boards. The history of the page is kept.


Export
Export downloads what is on the screen, for the range and server picked: CSV (one table after another, each with a title line, opens in a spreadsheet), JSON (the document the page was drawn from) or copies the JSON. The file is made in the browser, like the request export. It holds the same redacted numbers as the page: URL paths without query strings, statement text without values, and nothing from headers, parameters or secrets. A cell that a spreadsheet would run as a formula gets a quote in front of it.
Free and BoxLang+
The last hour of this server is free. The longer ranges, the history that survives a restart and the other servers are BoxLang+ (diskStore and servers, see Licensing). The split is the current state and may change.
Boards

Totals and Boards switch the view. A board is a short ranked list that answers "what should I look at first?". Each row says why it ranks, with the numbers, and has three icon buttons: Evidence (the requests of that URL or event, the request, the error, the cache, the task), Copy (free: a prompt built from the row, names and numbers only) and Find solution (the Lensy icon, BoxLang+, on demand: Lensy reads the evidence and writes one prompt for a coding agent). Boards are free and read only.
The numbers are those of this run on this server, kept in memory. A board ignores a URL or an event with too few requests, so one failure out of one request does not top it. The minimum is in the note of each board.
| Board | Ranks by | Minimum |
|---|---|---|
| Highest error rate | failed requests divided by requests | 10 requests and 1 failure |
| Slowest (p95) | the 95th percentile | 5 requests |
| Slowest requests | single requests still in memory | none |
| Where the time goes | calls times the average time | 3 requests |
| Most queries per request | queries divided by requests, and a note when it looks like an N+1 | 3 requests |
| Most exceptions | error groups, most frequent first | none |
| Cache effectiveness | lowest hit rate | 20 lookups |
| Tasks | failures, then the longest last run | none |
Global is the whole server, every application, by URL. ColdBox (shown when a ColdBox application has been seen) is one application, by event, view and layout, with these differences:
- Slowest (p95), and where the time goes, mix events, views and layouts in one list (each row says which it is).
- Cache effectiveness adds cacheable events that never hit and the CacheBox caches.
- Views and layouts (ColdBox only) lists views rendered more than once per request, then the slowest layouts.
- Tasks by group adds up the ColdBox tasks by group, with the failures and the task that is failing.

Not in this version: a range selector for the boards, a trend against the previous period, and the boards of other servers. The boards read the counters of this run.
Percentiles
Lens does not keep every duration. It counts requests in buckets: 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000 and 10000 ms, and one above. A percentile is the upper edge of the bucket it falls in. A p95 of 250 means that 95 percent of requests took 250 ms or less. Above 10000 ms, the longest time seen is shown.
Memory and history
The counters of this run (the totals, the URL lists behind the Boards, the minute series) are in memory. A URL is METHOD path without the query string, with numbers and ids in the path collapsed (GET /orders/:id). Lens keeps up to 300 URLs and drops the one seen least recently.
The history behind the ranges is separate and bounded:
- Slices of 5 minutes for the whole server and hours of each URL, each a counter set: requests, failed, slow, total and slowest time, queries, query time, outgoing calls, exceptions, the six status classes and the latency counts (the bounds of Percentiles), so a p95 of many servers is read from merged counts and is never an average.
- At most 50 URLs an hour, plus
(other). When a new URL does not fit, the URL that is outside the top by hits, outside the top by time spent and outside the top by failures is folded into(other): its requests stay in the totals and in(other), and only its name is lost for that hour. The page says how many requests were in(other). - Memory keeps 3 hours on Free and 49 hours with the store. The store keeps one file a day,
reports-rollup-YYYY-MM-DD.json, forstore.retentionDays(15 by default, 30 at most), pruned with the other days. A day holds at most 288 slices and 24 hours of 51 URLs, a few hundred KB at the most, and a quiet server far less. See The store. - No setting changes these limits. They are fixed in code, like the other store limits.
Reset the counters clears the totals, the URL lists and the minute series of this run. It does not clear the history. It is for admins, is written to the audit log and is refused when console.readOnly is on.
The page header names the scope (this server, one server or all servers). The same server is in the result of lensReport().
The API
GET reports/period and GET reports/url are read only and need a session. The last hour is free. Any other range answers 403 without BoxLang+ with the store, and another server or all answers 403 without BoxLang+ (servers).
POST reports/share (admin, BoxLang+ notifications, and diskStore for a range longer than an hour) sends this server's period. The form field range names the period and data holds to, channels, parts (errors, urls, work) and note. The document is read again on the server, so the mail never carries what the page sent. It answers like the other shares: ok, sent, addresses, channels and failed.
GET reports/period?range=1h|24h|7d|30d&server=this|all|<id>:
{ "range", "scope", "now", "from", "to", "spanMs", "barMs",
"coverage": { "persisted", "since", "coveredMs", "complete", "previous", "retentionDays", "memoryHours", "urlsPerHour",
"ranges": [ { "id", "label", "phrase", "spanMs", "available", "compares", "locked" } ] },
"tiles": { "requests": { "value", "previous", "change" }, "failed": { "value", "previous", "diff", "count", "previousCount" },
"avgMs": { "value", "previous", "diff" }, "p95": {...}, "p99": {...}, "slow": { "value", "previous", "change" } },
"series": [ { "t", "requests", "failed", "p95", "covered" } ],
"status": [ { "code", "count", "pct" } ],
"work": { "queries", "queryMs", "httpCalls", "exceptions" },
"errors": { "summary": { "events", "previous", "issues", "new", "regressed", "resolved", "open" }, "top": [ { "id", "ref", "type", "message", "count", "previous", "change", "status", "new", "regressed", "servers" } ], "unit", "from", "to", "previous" },
"urls": { "slowest": [ row ], "busiest": [ row ], "failing": [ row ], "from", "to", "others", "kinds" },
"slowRequests": [ { "id", "at", "method", "url", "status", "ms", "dbMs", "queries", "server", "remote" } ], "slowRequestsKept",
"servers": [ { "id", "host", "state", "requests", "failed", "failedPct", "avgMs", "p95", "heapPeak" } ] }
change is a percentage (a rate against a rate) and diff a difference, both null when the period before is not covered or empty. A URL row is { url, methods, hits, failed, failedPct, avgMs, p95, maxMs, totalMs, queries, previous, change: { hits, failedPct, p95 }, trend, worstOn }. servers is present with more than one server.
GET reports/url?range=&server=&url=<path> answers { range, scope, now, from, to, spanMs, url, found, coverage, tiles, status, methods, series: [ { t, hits, failed, p95, covered } ], servers, split, statements, slowRequests, slowRequestsKept }. split is { available, sample, avgMs, parts: [ { id, label, ms, pct } ] }, or { available: false, reason }.
The disk store
The disk store needs BoxLang+ or a trial. On Free, both pages show a note that the data is kept in memory only. With a license, Lens writes errors.json and reports.json into this server's subfolder of store.dir (default lens-data in the BoxLang home) every store.flushSeconds, and when the module stops. Each file is written to a temporary file and renamed, so a crash cannot leave half a file. Errors older than store.retentionDays (15 by default, 30 at most) are dropped, and the whole folder stays under store.maxMB. In a container, put store.dir on a mounted volume. See The store and Running Lens in production.
Both files carry the identity of the server that wrote them in a top level server object, and every error group and sample has its own serverId, so files from many servers can be merged without losing where a record came from. errors.json is { "server": {...}, "groups": [...] }. Older files, a plain list of groups, are still read.
The files hold redacted data, but they are still data from your server. Give the folder the permissions you give to your logs.