Systems | Development | Analytics | API | Testing

AppSignal

How to Delegate Methods in Ruby

Delegation in programming refers to handing off a task from one part of a program to another. It's an essential technique in object-oriented programming, empowering clean, maintainable code by ensuring that each object or method is responsible for a specific task or behavior. Understanding and using delegation is key to mastering Ruby and other object-oriented languages. Delegation promotes separation of concerns, making your code more modular and easier to understand, test, and refactor.

Observe Your Phoenix App with Structured Logging

In this post, we'll configure a Phoenix LiveView application to use a structured logger. We'll then use AppSignal to correlate log events with other telemetry signals, like exception reports and traces. Along the way, you'll learn about the benefits of structured logging, and you'll see how to configure a distinct framework and application logger in your Phoenix app. Let's get started!

An Introduction to Playwright for Node.js

Test coverage plays a key role in providing bug-free experiences to users. At the same time, writing and maintaining test scripts for different web browsers is cumbersome and time-consuming. Fortunately, there is a solution! Playwright is a cutting-edge tool that makes it easy to automate modern web browsers. Through its powerful API, you can write end-to-end test scripts that run smoothly on different browsers. In this article, we'll cover: Let's dive straight in!

An Introduction to Devise for Ruby on Rails

With over 20,000 GitHub stars and lots of integrations, the Devise gem is one of the most popular gems in the Ruby landscape. So why would we term it one of Ruby's "hidden" gems? Well, as popular as it is, most developers only scratch the surface of the library's capabilities. In this two-part series, we'll take a deep dive into Devise. In this first part, we'll learn some of the basics, including: In part two, we'll look at more advanced usages of Devise, including: Let's get started!

Multithreading with Worker Threads in Node.js

The beauty of Node is that while the main event loop runs in a single thread, some expensive tasks are automatically offloaded to a separate worker pool. These include the I/O-intensive DNS and File System (except fs.FSWatcher()) APIs, as well as the CPU-intensive Crypto and Zlib APIs. All these have a synchronous variation which will block the main thread. This is generally how Node accomplishes concurrency while running on a single thread.

A Deep Dive into Mutations with Absinthe

In the last two posts of this series, we saw how easy it is to integrate Absinthe into your app to provide a GraphQL API for querying data. We also shared some useful tips for building and maintaining large schemas and optimizing queries. This post will show how we can provide an API to create GraphQL mutations with Absinthe for Elixir. Let's get started!

Migrate Your Express Application to Fastify

Welcome to the final part of our Express to Fastify series. In the previous installments, we explored the unique features and advantages of Fastify over Express. Now, you'll put what you've learned so far into practice by migrating an existing Express application to Fastify. You'll avoid rewriting an entire application from scratch by gradually transitioning to Fastify.

Keep Your Ruby App Secure with Bundler

This article covers the use of bundler features to secure Ruby applications. In this day and age, we have to be more and more careful about software supply chain security. We'll show you how to start this journey by relying on a Gemfile and bundler to manage your project's dependencies. By the end of the post, you will better understand how bundler audit and bundler outdated work. Both can help you monitor the security state of your project's dependency tree. Let's dive in!

An Introduction to Lambdas in Ruby

Lambdas are a powerful programming construct used in many languages. These functions allow developers to write code that is more concise, efficient, and easier to maintain, making Lambdas an essential part of any developer's toolkit. In this article, we'll explore how you can use Lambda functions in Ruby to simplify your code and make it more powerful.

Exceptional Error Reporting for Rails Exceptions

If you want insights into your application's exceptions but don't have time to invest in adding verbose logic to your code, we've got some exceptional news: The AppSignal for Ruby gem 3.4.1 now supports the Rails error reporter! With this change, you can simplify your AppSignal integration, streamline your code and begin reporting errors on the fly without raising an error page and interrupting your user's flow.