Skip to content

Log event-boundary guide

Log Multiline Event Boundary Review: Keep One Event from Becoming Several

A stack trace or embedded newline can turn one event into many records, while a loose parser can merge separate events. Record the framing rule, continuation evidence, timestamp semantics, and source boundaries before counting logs.

A multiline log review defines how an event starts, how continuation lines attach, which timestamp means creation or emission, and where structured attributes are stored. Preserve sequence and source offsets, test the rule with synthetic lines, and report event counts only for the bounded capture. A parsed log is not proof of complete telemetry, accurate meaning, permission, or a valid session metric. Sources without a verified publication date are shown with documentation retrieval dates checked 22 October 2026; their original publication dates are not established.

Updated

On this page

Define the event start and continuation rule

Write a rule that says which line starts an event and which lines continue it. A timestamp at the beginning of a line may be a start marker, but a stack trace can contain timestamps or lines that resemble headers. Some exporters use indentation, a delimiter, a record length, or a structured envelope instead. Record the source format and the exact rule used for the bounded capture.

RFC 5424 defines a syslog message structure rather than a universal multiline convention RFC Editor, (opens in a new tab). Do not apply a newline split to every log family and call the result events. If a capture mixes formats, partition it first and keep the parser or owner rule attached to each partition.

Define the event start and continuation rule (table)
Boundary fieldRecordStop when
start markertimestamp, length, delimiter, or unknownEvery line looks like a start
continuationindent, prefix, envelope, or ruleContinuation evidence is absent
source streamfile, socket, batch, or shardStreams were concatenated
offsetline or byte range for eventOffsets were discarded
terminationnext start, length, end marker, or EOFFinal event may be incomplete
format versionprotocol or exporter versionFormat inferred from examples

Keep timestamp roles separate

A log can carry a time when the event happened, a time when it was observed by a collector, and a time when it was exported. These are not interchangeable. OpenTelemetry names time and observed time separately and also models severity, body, attributes, and trace context OpenTelemetry, (opens in a new tab). Store each field with its source and precision, then say which one orders the capture.

A timestamp order can disagree with arrival order because of buffering, clock skew, retries, or multiple writers. Do not sort away the original sequence. Keep source offsets, sequence fields, and transport order available so a reviewer can distinguish business chronology from delivery chronology.

Keep timestamp roles separate (table)
FieldQuestionDo not infer
event timeWhen does the source say it happened?The collector saw it then
observed timeWhen did the observer receive it?Events are business-ordered
export timeWhen was it written or shipped?Export order is event order
sequenceDoes the source provide a sequence?Timestamp ties are duplicates
timezoneWhat zone or offset is stated?Local wall time is UTC
precisionseconds, milliseconds, or unknownMissing precision is zero

Preserve structured fields beside rendered text

Keep the raw or redacted event boundary together with structured fields such as severity, body, attributes, trace id, span id, and resource identity. A pretty-printed message can contain a newline that was originally one body value. Conversely, a structured exporter can split one logical event into several records. Record whether the review target is the body, the full log record, or the displayed line.

Use the timestamp and timezone guide for offset and database evidence, but keep boundary logic here. A correctly converted timestamp does not repair a line that was attached to the wrong event. Keep data provenance and redaction decisions separate from event parsing.

Structured review questions

  • Which field identifies the event start and which field identifies continuation?
  • Are body newlines escaped, encoded, or literal?
  • Which attributes belong to the event and which belong to the resource?
  • Can a trace or span identifier repeat across separate log events?
  • Which source offsets are retained after multiline reconstruction?

Use a synthetic multiline fixture

The fixture below tests a start marker, two continuation lines, a second event, and a final unterminated event. It is a text ledger, not a log parser. Count events from the declared rule and keep the line ranges. Add a line that resembles a start marker inside a stack trace to test whether the rule is too broad.

Keep synthetic text free of real IP addresses, account names, stack traces, or message contents. The point is to test the boundary contract, not to show an application’s private failure. If a production sample is needed, use an approved redacted artifact and record the source scope.

Use a synthetic multiline fixture (table)
Fixture findingDispositionNext evidence
Indented lines attach to prior eventcontinueCheck the source continuation rule
Stack line resembles a start markerholdAdd a stronger boundary field
Final event has no terminatorincompleteObtain the next boundary or mark EOF
Two source formats are mixedpartitionReview each format separately
Line offsets retainedcontinue conditionallyCompare reconstruction with source count

Synthetic event boundary ledger

Use a synthetic multiline fixture code example, Plain text
line 1 | 10:00:01Z INFO E1 start
line 2 |   detail: first continuation
line 3 |   detail: second continuation
line 4 | 10:00:02Z WARN E2 start
line 5 |   detail: continuation
line 6 | 10:00:03Z INFO E3 start (capture ends)
expected events: E1 lines 1-3; E2 lines 4-5; E3 incomplete lines 6-end

Separate delivery order from event order

When logs are retried or replayed, duplicate delivery can coexist with one event identity, while two distinct events can share a timestamp. Record any source event id, sequence, retry marker, and collector offset. Do not claim exactly-once delivery from a unique line number or deduplicate solely on rendered text. A replay review is a boundary and identity question, not a count of unique strings.

Report a narrow observation such as “three bounded event starts and one incomplete final event.” If sequence, clock, or identity fields are absent, mark them unavailable. Keep the unknown visible rather than inventing a session count or causal order.

Separate delivery order from event order (table)
FindingDispositionDo not infer
Start rule and offsets agree in fixturebounded passEvery real line is an event
Continuation marker missingholdNewline means new event
Timestamp order differs from source orderretain both ordersClock order is delivery order
No stable event iddeduplication unavailableEqual text is the same event
Final boundary absentmark incompleteCapture is complete

Close with a qualified preparation step

Once framing, timestamp roles, structured fields, source offsets, and incomplete states are documented, keep the packet at technical evidence level. Use the data provenance log for collection and transformation history. Do not upload raw logs merely to test a multiline rule.

For a supported non-health collection, with authority to describe the log source and a controlled handling boundary, the qualified appraisal path may be a next preparation step. It does not parse logs, reconstruct sessions, create a quote, match a buyer, issue a legal opinion, or grant a license. Event-boundary evidence also does not prove completeness or value.

Takeaways

  • Define event starts and continuations for each source format.
  • Keep event, observed, and export times separate from source order.
  • Retain structured fields and offsets beside reconstructed text.
  • Use synthetic multiline lines to test incomplete and ambiguous boundaries.
  • Report bounded event evidence without claiming universal deduplication or completeness.

Sources

  1. RFC Editor: The Syslog Protocol (opens in a new tab)
  2. OpenTelemetry: Logs Data Model (opens in a new tab)

Use the appraisal path after the technical packet is organized.

It does not parse files, certify evidence, create a quote, match a buyer, issue a legal opinion, or grant a license.