Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/fizzy/saas/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ class Engine < ::Rails::Engine
end
end

initializer "fizzy_saas.logging.queenbee_id" do |app|
ActiveSupport.on_load(:action_controller_base) do
before_action do
if Current.account.present?
logger.try(:struct, account: { queenbee_id: Current.account.external_account_id })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we can rely on the rails-structured-logging gem be availalble and remove the try, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will tweak in the branch

end
end
end
end

config.to_prepare do
Queenbee::Subscription.short_names = Subscription::SHORT_NAMES
Queenbee::ApiToken.token = Rails.application.credentials.dig(:queenbee_api_token)
Expand Down