Practice structured logging vocabulary: JSON log format, log fields, logs lacking context, querying logs with JQL, and trace IDs linking requests.
0 / 10 completed
1 / 10
The observability guide requires all services to emit logs in ___ format instead of plain text.
JSON log format means each log entry is a JSON object with named fields. This lets log aggregation tools like Elasticsearch, Loki, or Splunk automatically parse and index the fields without needing custom regex parsers.
2 / 10
A standard JSON log entry includes ___ fields: timestamp, level, message, and trace_id.
Log fields are the key-value pairs in a structured log entry. Standard fields include timestamp (when), level (severity), message (human description), service (which component), and trace_id (which request). Consistent field names enable cross-service querying.
3 / 10
During debugging an engineer says: 'The log ___ context — I can't tell which user or request this error belongs to.'
'The log lacks context' means the log entry only contains a generic message without identifying fields like user_id, request_id, or session_id. Without context, debugging requires cross-referencing multiple data sources, slowing incident resolution.
4 / 10
The SRE queries log data using ___, writing filters like level:ERROR AND service:payments.
JQL, KQL (Kibana Query Language), or Lucene query syntax are domain-specific languages for searching structured log fields in platforms like Elasticsearch/Kibana, Grafana, or Splunk. They enable filtering by field value, range, and boolean logic.
5 / 10
The trace_id field ___ all logs for a single request across multiple services.
A trace_id is a unique identifier (UUID or similar) assigned at the entry point of a request and propagated through all downstream services via headers. Including it in every log entry lets you retrieve the complete story of a single request across a distributed system.
6 / 10
Sarah from the QA team is reviewing a new feature release. She comments on a pull request: 'I'm seeing a lot of INFO logs being generated by the authentication service when users attempt to login with invalid credentials. It's making it difficult to pinpoint the root cause.' Which of the following best describes Sarah's observation regarding log levels?
Log levels like INFO are designed to provide a granular view of an application's behavior. While they can be useful for monitoring trends, using too many INFO logs alongside more severe levels (like ERROR or WARNING) can actually *obscure* critical issues. Sarah's comment highlights this – the volume of INFO logs is overwhelming the debugging process and masking potential problems. Using a higher log level would have focused attention on the specific error.
7 / 10
During a standup meeting, David, a backend engineer, says: 'I'm adding a new trace_id field to all of my service logs. This should help us track requests across our microservices.' What is the primary purpose of including a trace_id in log entries?
The key benefit of using a trace_id is its ability to link together log messages originating from different services involved in the same user request. This correlation allows developers to trace a single transaction's path through the system, simplifying debugging and performance analysis by identifying bottlenecks or errors that span multiple components. It does *not* directly relate to filtering by user IDs or generating database statistics.
8 / 10
You're investigating a slow API endpoint. The logs show numerous requests with high latency. Examining the log data, you notice each request includes a trace_id. Which query would be MOST effective in identifying the specific service contributing to the majority of these slow requests?
The use of the trace_id is critical here. Filtering by trace_id allows you to group all log entries related to a *single* user request, regardless of which service generated them. The other options are less effective because they don't leverage this cross-service correlation.
9 / 10
A senior developer is reviewing a pull request for a new logging implementation. They ask: 'How are we ensuring that all log messages related to this user's purchase transaction are consistently linked together across our various services?' What's the BEST approach?
The consistent linking of related events is achieved by using a unique identifier – in this case, a trace_id – within *every* log message. This ensures that all logs pertaining to the same transaction can be correlated across different services and systems. A centralized database would introduce another point of failure; different log levels don't solve the core problem of cross-service correlation.
10 / 10
You're troubleshooting a performance issue with an e-commerce platform. The monitoring dashboard shows intermittent slowdowns in the checkout process. Examining the logs, you notice numerous requests with high latency and a consistent trace_id. Which of the following statements best describes how log data contributes to resolving this problem?
By using a trace_id, you can correlate log messages from different services involved in the checkout process. This allows you to pinpoint exactly where the slowdown is occurring – whether it's in the payment gateway, the inventory service, or another part of the system – by tracing the entire request lifecycle.
What will I practise in "Structured Logging Vocabulary"?
Practice structured logging vocabulary: JSON log format, log fields, logs lacking context, querying logs with JQL, and trace IDs linking requests.
How many exercises are in this module?
This module has 10 multiple-choice exercises, each with instant feedback and a full explanation of the correct answer.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do I need to create an account to do these exercises?
No account is required. Just click an option to answer — your score for this session is tracked automatically in the progress bar above.
What happens if I choose the wrong answer?
You'll immediately see which answer was correct, plus a full explanation covering the vocabulary and reasoning behind it — mistakes are where most of the learning happens.
Can I retry the exercises if I want a higher score?
Yes — use the "Try again" button on the results screen to reset and go through all the questions again.
Is my progress saved if I close the page?
No. Progress is tracked only for your current visit; reloading or leaving the page resets the counter. This keeps the exercise simple and account-free.
Where can I find more Log Reading exercises?
Browse the full Log Reading hub for related drills, or check the "Next up" link below to continue with a connected topic.
How is this different from reading an article on the same topic?
Articles explain vocabulary and concepts in prose; this exercise tests and reinforces that vocabulary through active recall with immediate feedback — the two work best together.
Who writes these exercises?
Every exercise is written by the CoderSlingo team, drawing on real workplace English used in IT roles, then reviewed for accuracy and clarity.