- 
                Notifications
    
You must be signed in to change notification settings  - Fork 395
 
Closed
Description
For some reason metrics are not sent from Resque jobs in Rails application.
DATADOG_CLIENT.increment('bbb', by: 1, tags: ['step:foo'])
While app_boot.count is sent and shown on dashboard graph.
config/initializers/datadog.rb
unless Rails.env.test? || ENV['DISABLE_DATADOG'].present?
  require 'datadog/statsd'
  if Rails.env.development?
    Datadog.configure do |c|
      c.use :rails, service_name: "#{`whoami`}-rails-app"
    end
  else
    Datadog.configure do |c|
      c.use :rails, service_name: "#{Rails.env}-rails-app"
      c.use :resque, { service_name: 'resque' }
    end
  end
  # Create a DogStatsD client instance.
  DATADOG_CLIENT = Datadog::Statsd.new('localhost', 8125)
  DATADOG_CLIENT.increment('app_boot.count', tags: ["env:#{Rails.env}"])
  at_exit do
    # release resources used by the client instance
    DATADOG_CLIENT.close()
  end
endGems:
ddtrace (0.49.0)
dogstatsd-ruby (5.0.1)
What I'm doing wrong?
Metadata
Metadata
Assignees
Labels
No labels