Use it for detailed context on specific events and errors.
Logs
Logs are timestamped records of discrete events, ideally structured (JSON) with fields such as level, service, message and trace_id.
1. Recent errors for the service: journalctl -u <svc> -p err --since -1h or a LogQL/Kibana query.
2. Fields parsed (level, service, trace_id)?
3. Find the failing request by trace_id.
4. Check volume and noisy sources.
5. Retention matches needs.
app writes log → agent ships → parsed/enriched → indexed/stored → queried
Failures include parsing rules that drop fields, clock skew reordering events, multiline stack traces split incorrectly, log rotation/retention removing context, duplicate ingestion and severity labels that do not reflect operational impact. Preserve the first divergent observation and repeat the same bounded verification after remediation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Observability owns log collection/parsing/search/retention. Linux, Windows, Containers, Databases and applications own the semantics of their native log events.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification workflow Verify boundary
Verify source, timestamp/time zone, host/service identity and correlation fields before searching. Preserve the raw message alongside parsed fields, check ingestion delay/loss, and compare application/system logs around the same request or state transition.
Step 2 Failure signatures and limits Narrow the fault
Failures include parsing rules that drop fields, clock skew reordering events, multiline stack traces split incorrectly, log rotation/retention removing context, duplicate ingestion and severity labels that do not reflect operational impact.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
Structured logs write each event as key-value fields (often JSON) so log systems can filter and aggregate without fragile text parsing.
Subtopic Log Levels and RetentionLog levels (debug, info, warn, error) control what is written; retention decides how long logs are kept and what they cost.
Subtopic syslog and rsyslogsyslog is the standard protocol and format for system logs; rsyslog collects, filters and forwards them on Linux hosts.
Structure logs, include correlation IDs, never log secrets or personal data unnecessarily, and set retention by value. Logs are expensive at volume — sample or drop noise.
journalctl -u <svc> -p err --since -1h— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
ReferenceWhat it is1 section · depth on demand
Operating model
Logs are timestamped records emitted by applications, operating systems and infrastructure components. Structured fields make machine queries safer than parsing presentation text, while correlation IDs and stable source identity allow events across services to be joined into one request or incident timeline.
ReferenceHow it works1 section · depth on demand
In depth
Logs are timestamped records of events produced by applications, systems and network devices. They provide the detail metrics cannot — the specific error, request, user or configuration involved.
Making logs useful:
| Practice | Reason |
|---|---|
| Structured format (JSON, key=value) | Reliable parsing and querying |
| Consistent fields (timestamp UTC, level, service, host, trace ID) | Correlation |
| Meaningful levels | Filtering signal from noise |
| No secrets or unnecessary personal data | Security and privacy |
| Central collection | Search across systems; survives host loss |
| Retention by value | Hot for recent, archive for compliance |
{"ts":"2026-11-05T10:15:02.331Z","level":"error","service":"netbox-sync","trace_id":"4bf92f35…","msg":"API timeout","target":"sw-oslo-07","duration_ms":30000}
Documented example, not captured output. Logs are the most expensive signal at scale — sample or drop debug noise and derive metrics from logs where only counts are needed.
ReferenceImportant terms & boundaries1 section · depth on demand
Scope map
- Structured vs unstructured logs
- Severity
- Timestamps/time zones
- Correlation/request IDs
- Parsing/enrichment
- Retention and rotation
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: The service runs as a systemd unit.
journalctl -u checkout.service --since "2026-10-25 09:00" --until "2026-10-25 09:15" -p warning -o short-isoExpected output
journalctl -u checkout.service -p err -n 3 -o short-isoExpected state: Only a few errors appear, each with an ISO timestamp, host, unit and message.
2026-10-25T09:04:12+0200 app1 checkout[2211]: ERROR payment gateway timeout after 5000 ms order=1042
2026-10-25T09:04:31+0200 app1 checkout[2211]: ERROR payment gateway timeout after 5000 ms order=1047
2026-10-25T09:07:02+0200 app1 checkout[2211]: ERROR db pool exhausted (max=20)Check clock sync and time zone before correlating logs from different hosts. Illustrative authored output: field layout matches the tool, values will differ in your environment.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.
Basis: https://opentelemetry.io/docs/specs/otel/logs/ · confidence 92%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Logs verification boundary matrix
A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Logs.
| Boundary | Inspect | Healthy interpretation | Do not infer |
|---|---|---|---|
| Intent | Structured vs unstructured logs | Intended object/scope is explicit and versioned where relevant | Intent is already effective |
| Owning runtime/control plane | Severity / Timestamps/time zones | Owner accepts and reports the expected object state | Downstream dependencies are healthy |
| Effective state | Correlation/request IDs | Independent read-back matches the intended state | Every client sees the same result |
| Consumer outcome | Parsing/enrichment | The original bounded check succeeds in the same time window | Production correctness outside this scope |
Deep reference
Design & tradeoffs
Scope
Observability owns log collection/parsing/search/retention. Linux, Windows, Containers, Databases and applications own the semantics of their native log events.