Skip to content

Commit

Permalink
Require appsignal in Grape integration file (#1122)
Browse files Browse the repository at this point in the history
Make people's lives easier by requiring appsignal from the Grape
integration file so they don't have to require two files.

Also add a log message to help debug if the Grape integration file is
loaded like we do for other integrations.

[skip review]
  • Loading branch information
tombruijn committed Jun 27, 2024
1 parent 66bb7a6 commit b3a8003
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changesets/require-appsignal-in-grape-integration-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: patch
type: change
---

Require the AppSignal gem in the Grape integration file. Previously `require "appsignal"` had to be called before `require "appsignal/integrations/grape"`. This `require "appsignal"` is no longer required.
3 changes: 3 additions & 0 deletions lib/appsignal/integrations/grape.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# frozen_string_literal: true

require "appsignal"
require "appsignal/rack/grape_middleware"

Appsignal.internal_logger.debug("Loading Grape integration")

module Appsignal
# @api private
module Grape
Expand Down

0 comments on commit b3a8003

Please sign in to comment.