Skip to content

Commit edd61ba

Browse files
authored
T-4821 Use ingestion_* options, update outdated naming (#48)
1 parent 2e6b541 commit edd61ba

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

example-project/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ group :test do
7171
gem "webdrivers"
7272
end
7373

74-
gem "logtail-rails", "~> 0.2.9"
74+
gem "logtail-rails", "~> 0.2.10"

example-project/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Then replace `<SOURCE_TOKEN>` and `<INGESTING_HOST>` in `config/application.rb`
1616
```ruby
1717
config.logger = Logtail::Logger.create_default_logger(
1818
"<YOUR_ACTUAL_SOURCE_TOKEN>",
19-
telemetry_host: "in.logs.betterstack.com",
19+
ingesting_host: "in.logs.betterstack.com",
2020
)
2121
```
2222

example-project/config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Application < Rails::Application
2121

2222
config.logger = Logtail::Logger.create_default_logger(
2323
"<SOURCE_TOKEN>",
24-
telemetry_host: "<INGESTING_HOST>",
24+
ingesting_host: "<INGESTING_HOST>",
2525
)
2626
end
2727
end

lib/logtail-rails/logger.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def self.create_logger(*io_devices_and_loggers)
5656
end
5757

5858
def self.create_default_logger(source_token, options = {})
59-
# Handle backward-compatibility of argument names
60-
options[:logtail_host] ||= options[:telemetry_host] if options[:telemetry_host].present?
61-
options[:logtail_port] ||= options[:telemetry_port] if options[:telemetry_port].present?
62-
options[:logtail_scheme] ||= options[:telemetry_scheme] if options[:telemetry_scheme].present?
59+
# Handle backward-compatibility of argument names from v0.2.9
60+
options[:ingesting_host] ||= options[:telemetry_host] if options[:telemetry_host].present?
61+
options[:ingesting_port] ||= options[:telemetry_port] if options[:telemetry_port].present?
62+
options[:ingesting_scheme] ||= options[:telemetry_scheme] if options[:telemetry_scheme].present?
6363

6464
if ENV['LOGTAIL_SKIP_LOGS'].blank? && !Rails.env.test?
6565
io_device = Logtail::LogDevices::HTTP.new(source_token, options)

lib/logtail-rails/overrides/lograge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Logtail and lograge are not compatible installed together. Using lograge
2-
# with the Logtail.com *service* is perfectly fine, but not with the Logtail *gem*.
2+
# with the Better Stack Telemetry *service* is perfectly fine, but not with the Logtail *gem*.
33
#
44
# Logtail does ship with a {Logtail::Config#logrageify!} option that configures
55
# Logtail to behave similarly to Lograge (silencing various logs). Check out

lib/logtail-rails/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Logtail
22
module Integrations
33
module Rails
4-
VERSION = "0.2.9"
4+
VERSION = "0.2.10"
55
end
66
end
77
end

logtail-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
2727
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2828
spec.require_paths = ["lib"]
2929

30-
spec.add_runtime_dependency "logtail", "~> 0.1"
30+
spec.add_runtime_dependency "logtail", "~> 0.1", ">= 0.1.14"
3131
spec.add_runtime_dependency "logtail-rack", "~> 0.1"
3232

3333
spec.add_runtime_dependency 'activerecord', '>= 5.0.0'

0 commit comments

Comments
 (0)