โ† All POC Flashcard Decks

Monitoring & Reporting Tools Flashcards

7 cards from real POC practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Monitoring & Reporting Tools flashcards as text
  1. Which Python module provides `TimedRotatingFileHandler` to rotate log files based on a time interval such as midnight daily?

    Answer: logging.handlers

    `logging.handlers.TimedRotatingFileHandler` rotates log files at configured time intervals like 'midnight' or hourly.

  2. In Python's `coverage` tool, which command generates an HTML report showing line-by-line coverage for your source files?

    Answer: coverage html

    `coverage html` creates an `htmlcov/` directory with an interactive HTML coverage report.

  3. What does the `structlog` library primarily add over Python's built-in `logging`?

    Answer: Structured, key-value context binding for log entries

    `structlog` focuses on structured logging by binding key-value pairs to log entries for machine-readable output like JSON.

  4. Which `pytest` plugin is used to measure code coverage during test runs and integrates with the `coverage.py` tool?

    Answer: pytest-cov

    `pytest-cov` is the official plugin that wraps `coverage.py` to measure and report coverage during pytest runs.

  5. When configuring logging via a dictionary using `logging.config.dictConfig()`, which top-level key specifies the minimum version of the schema?

    Answer: version

    The `version` key is required in dictConfig schemas; currently the only valid value is `1`.

  6. Which Grafana data source is most commonly used to visualize metrics collected by Prometheus?

    Answer: Prometheus

    Grafana has a native Prometheus data source that queries the Prometheus HTTP API to build dashboards.

  7. In Python's `logging` module, what happens when you call `logger.exception()` inside an `except` block?

    Answer: Logs at ERROR level and automatically appends the current exception traceback

    `logger.exception()` logs at ERROR level and includes `exc_info=True` automatically, adding the full traceback.