appsignal

AppSignal Now Offers Support for Long-Running Streaming Rack Responses in Ruby

Connor James

Connor James on

AppSignal Now Offers Support for Long-Running Streaming Rack Responses in Ruby

We're excited to announce that AppSignal now offers improved monitoring for long-running streaming Rack responses. Our improved Rack response monitoring means you can gain deeper visibility into the health of your Ruby application's long-running responses, allowing you to catch errors that may arise minutes or even hours after a request's body is served.

This new layer of observability results from a valuable contribution from Julik Tarkhanov, Director of Engineering at Cheddar Payments. His work enabled us to monitor long-running responses within our Ruby gem, enhancing our support for real-time performance monitoring.

In this blog post, we'll explain what this addition means when monitoring your Ruby apps and discuss how our open-source approach fosters collaboration with clients to provide actionable, high-impact insights.

Why Monitor Long-Running Rack Responses?

Typically, when monitoring Rack responses, AppSignal can trace the time it takes to render a response body:

AppSignal Event Timeline before adding long-running response monitoring

However, AppSignal used to be unable to monitor long-running responses, such as when downloading a large file. This meant it wasn't possible to know how long a response took to render or if any exceptions occurred while it was being rendered.

While this issue is niche and not likely to apply to many of our customers' experiences with response monitoring, it was an issue for Cheddar Payments. For their use case, the inability to monitor long-running responses posed challenges in tracking performance and diagnosing potential failures during lengthy processes.

At Cheddar Payments, we have downloads for key reports that get delivered in a streaming fashion inside zip files from Rails. I noticed the serving of these reports was excluded from AppSignal monitoring — because the AppSignal tracing would stop once the "main" part of the HTTP interaction in the app finishes. Tracing these responses was key because there were errors in generating those reports, which we could not see in AppSignal.

Julik Tarkhanov, Director of Engineering at Cheddar Payments

A Contribution-Driven Solution for Monitoring Long-Running Rack Responses

Due to his experience with long-running responses in Rack from his days at WeTransfer, Julik decided to contribute to our Ruby gem, implementing a solution to monitor long-running responses.

We already have an APM (AppSignal), there is some functionality that can be easily implemented, so why not do it?

Rather than exploring an alternative, Julik's initial pull request introduced a way to monitor long-running Rack responses within AppSignal's traces. Thanks to the hard work of Tom from the AppSignal Integrations Team, we fully implemented a solution in PR #1140 and released it in version 3.10 of our Ruby gem, addressing edge cases and improving reliability.

Julik's solution allowed his team to continue using AppSignal for monitoring, addressing the need to track longer-running responses without implementing or switching to alternative tooling.

AppSignal can now capture the duration of long-running responses and notify customers should an issue arise at any point during the response rendering, giving our customers an extra layer of observability.

Image of AppSignal Event Timeline with rack process response body events

Why We Value Open-Source Contributions

At AppSignal, we've always valued customer feedback and feature requests. While not every request can make it to production, we're open to exploring our customers' needs.

When we identify a need that could benefit everyone, we do our best to see if we can turn it into a working solution. Like many in the Rails community, we believe in the power of open-source collaboration, which helps us stay agile and responsive to our customers' evolving needs.

As a small, bootstrapped team, we can't implement every feature on every client's wishlist. This is where contributions to our gem come in: they enable us to expand our product's capabilities and address important features faster, with the help of the community.

Our open-source approach is that we aim to do as much as possible in integrations out in the open. We love seeing contributions from the community and always welcome ideas and improvements.

Thijs Cadier, AppSignal's CTO

AppSignal, The Customer-Focused APM Tool

At AppSignal, we put our customers at the heart of everything we do, constantly working to deliver the best possible experience and tools to help you monitor and optimize your applications. That's why our customers love our:

  • Free expert support
  • Transparent pricing
  • Flexible upgrade policy
  • Easy-to-use interface

Still not convinced? Here's what Julik has to say:

AppSignal is an excellent product, and trying it is not a large commitment in terms of tooling. And with the onset of OpenTelemetry, it is only going to get better.

With our installation wizard, you can start a free trial and have AppSignal up and running in less time than it takes to drink a coffee. Oh, and did we mention we send stroopwafels (upon request) to new customers?

Have a question or want to learn more about how AppSignal can help you make the most of your app's metrics? Feel free to drop us a line, we're always happy to help!

Connor James

Connor James

Official technical writer at AppSignal. Podcast addict who loves cannoli so much that he's considering changing his name to Connoli. He thinks there's a `u` in color. You might find him on the mic, on the stage, or lying on the sofa when he's off Documentation Duty.

All articles by Connor James

Become our next author!

Find out more

AppSignal monitors your apps

AppSignal provides insights for Ruby, Rails, Elixir, Phoenix, Node.js, Express and many other frameworks and libraries. We are located in beautiful Amsterdam. We love stroopwafels. If you do too, let us know. We might send you some!

Discover AppSignal
AppSignal monitors your apps