Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Logs

Direct answer

Logs are timestamped records of discrete events, ideally structured (JSON) with fields such as level, service, message and trace_id.

When to use this

Use it for detailed context on specific events and errors.

First 30 seconds

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.

Operational verification

app writes log → agent ships → parsed/enriched → indexed/stored → queried

Evidence · next step

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
Common mistakes
What not to infer

Observability owns log collection/parsing/search/retention. Linux, Windows, Containers, Databases and applications own the semantics of their native log events.

Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines · Observability owns log collection/parsing/search/retention. Linux, Windows, Containers, Databases and applications own the semantics of their native log events.
Scope / prerequisiteUse it for detailed context on specific events and errors.
What next?3 suggested next steps
Child topics (this level)3
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

test · 1
Drill down

Subtopics

Go one level deeper into this subject.

Key points

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.

Key checks
  • journalctl -u <svc> -p err --since -1h — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool 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:

PracticeReason
Structured format (JSON, key=value)Reliable parsing and querying
Consistent fields (timestamp UTC, level, service, host, trace ID)Correlation
Meaningful levelsFiltering signal from noise
No secrets or unnecessary personal dataSecurity and privacy
Central collectionSearch across systems; survives host loss
Retention by valueHot 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
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

systemd-journald / Linux systemd 249 or laterRead structured logs for one unit in a time window.

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-iso

Expected output

systemd-journald / Linux systemd 249 or laterjournalctl -u checkout.service -p err -n 3 -o short-iso

Expected 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.
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-29 · otherOpenTelemetry / Prometheus / Grafana ecosystem OpenTelemetry current specification

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
logslog observabilitystructured logginglog correlation
Embedded reference data

Quick lookup tables

Logs verification boundary matrix

A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Logs.

BoundaryInspectHealthy interpretationDo not infer
IntentStructured vs unstructured logsIntended object/scope is explicit and versioned where relevantIntent is already effective
Owning runtime/control planeSeverity / Timestamps/time zonesOwner accepts and reports the expected object stateDownstream dependencies are healthy
Effective stateCorrelation/request IDsIndependent read-back matches the intended stateEvery client sees the same result
Consumer outcomeParsing/enrichmentThe original bounded check succeeds in the same time windowProduction correctness outside this scope
Depth when you need it

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.

Confirmation

Confirm action

Continue?