Logs: keys on every record, and how agents and people read them
A log record carries the keys it is joined and filtered on, and every way of reading logs
speaks the same search grammar. This page is the reference for what a stored record holds, how
where and fields work, what a search says about itself, and the three MCP tools that read
logs. The search box and its grammar are described under
Searching logs; how records arrive is in OTLP ingest and
Log drains. The archive, rehydration, facets, parse rules, patterns, findings and
log-based metrics are in Logs beyond the hot store.
What a record carries
| Field | What it is |
|---|---|
service |
The emitting service: OTLP service.name, or the drain's service (one per Vercel project, Worker, Heroku app or Supabase service). Null when the sender named none, and on older records stored before Bucker kept this field. |
resource |
At most 16 allow-listed resource facts, strings only, each cut to 200 characters: service.version, host.name, k8s.pod.name, k8s.namespace.name, cloud.region, faas.name, vercel.deployment.id, vercel.request.id. A Vercel drain carries the last two on each line, so a record's own value wins over the batch's. Anything else a sender puts in its resource is not stored on the row. |
entityId |
The infrastructure entity the record's resource resolved to, when entity resolution has run. |
subjectKey |
Reserved for the keyed pseudonym of the person a record is about. Not populated yet: nothing writes it today, so it is not offered as a join key (session_id is in the same position). Erasure already matches on it, so records written once it is populated are reached by an erasure without any change on your side. |
traceId, spanId, issueId, release, environment, sampleRate |
The trace, span and issue the record belongs to, its release and environment, and the rate it was stored at. |
service and resource go through the same stored-tier scrub as the body and the attributes
before they are written: a credential in a host name is redacted, and what is not sensitive is
kept. A drain still drops the client address, the referer and the query string; nothing here
changes that.
In the Explore logs dataset the keys are service, entity_id and the path resource.<key>:
service:checkout, resource.host.name:ip-10-0-0-7. They work in the log search, in Explore
aggregates, in saved queries and in the MCP tools alike.
Searching: where, fields and the evidence
GET /orgs/:org/projects/:project/logs takes the grammar in query (the name the log view uses)
and, under the name the MCP tool uses, in where; if both are sent they are ANDed.
It also takes fields, up to ten attribute keys (or resource.<key>) separated by commas, and
returns each row's present keys as projected, so a reader gets http.route without the whole
attribute bag. More than ten fields is a 400.
Every page says what it rests on, as evidence:
| Field | Meaning |
|---|---|
compiled |
The parse of where: filters, text and, for an OR or a negated group, expression. Null when no where was sent. |
window |
from, to and defaulted. A search the caller bounded by neither time, ids, a trace, a span nor an issue is bounded to the last 24 hours by the search itself (defaulted: true); the REST list, when it is sent no window, reads newest first across every stored record. |
scanned, truncated, scannedThrough |
With a scan cap (the MCP tool sets one): how many matching rows were counted, up to the newest 100,000, whether more matched, and how far back the scan reached (the window's start when it was covered whole). A page never reaches past a cut scan. Null and false when the search was not capped, which is the dashboard's case. |
tier, index |
The tier that served it (hot) and the index behind it. A search with a body term says trigram (the body index covers every stored day) or none; any other search names the access path its filters allow: primary_key, project_trace_time, issue_time, project_service_time or project_time. This describes the shape of the search, not a guarantee of the plan the database ran. |
rowsExamined |
The rows the read looked at. Without the index a body search reads the newest 100,000 rows of its window and says how many it read; with it, the matching rows counted (scanned). Null when the search was not capped. |
nextArrivalCursor |
Where "what arrived since" resumes; see Reading what arrived. |
floorNote |
Records at error severity or worse, records with an exception, records linked to an issue and records on an error trace are never sampled away. Anything else may have been, and says so in its sampleRate. |
sampleRates |
The distinct sample rates below 1 on this page. A count over a sampled record is an estimate of 1 / rate per row. |
GET /orgs/:org/projects/:project/logs/:recordId returns one record with its joins (below). A
record of another project, or of another organization, is a 404 identical to an unknown id.
Searching the body
Three body terms, all case-insensitive, all combinable with the grammar and with each other:
- contains:
q(and a free-text term inqueryorwhere),body ILIKE '%term%'; - prefix:
bodyPrefix,body ILIKE 'term%'; - regex:
bodyRegex, a POSIX regular expression (body ~* pattern; note\yis the word boundary and\bis a backspace). At most 100 characters, no backreferences (\1..\9), and cancelled after 10 seconds with a 422 that says so. A pattern longer than that, with a backreference or that does not compile is a 400. Searching every attribute value at once (*:term) is not offered.
LIKE characters in a term (%, _) are literals.
With the body index. Body search can be served by a trigram index on the log body. It is
not switched on by default. Once it is switched on, new log days are indexed as they are
created and days already stored are indexed separately, so coverage of older days can lag. The
response says index: trigram only when every stored day carries the index; while any day is still
being indexed it says none and the search behaves as below.
Without it (index: none). A body search does not time out. It reads the
newest 100,000 rows of its window that pass the other filters, newest first, applies the body term
to them, and says so: rowsExamined, truncated: true and scannedThrough, the timestamp of the
oldest row it read. When the page is not full and the window is not covered, hasMore is true and
nextCursor continues from the last row read, so the next call reads the next slice. A search
with no window is bounded to 24 hours, and never reaches past your hot retention window.
Reading what arrived since: a cursor, not a stream
A person's live tail is a server-sent stream. An agent gets no stream: search_logs takes
afterArrivalCursor, the nextArrivalCursor of an earlier answer, and returns only the records
received after it, oldest first, so "what came in since my last read" is one budgeted call.
- Every
search_logsanswer carriessearch.nextArrivalCursor. Start from the one on any ordinary read, or from a change event's time, and pass it back. An ordinary read that found nothing hands out its own instant, so a quiet project can be watched from "now". - An arrival read looks at the last 5 minutes of record time:
receivedAtis not indexed, and this window keeps the read a range scan on the timestamp index. A record stamped by a clock more than five minutes behind its arrival is in a search, not in an arrival read. - Nothing new returns an empty page and the same cursor. When a page was cut for the token budget the cursor resumes after the last record kept, so a record dropped for size is read next time.
- At most 6 arrival reads a minute per principal per project; the seventh is a 429 carrying the seconds to wait. An ordinary read is not counted. The limit is counted on each Bucker server separately, so it is approximate: a burst can occasionally get a little more through.
The dashboard tail's bounds
GET …/logs/stream is bounded so that live tails cannot slow down ingest:
| Bound | Value |
|---|---|
| Open tails | 3 per project and 10 per organization, counted per Bucker server; the next is a 429 |
| Poll interval | 2 seconds, 10 seconds after 30 seconds with nothing new, back to 2 on a record |
| One tick's query | a 2 second statement timeout; a tick that cannot finish is retried from the same cursor |
A bad bodyRegex |
a 400 before the stream opens (too long, a backreference, or a pattern that does not compile), taking no slot |
| High volume | above 500 matching records a second a tick keeps a trace-hash sample (a trace is kept or dropped whole) and sends { kind: 'sampled', rate, note: 'sampled at 0.333' } |
| A capped tick | sends { kind: 'capped', shown, skipped }: how many matching records it did not deliver |
The MCP tools
| Tool | What it does | Needs |
|---|---|---|
search_logs |
Rows. where, fields, a cursor and the evidence above; every hit carries its id, service, sampleRate and the short id of its issue. An empty answer says why (not_ingested, no_data_in_window, filtered_out). |
project:read |
logs_query |
Numbers: counts and measures per bucket and group. | event:read |
log_record_get |
One record with its joins in 1,200 tokens. | event:read |
Everything these tools return that came from outside Bucker (bodies, attribute keys and values,
service names, group labels, titles) passes the agent-tier scrub and the injection scanner and is
named in trust.untrustedFields. Attributes, projected fields included, are scrubbed as a bag,
so the rules that match on a key apply: user.id, user.email and user.ip_address come back
hashed, and a credential-named key comes back filtered.
logs_query
"ERROR lines by service every 5 minutes for 6 hours" is one call:
{ "org": "acme", "project": "checkout", "where": "level:>=error",
"groupBy": ["service"], "intervalMinutes": 5, "windowHours": 6 }
whereis the log search grammar, AND only: anORor a negated group is refused with the parse echoed, rather than narrowed to a different question. A simple negation (!env:staging) is fine.measures(up to 4):count(the default),count_unique,sum,avg,min,max,p50,p75,p95,p99. All butcounttake afield.groupBytakes up to three keys. Each key is its own breakdown over the same filters and window: three marginal series, not the cross product.- A series is a dense array per measure:
v.<measure>[i]is the bucket atfrom + i × step. - Each breakdown says
countBasis:exact, orsampledwhen any scanned row was stored sampled, in which case every count is a lower bound and thesamplingblock gives the number of sampled rows, the lowest rate and the corrected estimate. - The scan is the newest 100,000 matching rows inside the window (at most 30 days) and says so when it was cut. It is charged to your query-scan budget before it runs and recorded in the query log as an MCP query.
- With more than one key, a later page carries only the breakdowns that still have groups to
read; each names its
groupBy. - When the answer would exceed its budget the smallest groups are dropped,
omittedsays how many, and no cursor is offered; ask again with a smallerlimit.
log_record_get
The record, plus:
| Join | Source | When it is empty |
|---|---|---|
issue |
the issue the record became: short id, status, level, title | no_key, or not_found |
trace |
a summary of the record's trace: span count, duration, services, error spans, the root. At most 200 spans are read; truncated says when more exist. |
no_key, or not_kept (logs and traces are sampled independently, so a log can name a trace that was not stored) |
release |
the release and its deploy change event: when, the summary, minutes between | no_key; the deploy is null when none was recorded |
flags |
the variants the request's root span carried (flagsBasis: trace_root), else the variants the issue's events carried over a span of time that covers the record (issue_events) |
no_key, or not_found |
pattern |
not available on this tool yet; read templates with logs_patterns_get |
always not_available |
neighbours |
the five nearest records in time, within 15 minutes, on the trace, else on the service, else in the project | not_found |
The bundle is shrunk in a fixed order to fit: attribute values, then neighbour bodies, then
neighbours from the farthest, then the attribute bag. The head of the body, the severity, the
service and every join's key are never cut, and omitted counts what was.
Quotas
A log quota caps one scope, a service or a filter in the log grammar, at a number of records or
bytes per UTC day. Past the cap a record that is not protected is dropped, or sampled at a stated rate
(overflow: drop | sample), and counted under the drop reason log_quota. Records at error severity
or worse, records with an exception, records linked to an issue and records on an error trace
always pass, whatever the quota says; they are counted as floorKept.
A quota is shadow (counts what it would have dropped and drops nothing), active or disabled.
Each has a warnAtPercent threshold and a resetHourUtc for where its day starts.
GET /orgs/:org/projects/:project/log-quotas (project read) returns every quota with today's state:
| Field | Meaning |
|---|---|
used, percentUsed |
What the quota let through today, in its unit. |
dropped |
What it removed; for a shadow quota, what it would have removed. |
floorKept |
Protected records that arrived after the cap and were stored anyway. |
warnedAt, cappedAt |
When the warning threshold and the cap were first passed today. |
overshoot |
The note on overshoot below. |
A quota may overshoot its limit. Usage is counted on each of Bucker's ingest servers and merged every ten seconds, so a quota can overshoot by up to ten seconds of traffic for each server receiving your logs, and by one record (or one record's bytes) per batch in flight. A record that matches several quotas is dropped by the first capped one and charges no other for it. If the quota store cannot be read the batch is stored whole: a quota fails open.
Authoring. This endpoint only reads. The governed acts that create or change a quota (log_quota.create,
log_quota.update, always asked of a person, never automatic) are defined but no route or MCP tool
submits them yet; see Actions. To shape volume today, use Log pipeline rules.
Drains
GET /orgs/:org/projects/:project/log-drains (project read) says how logs reach the project: each
drain's coverage state, last delivery, records in the last hour against its 14-day normal, rejected and
lost counts in 24 hours, and losses by a closed reason, broken drains first. The states are live,
lossy, silent and unknown. Because the counters are hourly, a drain that delivers every five
minutes is declared silent after about three hours here and after fifteen minutes in the finding that
reads the same drain, and the answer says so in resolution. The answer carries no credential and no
platform-chosen text, and a platform price only where Bucker holds one (otherwise
not_checked: it bills on your own account). Setting drains up is in Log drains.
Purging records
A person who finds a secret or personal data in stored logs can delete the affected records, or have them rewritten under the current scrub rules. Both are a preview, then a scheduled job, and nothing is deleted by an agent.
Who: a person on their own session holding org admin (an organization owner). An agent, a service
principal, an OAuth-client token and a derived credential are refused by name before any row is read.
There is no MCP tool for it. The jobs list and a job read are org admin too, because a selection can
hold a literal about a person.
- Preview.
POST /orgs/:org/projects/:project/log-purges/previewwithkind(purgeorrescrubas the API names them) and aselection: a closed UTC window (from,to, not in the future, at most 400 days) and an optionalwherein the log grammar. The job is stored aspreviewedwith the count it matches per day. Nothing is deleted. The selection is fenced at the instant of the preview: records received afterwards are never in it. - Challenge.
POST …/log-purges/:jobId/schedule/challengewith areason(10 to 500 characters) andacknowledgeMatched, the count the preview showed. It returns a step-up challenge bound to this job, that reason and that count. It is refused with a 409 unless the job ispreviewed, and with aSTEP_UP_REQUIREDerror when the person has no second factor enrolled. - Schedule.
POST …/log-purges/:jobId/schedulewith the same two fields andstepUp, the answer to the challenge. The count is re-checked: if the selection now matches a different number, the call is refused and you preview again. A project has one open job at a time. It answers 202 withexecuteAfter: the job starts 72 hours after the server clock says it was scheduled, and until then it can be cancelled (POST …/cancel). - Run. After the window Bucker deletes (or rewrites) the records per UTC day in batches of 10,000; an interrupted job resumes where its last batch ended. On completion a signed receipt is added to the organization's receipt log with the matched, removed and rewritten counts.
The step-up is enforced on the hosted service, and a proof is single use: it is spent
by the schedule call, a spent code is refused on the next job, and a refused or missing proof leaves the
job previewed. The audit row for the schedule carries metadata.stepUp, the method used.
What it does not touch: rollups and derived series keep their counts (they hold no record content),
and the receipt names the stores that still count the removed records instead of pretending otherwise.
A rewrite re-runs body, attributes, resource, service, environment and release through the
stored-tier scrub with your rules as they are now. For a finding, GET …/findings/:findingId/leak-response
lays out the three responses (fix at source, add a scrub rule, purge or rewrite stored logs) and how many
stored records the selection would match; the order it recommends is redact first, then rewrite.
When a capability is off
Several log features are not switched on yet (the table).
What you see while one is off: a body search without the trigram index runs, bounded, and says
index: none with the rows it examined; logs_patterns_get has no templates to return; archive search says reason: pillar_off (not switched on) and is refused; parse and rename rules are
stored and do nothing. No answer pretends a feature ran when it did not.
What this page does not cover
- Exception records inside a logs export are not split out. A log record that carries
exception.*becomes an issue at ingest, and the export of a project's logs still lists it as one row among the others. Separating the exception records in an export is open. subjectKeyandsession_idare not populated yet; see above.- The
patternjoin onlog_record_getis stillnot_availableon every record. Templates are read withlogs_patterns_getinstead, see Logs beyond the hot store.