Operations asks the civic Firepower FDM helper team for an effective application logging strategy. Which emission pattern should the app adopt?
Select an answer to reveal the explanation.
Short Explanation
Structured logs are labeled bins on a conveyor—time, level, event, request id—so operators can sort them. Random print("oops") is loose change on the floor, not a strategy.
Full Explanation
Structured logging emits fields such as time, level, event, and request id on the standard stream so collectors can index, filter, and alert. Operators debugging a municipal workflow can then query by request id or error level instead of grepping unstructured prose under pressure. Scattering print("oops") calls with no level, timestamp, or request fields yields noise that aggregation tools cannot reliably parse, prioritize, or correlate across replicas. Writing free-form paragraphs only to a developer’s IDE console during local runs never reaches production observability pipelines and leaves on-call blind when citizens report failures. Logging exclusively by raising uncaught exceptions makes stack traces the only signal and loses intentional, low-severity operational events that still matter for capacity and audit. Exam caveat: structure without a shared field schema across services still fragments queries—agree on names (especially correlation and tenant identifiers) across UI, API, and integration hops. Operational check: emit one structured info event and one structured error in staging, confirm both appear with parsable fields in the central store, and verify a filter on request id returns the related lines only.