Skylight 5: Now with Source Locations!
This week we released Skylight version 5.0, which represents a major undertaking that has involved every person at Tilde and every part of our ever-growing stack. In addition to major internal refactors, this release also modernizes our native Rust code, and introduces Skylight's newest feature, Source Locations.
Starting now, Skylight can help you pinpoint the locations in your code that correspond to events in the event sequence. As Skylight traces your code, it will report the file names (with line numbers) or gem names that most likely triggered the event. No more scouring your code trying to find out exactly where an expensive SQL query originated! As you browse your endpoint data, you will find these source locations in the detail card for each event:
If your app is synced with Github, we will also provide links to go directly to that line for the specified commit.
You can read more about Source Locations on our support page, and as always, please try it out and let us know what you think! Your feedback is invaluable as we continue to improve this and other Skylight features.
Skylight 5 also includes a shift to
Module#prepend for adding instrumentation to Rails or other third-party code that does not already have it. In versions 4 and below, most instrumentation was added via alias method chaining.
Module#prepend is now the preferred way of overriding an existing method, but it comes with a caveat: if multiple libraries attempt to patch the same method, they should either all use
Module#prepend or alias method chaining; mixing the two strategies can often result in unintended recursion. We will continue to support Skylight 4 for the immediate future to help ease the transition in case your code isn't prepend-ready, but otherwise recommend upgrading as soon as possible.
The Source Locations feature is just the tip of an iceberg-in-progress: to implement it, the Skylight team has invested considerable engineering efforts into a new backend framework, written in Rust, which will allow us to easily deploy purpose-built services for new features like this one. Stay tuned for future announcements!