Operations | Monitoring | ITSM | DevOps | Cloud

Ruby

AppSignal Ruby Gem 2.11: Active Job and Friends

We just released Ruby Gem 2.11. We are always making things easier to use for you, so more things work out of the box and more instrumentation and dashboarding is built without you doing any heavy lifting. This release has a big overhaul of Active Job support. The cherry on the stroopwafel cake is the automatically generated dashboard with status per queue, queue throughput and queue times. 2.11 also polishes a lot of other integrations. Let’s dive in.

How to Test Ruby Code That Depends on External APIs

Few things are more frustrating than slow, flaky test suites. You're ready to deploy, wait 20 minutes for CI to run, only to find that a test failure in code you've never touched is blocking you. You dig into the source and find the problem: an external API call. It works (slowly) most of the time. But sometimes the network glitches and it fails. What do you do? In this article, José Manuel shows us several techniques for removing external API dependencies from our tests.

Troubleshooting Encoding Errors in Ruby

Text encoding is fundamental to programming. Web sites, user data, and even the code we write are all text. When encoding breaks, it can feel like the floor is falling out from under you. You're cast into a dimension of bitmasks and codepoints. Logs and backtraces are useless. You consider trading your text editor for a hex editor. But there's hope! In this article, Jose Manuél will show us how encoding errors happen, how they're expressed in Ruby, and how to troubleshoot them.

A Tour of 7 Popular Ruby Frameworks in 2020

Ruby may be over 25 years old, but it remains popular in the software community for its focus on programmer happiness. Building software with Ruby often involves leveraging one or more popular frameworks for the purpose of increasing productivity by relying on existing solutions to common problems. Ruby frameworks generally fall into two categories: web-facing frameworks and background job frameworks.

Ruby Garbage Collection: More Exciting than it Sounds

Running software uses computer memory for data structures and executable operations. How this memory is accessed and managed depends on the operating system and the programming language. Many modern programming languages manage memory for you, and Ruby is no different. Ruby manages memory usage using a garbage collector (also called gc). In this post, we’ll examine what you, a Ruby developer, need to know about Ruby’s gc. Use the links below to skip ahead in the tutorial.

The Lifecycle of a Response

Last year, the Skylight team gave a talk called Inside Rails: The Lifecycle of a Request. In that talk, we covered everything that happens between typing a URL into your browser to a request reaching your Rails controller action. But that talk ended with a cliffhanger: Once we are in the controller action, how does Rails send our response back to the browser?

Monitor Sidekiq with Datadog

Sidekiq is a Ruby framework for background job processing. Developers can use Sidekiq to asynchronously run computationally intensive tasks—such as bulk email sending, payment processing, and data importing—to help speed up the response times of their applications. If you’re using Sidekiq Pro or Enterprise, Datadog’s integration helps you monitor the progress of your jobs and the applications that depend on them, all in a single platform.

Why Rubyists Should Consider Learning Go

These days fewer and fewer web developers get to specialize in a single language like Ruby. We use different tools for different jobs. In this article, Ayooluwa Isaiah argues that Go is the perfect complement to Ruby. The developer who knows both is in a great position to handle almost any back-end challenge.

How to Use Lambdas in Ruby

Lambdas are a powerful feature of the Ruby language. They allow you to wrap logic and data into a portable package. In this post, we’ll cover how and when to use lambdas. You'll also learn about the difference between lambdas and Procs, and the performance profile of lambda functions. The code examples have been tested with 2.6 and 2.7 and should work with most modern Rubys.

Ruby performance tips - how to optimize code from the ground up

Over the last few years, more developers have taken Ruby as their staple programming language. Who can blame them? It certainly has a lot of appealing features. For one, the syntax is easy to read and debug. A default MVC architecture within most Ruby frameworks is another alluring factor that may have had you using it as well.