GoSpy

GoSpy allows you to send traces from phpspy to pyroscope with easy and simple configuration by cli arguments. With gospy, phpspy and Pyroscope you can easily profile your PHP applications right in production with minimum overhead.

CPU and RAM usage of gospy relates to phpspy. With phpspy running 75 threads at a 25 Hz rate, it consumes about 200% CPU, while gospy consumes only 40% CPU and uses just 30 MB of RAM. So, the total overhead in this case is about 250% CPU. It also allows for very flexible configuration to achieve around 15% total CPU usage.

With dynamic tags, you can profile the entire app or specific slices, like certain URLs.

Features

  • Easy configuration through command-line arguments
  • Minimal overhead when profiling PHP applications
  • Dynamic tags for flexible profiling of different parts of the application
  • Support for running in Docker containers
  • Ability to automatically restart the profiler
  • Limiting traces to specific entry points
  • Flexible settings for speed and resource usage

Usage

GoSpy is particularly useful for profiling PHP applications in production environments when you need to minimize performance impact. The tool works in conjunction with phpspy, collecting data about PHP code execution, and sends it to Pyroscope for visualization and analysis.

Typical use cases include:

  • Monitoring web application performance
  • Identifying bottlenecks in PHP code
  • Analyzing application behavior under load
  • Profiling only specific URLs or entry points