A Ruby gem for logging and analyzing outgoing HTTP requests from multiple HTTP client libraries.
Sniffer is a Ruby library that logs and analyzes outgoing HTTP requests from your application. It captures detailed request and response data, including headers, bodies, and timing, to help developers debug HTTP interactions and monitor external API calls. It supports multiple HTTP client libraries and outputs structured JSON logs for integration with monitoring systems.
Ruby developers building applications that make HTTP requests to external APIs or services and need visibility into those communications for debugging, performance tuning, or compliance logging.
Developers choose Sniffer because it provides a unified, library-agnostic way to log HTTP traffic across different Ruby HTTP clients without modifying application code. Its JSON output and configurable filtering make it easy to integrate with existing log management pipelines.
Log and Analyze Outgoing HTTP Requests
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with over 10 popular Ruby HTTP clients including Net::HTTP, HTTP.rb, and Typhoeus, as explicitly listed in the README, ensuring coverage across most common use cases.
Outputs logs in JSON format, making them easy to ingest into systems like ELK or Logentries for centralized monitoring, as highlighted in the description and configuration examples.
Allows selective logging of URLs, headers, bodies, and timing via a simple configuration block, enabling focused debugging without noise, as shown in the log options.
Includes log rotation with configurable capacity to prevent memory bloat, detailed in the store configuration with rotate options for queue-like behavior.
Intercepting every HTTP request adds processing latency, which can degrade performance in high-traffic applications, though not explicitly admitted, it's a inherent trade-off of such tools.
Optional prepend mode requires careful require ordering in the Gemfile (e.g., 'all_prepend' before 'sniffer'), which can confuse users unfamiliar with Ruby's module system, as noted in the installation section.
Relies entirely on external log aggregation tools for data analysis, lacking any native GUI or dashboard for real-time insights, making it less suitable for quick debugging without additional setup.