Qtap Output Examples
This appendix provides real-world examples of qtap output for different plugins, formats, and log levels. All examples are captured from actual qtap runs.
http_capture Plugin
The http_capture plugin captures HTTP traffic with configurable detail levels and output formats.
Configuration Parameters
level: Controls capture detail (
none,summary,details,full)format: Output format (
text,json)
Text Format
Summary Level
Shows basic transaction information without headers or bodies.
Configuration:
plugins:
- type: http_capture
config:
level: summary # Basic info only
format: text # Human-readable formatExample Output:
Details Level
Includes HTTP headers but no request/response bodies.
Configuration:
Example Output:
Full Level
Captures everything: headers and request/response bodies.
Configuration:
Example Output:
JSON Format
Summary Level
Structured JSON output with basic information.
Configuration:
Example Output:
Details Level
Includes request and response headers.
Configuration:
Example Output:
Full Level
Complete capture including base64-encoded request/response bodies.
Configuration:
Example Output:
Note: Response body is base64-encoded. Decoded value:
access_logs Plugin
The access_logs plugin formats HTTP traffic as access log entries, similar to web server logs.
Configuration Parameters
mode: Controls capture detail (
summary,details,full)format: Output format (
console,json)
Console Format
Summary Mode
Single-line access log format.
Configuration:
Example Output:
Details Mode
Includes metadata, request headers, and response headers.
Configuration:
Example Output:
Full Mode
Includes everything: metadata, headers, and request/response bodies.
Configuration:
Example Output:
JSON Format
Summary Mode
Minimal structured JSON access log.
Configuration:
Example Output:
Details Mode
Includes metadata and headers in JSON structure.
Configuration:
Example Output:
Full Mode
Complete JSON access log with request/response bodies.
Configuration:
Example Output:
Note: Bodies are plain text in JSON string fields (not base64-encoded like http_capture).
Comparison: http_capture vs access_logs
Purpose
Detailed HTTP transaction capture
Log-style access recording
Formats
text, json
console, json
Levels/Modes
summary, details, full
summary, details, full
Body encoding (JSON)
base64-encoded
Plain text in JSON strings
Use case
Deep inspection, debugging
Monitoring, log aggregation
Readability
More structured
More compact
When to use http_capture
Need complete transaction details for debugging
Require structured data for analysis
Want base64-encoded bodies for binary safety
When to use access_logs
Need familiar web server log format
Want quick visibility into traffic patterns
Prefer compact single-line summaries (summary mode)
Integrating with log aggregation tools
Configuration Examples
Capture Only Errors (Full Detail)
Use http_capture with rulekit to capture only failed requests:
Dual Output: Summary Access Logs + Full Error Capture
Combine access_logs for general visibility with http_capture for detailed error capture:
Notes
All examples captured from real qtap v0 runs
Timestamps reflect UTC timezone
Process IDs (PID) are unique to the execution environment
Some examples show 503 errors due to httpbin.org service issues during testing
Base64 decoding required for http_capture JSON bodies
access_logs JSON bodies are plain text strings
Last updated