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

Commit 32dc508

Browse files
committed
Update Logtail configuration for ingesting host in production
1 parent 66bd6a5 commit 32dc508

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

config/environments/production.rb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
config.logger = if ENV["LOGTAIL_API_KEY"].present?
5050
Logtail::Logger.create_default_logger(
5151
ENV["LOGTAIL_API_KEY"],
52-
telemetry_host: "in.logs.betterstack.com"
52+
ingesting_host: ENV["LOGTAIL_INGESTING_HOST"]
5353
)
5454
else
5555
ActiveSupport::Logger.new(STDOUT)
@@ -88,19 +88,6 @@
8888
# Do not dump schema after migrations.
8989
config.active_record.dump_schema_after_migration = false
9090

91-
# Ensure Logtail is configured in production (fallback if Puma hook doesn't work)
92-
if ENV["LOGTAIL_API_KEY"] && !ENV["LOGTAIL_API_KEY"].empty? && ENV["LOGTAIL_INGESTING_HOST"] && !ENV["LOGTAIL_INGESTING_HOST"].empty?
93-
begin
94-
config.logger = Logtail::Logger.create_default_logger(
95-
ENV["LOGTAIL_API_KEY"],
96-
ingesting_host: ENV["LOGTAIL_INGESTING_HOST"]
97-
)
98-
puts "🌲 Production: Logtail logger configured as fallback"
99-
rescue => e
100-
puts "❌ Production: Failed to configure Logtail fallback: #{e.message}"
101-
end
102-
end
103-
10491
# Enable DNS rebinding protection and other `Host` header attacks.
10592
# config.hosts = [
10693
# "example.com", # Allow requests from example.com

0 commit comments

Comments
 (0)