diff --git a/config/application.rb b/config/application.rb index ce923ae76..ca7a6bc0a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -83,6 +83,18 @@ class Application < Rails::Application # secret_key_base is not used by Rails API, as there are no sessions config.secret_key_base = "blipblapblup" + # enable datadog tracing here so that we can inject tracing + # information into logs + Datadog.configure do |c| + c.tracer hostname: "datadog.local", enabled: Rails.env.production?, env: Rails.env + c.use :rails, service_name: "client-api" + c.use :elasticsearch + c.use :active_record, analytics_enabled: false + c.use :graphql, schemas: [LupoSchema] + c.use :aws + c.analytics_enabled = true + end + config.lograge.enabled = true config.lograge.formatter = Lograge::Formatters::Logstash.new config.lograge.logger = LogStashLogger.new(type: :stdout) diff --git a/config/initializers/datadog-tracer.rb b/config/initializers/datadog-tracer.rb deleted file mode 100644 index b98b123c0..000000000 --- a/config/initializers/datadog-tracer.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -Datadog.configure do |c| - c.tracer hostname: "datadog.local", enabled: Rails.env.production?, env: Rails.env - c.use :rails, service_name: "client-api" - c.use :elasticsearch - c.use :active_record, analytics_enabled: false - c.use :graphql, schemas: [LupoSchema] - c.analytics_enabled = true -end