Skip to content

Commit

Permalink
configuere logging before tracing. #470
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 26, 2020
1 parent 16f2383 commit 58529dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 12 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 0 additions & 10 deletions config/initializers/datadog-tracer.rb

This file was deleted.

0 comments on commit 58529dd

Please sign in to comment.