Skip to content

Commit

Permalink
GovukAppConfig no longer automatically initialises OpenTelemetry when…
Browse files Browse the repository at this point in the history
… running a rake task
  • Loading branch information
KludgeKML committed Jul 31, 2023
1 parent 22599c2 commit f01899f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

*

# 9.0.4

* Fix an issue with Rails.logger being not an instance of ActiveSupport::Logger. Rails expects Rails.logger to have methods that Ruby STD Logger does not provide. e.g. `silence()` ([#309](https://github.com/alphagov/govuk_app_config/pull/309))
Expand Down Expand Up @@ -36,7 +40,7 @@

# 8.0.1

* Change the "source" field in Rails logs from logstasher from string representing IP host address to an empty object.
* Change the "source" field in Rails logs from logstasher from string representing IP host address to an empty object.

# 8.0.0

Expand Down
3 changes: 2 additions & 1 deletion lib/govuk_app_config/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class Railtie < Rails::Railtie
end

initializer "govuk_app_config.configure_open_telemetry" do |app|
unless Rails.const_defined?(:Console)
unless Rails.const_defined?(:Console) ||
(Rails.const_defined?(:Rake) && Rake.application.top_level_tasks.any?)
GovukOpenTelemetry.configure(app.class.module_parent_name.underscore)
end
end
Expand Down

0 comments on commit f01899f

Please sign in to comment.