Skip to content
This repository was archived by the owner on Jul 25, 2025. It is now read-only.

Commit d808950

Browse files
committed
Refactor Logtail configuration in puma.rb to improve environment variable checks, ensuring non-empty values for API key and ingesting host before initialization.
1 parent 7d956e5 commit d808950

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

config/puma.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
5656

5757
# Configure Logtail after worker fork to prevent thread inheritance issues
58-
if ENV["LOGTAIL_API_KEY"].present? && ENV["LOGTAIL_INGESTING_HOST"].present?
58+
if ENV["LOGTAIL_API_KEY"] && !ENV["LOGTAIL_API_KEY"].empty? && ENV["LOGTAIL_INGESTING_HOST"] && !ENV["LOGTAIL_INGESTING_HOST"].empty?
5959
on_worker_boot do
6060
puts "🔧 Worker #{Process.pid}: Initializing Logtail after fork"
6161

0 commit comments

Comments
 (0)